Datasheet

11.5.4 KBI Initialization
When a keyboard interrupt pin is first enabled, it is possible to get a false keyboard
interrupt flag. To prevent a false interrupt request during keyboard initialization, the user
should do the following:
1. Mask keyboard interrupts by clearing KBIx_SC[KBIE].
2. Enable the KBI polarity by setting the appropriate KBIx_ES[KBEDGn] bits.
3. Before using internal pullup resistors, configure the associated bits in PORT_PTxPE.
4. Enable the KBI pins by setting the appropriate KBIx_PE[KBIPEn] bits.
5. Write to KBIx_SC[KBACK] to clear any false interrupts.
6. Set KBIx_SC[KBIE] to enable interrupts.
Chapter 11 Keyboard Interrupts (KBI)
MC9S08PA60 Reference Manual, Rev. 1, 9/2012
Freescale Semiconductor, Inc. 285