BL702/704/706 Reference Manual
15.3.3 Key value
The key value will be stored in the register KEYCODE_VALUE, every 8 bits is a key value, and the first key value
will be stored in the lowest 8 bits. When the bit corresponding to the serial number in the register KEYCODE_CLR is
set to one, the corresponding key value and interrupt flag bit will be cleared. The row number corresponding to the
key value = key value% total number of rows, the column number corresponding to the key value = key value / total
number of rows.
15.3.4 Interrupt
When a key press is detected, the interrupt flag bit will be set and an interrupt will be generated at the same time.
15.4 Register description
Name
Description
ks_ctrl Keyscan control
ks_int_en Keyscan interrupt enable
ks_int_sts Keyscan interrupt status
keycode_clr Keycode clear
keycode_value Keycode value
15.4.1 ks_ctrl
Address:0x4000a900
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16
RSVD COLNUM RSVD ROWNUM
15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
RSVD RCEXT DEGCNT DEG
EN
GHEN RSVD KSEN
Bits
Name Type Reset Description
31:25 RSVD
24:20 COLNUM R/W 5’d19 col_num + 1
19 RSVD
18:16 ROWNUM R/W 3’d7 row_num + 1
15:10 RSVD
BL702/704/706 Reference Manual 278/ 375
@2021 Bouffalo Lab