Datasheet

Key Wakeups
MC68HC812A4 Data Sheet, Rev. 7
98 Freescale Semiconductor
9.2.12 Port J Key Wakeup Flag Register
Read: Anytime
Write: Anytime
Each flag gets set by an active edge on the associated input pin. This could be a rising or falling edge
based on the state of the KPOLJ register. To clear the flag, write 1 to the corresponding bit in KWIFJ.
Initialize this register after initializing KPOLJ so that illegal flags can be cleared.
KWIFJ7–KWIFJ0 — Key Wakeup Port J Flags
1 = An active edge on the associated bit has occurred. An interrupt occurs if the associated enable
bit is set.
0 = An active edge on the associated bit has not occurred.
9.2.13 Port J Key Wakeup Polarity Register
Read: Anytime
Write: Anytime
It is best to clear the flags after initializing this register because changing the polarity of a bit can cause
the associated flag to set.
KPOLJ7–KPOLJ0 — Key Wakeup Port J Polarity Select Bits
1 = Rising edge on the associated port J pin sets the associated flag bit in the KWIFJ register.
0 = Falling edge on the associated port J pin sets the associated flag bit in the KWIFJ register.
Address: $002B
Bit 7654321Bit 0
Read:
KWIFJ7 KWIFJ6 KWIFJ5 KWIFJ4 KWIFJ3 KWIFJ2 KWIFJ1 KWIFJ0
Write:
Reset:00000000
Figure 9-12. Port J Key Wakeup Flag Register (KWIFJ)
Address: $002C
Bit 7654321Bit 0
Read:
KPOLJ7 KPOLJ6 KPOLJ5 KPOLJ4 KPOLJ3 KPOLJ2 KPOLJ1 KPOLJ0
Write:
Reset:00000000
Figure 9-13. Port J Key Wakeup Polarity Register (KPOLJ)