SPRUIE9D May 2017 – May 2024 DRA74P , DRA75P , DRA76P , DRA77P
This procedure initializes the general-purpose Interface module after a power-on reset (POR) or software reset.
Step | Register/Bit Field/Programming Model | Value |
---|---|---|
Execute software reset. | GPIO_SYSCONFIG[1] SOFTRESET | 0x1 |
Wait until reset completed? | GPIO_SYSSTATUS[0] RESETDONE | = 0x1 |
Configure idle mode. | GPIO_SYSCONFIG[4:3] IDLEMODE | 0x- |
Configure interface clock gating. | GPIO_SYSCONFIG[0] AUTOIDLE | 0x- |
Set clock-gating ratio. | GPIO_CTRL [2:1] GATINGRATIO | 0x- |
Configure GPIO channels as input or output. | GPIO_OE[31:0] OUTPUTEN | 0x- |
Set debounce time value. | GPIO_DEBOUNCINGTIME[7:0] DEBOUNCINGTIME | 0x- |
Enable/disable debouncing for desired input line. (For example, when used with a push-button) | GPIO_DEBOUNCENABLE[31:0] DEBOUNCENABLE | 0x- |
Interrupt and wake-up requests configuration | ||
(Optional) Enable/disable wake-up for desired input lines. | GPIO_IRQWAKEN_0[31:0] INTLINE and/or GPIO_IRQWAKEN_1[31:0] INTLINE | 0x- |
(Optional) Enable wake-up generation. | GPIO_SYSCONFIG[2] ENAWAKEUP | 0x1 |
Configure detection events. Note: NOTE: Simultaneous enabling of high-level and low-level detection for one given pin creates a constant-interrupt generator. | GPIO_LEVELDETECT0[31:0] LEVELDETECT0 and/or GPIO_LEVELDETECT1[31:0] LEVELDETECT1 and/or GPIO_RISINGDETECT[31:0] RISINGDETECT and/or GPIO_FALLINGDETECT[31:0] FALLINGDETECT | 0x- |
Clear interrupt status | GPIO_IRQSTATUS_0[31:0] INTLINE and/or GPIO_IRQSTATUS_1[31:0] INTLINE | 0xFFFF FFFF |
Enable interrupts for desired input lines. If wakeup is enabled, it is mandatory to enable the corresponding interrupt. | GPIO_IRQSTATUS_SET_0[31:0] INTLINE and/or GPIO_IRQSTATUS_SET_1[31:0] INTLINE | 0x- |
Detection of events requires a functional clock running for every group of 8 bits. If detection of events is enabled only within one octet (for example, 0x0012 0000), power saving can be achieved. Else (for example, 0x0102 0000), using two octets requires one more clock to be run by the module.