SPRUI30H November 2015 – May 2024 DRA745 , DRA746 , DRA750 , DRA756
Table 28-14 describes the keyboard controller software mode.
Step | Register/Bit Field/Programming Model | Value D |
---|---|---|
Deactivate the internal keyboard controller sequencer by clearing the bit. | KBD_CTRL[1] NSOFTWARE_MODE | 0b0 |
Enable the interrupt event by setting the bit. | KBD_IRQENABLE_SET[0] IT_EVENT_EN | 0b1 |
Wait for the KBD_IRQ interrupt signal assertion. Begin the software scan when the interrupt signal is asserted: | ||
1) Disable all columns to drive a logical 0 on the kbd_col[8:0] output by writing 0xFF. (logical 1 bit = inactive column-row) | KBD_COLUMNOUTPUTS[8:0] KBC_REG | 0xFF |
2) Drive kbd_col(i) output, (where i = 0 to 8), to 0 to capture a pressed-key-event, at the corresponding row input. | KBD_COLUMNOUTPUTS[i] KBC_REG (where i = 0 to 8) | 0b0 |
3) Read the KBR_LATCH bit field of the KBD_ROWINPUTS register to determine which is the pressed key. | KBD_ROWINPUTS[8:0] KBR_LATCH | |
IF: KBR_LATCH k-bit = 0 , where k = 0 to 8 | ||
Then, the corresponding k-row is connected to the column being enabled. | ||
END IF | ||
Repeat step 2) and step 3) for all existing columns. | KBD_IRQWAKEEN[2:0] WUP_..._ENA | 0x– |
In software mode, during the manual keyboard scan, an interrupt is generated when a pressed key is detected.