14.4.3.2.2 Address-mark wakeup
When wake is set, the receiver is configured for address-mark wakeup. In this mode,
SCI_C2[RWU] is cleared automatically when the receiver detects a, or two, if
SCI_BDH[SBNS] = 1, logic 1 in the most significant bits of a received character, eighth
bit when SCI_C1[M] is cleared and ninth bit when SCI_C1[M] is set.
Address-mark wakeup allows messages to contain idle characters, but requires the msb
be reserved for use in address frames. The one, or two, if SCI_BDH[SBNS] = 1, logic 1s
msb of an address frame clears the SCI_C2[RWU] bit before the stop bits are received
and sets the SCI_S1[RDRF] flag. In this case, the character with the msb set is received
even though the receiver was sleeping during most of this character time.
14.4.4 Interrupts and status flags
The SCI system has three separate interrupt vectors to reduce the amount of software
needed to isolate the cause of the interrupt.
One interrupt vector is associated with the transmitter for SCI_S1[TDRE] and
SCI_S1[TC] events. Another interrupt vector is associated with the receiver for RDRF,
IDLE, RXEDGIF, and LBKDIF events. A third vector is used for OR, NF, FE, and PF
error conditions. Each of these ten interrupt sources can be separately masked by local
interrupt enable masks. The flags can be polled by software when the local masks are
cleared to disable generation of hardware interrupt requests.
The SCI transmitter has two status flags that can optionally generate hardware interrupt
requests. Transmit data register empty (SCI_S1[TDRE]) indicates when there is room in
the transmit data buffer to write another transmit character to SCI_D. If the transmit
interrupt enable (SCI_C2[TIE]) bit is set, a hardware interrupt is requested when
SCI_S1[TDRE] is set. Transmit complete (SCI_S1[TC]) indicates that the transmitter is
finished transmitting all data, preamble, and break characters and is idle with TxD at the
inactive level. This flag is often used in systems with modems to determine when it is
safe to turn off the modem. If the transmit complete interrupt enable (SCI_C2[TCIE]) bit
is set, a hardware interrupt is requested when SCI_S1[TC] is set. Instead of hardware
interrupts, software polling may be used to monitor the SCI_S1[TDRE] and SCI_S1[TC]
status flags if the corresponding SCI_C2[TIE] or SCI_C2[TCIE] local interrupt masks
are cleared.
When a program detects that the receive data register is full (SCI_S1[RDRF] = 1), it gets
the data from the receive data register by reading SCI_D. The SCI_S1[RDRF] flag is
cleared by reading SCI_S1 while SCI_S1[RDRF] is set and then reading SCI_D.
Functional description
MC9S08PA4 Reference Manual, Rev. 5, 08/2017
288
NXP Semiconductors
Summary of Contents for MC9S08PA4
Page 1: ...MC9S08PA4 Reference Manual Supports MC9S08PA4 Document Number MC9S08PA4RM Rev 5 08 2017 ...
Page 2: ...MC9S08PA4 Reference Manual Rev 5 08 2017 2 NXP Semiconductors ...
Page 22: ...MC9S08PA4 Reference Manual Rev 5 08 2017 22 NXP Semiconductors ...
Page 28: ...System clock distribution MC9S08PA4 Reference Manual Rev 5 08 2017 28 NXP Semiconductors ...
Page 150: ...Port data registers MC9S08PA4 Reference Manual Rev 5 08 2017 150 NXP Semiconductors ...
Page 196: ...Human machine interfaces HMI MC9S08PA4 Reference Manual Rev 5 08 2017 196 NXP Semiconductors ...
Page 224: ...Instruction Set Summary MC9S08PA4 Reference Manual Rev 5 08 2017 224 NXP Semiconductors ...
Page 232: ...Functional Description MC9S08PA4 Reference Manual Rev 5 08 2017 232 NXP Semiconductors ...
Page 258: ...FTM Interrupts MC9S08PA4 Reference Manual Rev 5 08 2017 258 NXP Semiconductors ...
Page 294: ...Functional description MC9S08PA4 Reference Manual Rev 5 08 2017 294 NXP Semiconductors ...
Page 398: ...Resets MC9S08PA4 Reference Manual Rev 5 08 2017 398 NXP Semiconductors ...
Page 400: ...MC9S08PA4 Reference Manual Rev 5 08 2017 400 NXP Semiconductors ...