Interrupts And Status Flags - NXP Semiconductors MC9S08SU16 Reference Manual

Table of Contents

Advertisement

Chapter 22 Serial Communications Interface (SCI)
22.5.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.

22.5.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.
MC9S08SU16 Reference Manual, Rev. 5, 4/2017
NXP Semiconductors
415

Advertisement

Table of Contents
loading

This manual is also suitable for:

Mc9s08su16vfkMc9s08su8vfk

Table of Contents