EasyManua.ls Logo

Cmsemicon CMS32L051 - 19.3 Registers for controlling key interrupt

Default Icon
703 pages
Print Icon
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Loading...
V1.2.2
CMS32L051 User Manual |Chapter 19 Key Interrupt Function
www.mcu.com.cn 625 / 703
19.3 Registers for controlling key interrupt
Interrupt function via the following register control keys.
 Key return mode register (KRM).
 Port mode register (PMx).
19.3.1 Key return mode register (KRM)
KRM0~KRM5-bit control KR0~KR5 signal.
The KRM registers are set via 8-bit memory operation instructions.
After the reset signal is generated, the value of this register becomes 00H.
Figure 19-2 Format of mode register (KRM)
Address: 40044B37H after reset: 00HR/W
Symbol
7 6 5 4 3 2 1 0
KRM
KRMn
Control of key interrupt mode
0
The key interrupt signal is not detected.
1
Detects key interrupt signals.
Note 1. The internal pull-up resistor can be used by setting the object bit of the pull-up resistor
register (PUx) of the key interrupt input pin to "1".
2. An interrupt occurs if the object position bit of the KRM register is entered low at the input pin of the key
interrupt. To ignore this interrupt, the KRM register must be set after the interrupt handling is disabled by the
interrupt masking flag. The interrupt request flag must then be cleared after waiting for the key interrupt input
to be low level width (tKR) (see data sheet) to allow interrupt handling.
3. Pins that are not used in key interrupt mode can be used as usual ports.
Remark 1. n=0~5
0
0
KRM5
KRM4
KRM3
KRM2
K RM1
KRM0

Table of Contents

Related product manuals