
Slow AMBA Peripherals
13-25
GMS30C7201 Data Sheet
Scan clock:
PCLK
/2
PCLK
/128
PCLK
/256
PCLK
/512
scanclock
is generated using
PCLK
(3.6864MHz).
1.84MHz, test mode
28 kHz
14 kHz
7 kHz
Programmable scan rate:
6.5K times/sec
101 times/sec
50 times/sec
25 times/sec
11Byte key buffer: 11 column key scan values are stored (8 x 11 key matrix).
test mode scan rate
13.4.4 Keyboard interface controller unit operation
To start key input scanning, set the SCANEN bit and POWERDOWN bit of
KBCR
(Keyboard Configuration Register) and the
CLKSEL
bit of the KBCR. The key scan
control signal is generated. Periodically, column scan code is saved in the 11-byte key
buffer. After the 11th column key data is stored,
INTKBD
is generated to make the CPU
read 11 scan values.
The keyboard interface block leaves reset in power down mode. To activate the block
bits [7] and [2] of the KBCR register should be programmed HIGH, then the keyboard
will be automatically scanned according to the programmed rate, and scan data will be
stored in the KBVR registers. When all the keyboard has been scanned, an interrupt is
generated, and, by interrogating the KBVR registers, software can determine which
keys have been pressed. It is software
’
s responsibility to debounce the key pressed
information. Keyboard key press interrupts are generated in all PMU states except deep
sleep.
13.4.5 Keyboard interface controller unit register map
The base address of the keyboard interface controller unit is 0x80022000, and the
offset of any particular register from the base address is fixed.
Bit
Address
Access (R/W)
Read location/Write location
8 bit
KIC Base + 0x00
R/W
KBCR/KBCR
11 bit
KIC Base + 0x04
R
TICOUT
8 bit
KIC Base + 0x08
R/W
TICIN/TICIN
32 bit
KIC Base + 0x0c
R
KBVR0
32 bit
KIC Base + 0x10
R
KBVR1
32 bit
KIC Base + 0x14
R
KBVR2
1 bit
KIC Base + 0x18
R
KBSR
0 bit
KIC Base + 0x1c
TCLK
This is a virtual register, used to
generate TIC CLK in test mode.
Table 13-16: Keyboard interface controller unit register memory map