SPRUI30H November 2015 – May 2024 DRA745 , DRA746 , DRA750 , DRA756
All interrupt sources (the 32 GPIO input channels) are merged to issue two synchronous interrupt requests in each GPIO module. Thus, the general-purpose interface has 16 interrupt lines (two interrupt lines per GPIO module instance).
Table 27-8 lists the event flags, and their mask, that can cause module interrupts.
Event Flag | Event Mask | Synchronous | Sensitivity | Description |
---|---|---|---|---|
GPIOi.GPIO_IRQSTATUS_0 [31:0] INTLINE | GPIOi.GPIO_IRQSTATUS_SET_0[31:0] INTLINE | Yes | Edge/ level | Corresponding to the first line of interrupt |
GPIOi.GPIO_IRQSTATUS_1 [31:0] INTLINE | GPIOi.GPIO_IRQSTATUS_SET_1[31:0] INTLINE | Yes | Edge/ level | Corresponding to the second line of interrupt |
GPIOi.GPIO_IRQSTATUS_0 [31:0] INTLINE | GPIOi.GPIO_IRQSTATUS_SET_0[31:0] INTLINE | Yes | Edge/ level | Corresponding to the first line of interrupt |
GPIOi.GPIO_IRQSTATUS_1 [31:0] INTLINE | GPIOi.GPIO_IRQSTATUS_SET_1[31:0] INTLINE | Yes | Edge/ level | Corresponding to the second line of interrupt |
GPIOi.GPIO_IRQSTATUS_0 [31:0] INTLINE | GPIOi.GPIO_IRQSTATUS_CLR_0[31:0] INTLINE | Yes | Edge/ level | Corresponding to the first line of interrupt |
GPIOi.GPIO_IRQSTATUS_1 [31:0] INTLINE | GPIOi.GPIO_IRQSTATUS_CLR_1[31:0] INTLINE | Yes | Edge/ level | Corresponding to the second line of interrupt |
GPIOi.GPIO_IRQSTATUS_0 [31:0] INTLINE | GPIOi.GPIO_IRQWAKEN_0 [31:0] INTLINE | No | Edge/ level | Corresponding to the first line of interrupt |
GPIOi.GPIO_IRQSTATUS_1 [31:0] INTLINE | GPIOi.GPIO_IRQWAKEN_1 [31:0] INTLINE | No | Edge/ level | Corresponding to the second line of interrupt |
For more information about interrupt mapping, see Table 27-4, GPIO Hardware Request.
Synchronous interrupt request line 1 and line 2 are active depending on their respective interrupt-enable1 and interrupt-enable 2 registers (GPIOi.GPIO_IRQSTATUS_SET_0, GPIOi.GPIO_IRQSTATUS_SET_1, GPIOi.GPIO_IRQSTATUS_CLR_0, and GPIOi.GPIO_IRQSTATUS_CLR_1).
The interrupt enable1 (or interrupt enable2) register allows masking of the expected transition on input GPIO to prevent the generation of an interrupt request on line 1 (or line 2). The interrupt-enable registers are programmed synchronously with the interface clock.
These registers can be accessed with direct read/write operations or by using the alternate set-and-clear protocol feature for register update. This feature allows setting or clearing explicit bits of these registers with a single write access (see Section 27.4.9, General-Purpose Interface Set-and-Clear Protocol).
The interrupt status 1 (or interrupt status 2) register determines which of the input GPIO pins triggered the interrupt line1 (or interrupt line 2) request (or the wake-up line).
When a bit in this register is set to 1, it indicates that the corresponding GPIO pin is requesting the interrupt (or the wakeup). To reset a bit in this register, set the appropriate bit to 1. However, an interrupt cannot be generated by writing 1 to the interrupt status 1 (or interrupt status 2) register.
If 0 is written to a bit in this register, the value in the corresponding bit in the interrupt status 1 and remains unchanged. The interrupt status 1 (or interrupt status 2) register is synchronous with the interface clock. In idle mode, the event is detected through an asynchronous path, and interrupt status 2 registers are set when the GPIO module is awaken.
After servicing the interrupt, the status bit in the interrupt status register (GPIOi.GPIO_IRQSTATUS_0 or GPIOi.GPIO_IRQSTATUS_1) must be reset and the interrupt line released (by setting the corresponding bit of the interrupt status register to 1).
Before enabling an interrupt for the GPIO channel in the interrupt-enable register (GPIOi.GPIO_IRQSTATUS_SET_0 or GPIOi.GPIO_IRQSTATUS_SET_1) the corresponding status bit in the interrupt status register (GPIOi.GPIO_IRQSTATUS_0 or GPIOi.GPIO_IRQSTATUS_1) must be reset to prevent the occurrence of unexpected interrupts when enabling an interrupt for the GPIO channel.