Asynchronous Serial Ports (UARTs)
13-20
Am186™CC/CH/CU Microcontrollers User’s Manual
13.5.7
Break Detection and Generation
The UARTs support detection of break characters. A
break is defined as a constant Low
signal on the receive data line for one frame time or greater. This is reported as a zero
character with the framing error (FER) and break (BRK) status bits set in the (H)SPSTAT
register. (A
framing error is the detection of a Low signal during the stop bit time.)
When a break is being transmitted, it only affects the output on the TXD signal; it does not
affect the timing of the transmit section of the serial port. In other words, the transmitter
can be used to time the break by setting the BRK bit when the transmitter is empty
(TEMT=1), writing the transmit register with data, then waiting until the TEMT bit is set
again before resetting the BRK bit.
Note: The transmitter can only be used to time the break if hardware flow control is disabled.
If flow control is enabled, setting the BRK bit will still force the TXD line Low, but the receiving
device may deassert the CTS input, inhibiting the clocking out of the character in the transmit
data register.
The microcontroller also supports timing of idle frames (TXD signal High) through use of a
software configurable bit (BRKVAL in the HSPCON1 register), which controls whether to
hold the TXD line High or Low when a break is being transmitted.
Receive status information is reported at the end of the frame time. Figure 13-10 provides
an example data stream (assuming no parity, 8 data bits, one stop bit).
Figure 13-10 Break Character Example
In this stream, the leading 1’s are assumed to be an idle indication on the line. The first
Low bit is interpreted as the start bit of a frame, resulting in the first frame consisting of the
stream “0 0100 0000 0”, including start and stop bits. This is reported as a 02h character
with a framing error. The stop bit for the first frame also acts as the start bit for the next
frame, which is “0 0000 0000 0”. This is reported as a 00h character with a framing error
and a break character (the BRK bit is set to 1). Low bits following a break are ignored until
the line returns to the High state. Therefore, the next frame would be “0 0000 0000 1”, which
is a 00h character with no error status.
11111 0 0100 0000 0 0000 0000 0 001111 0 0000 0000 1 111111
line start
bit
data bits stop
and
idle
frame 1
start
bit
data bits stop
bit
frame 2
line
idle
(sets break)
sign.
frame 3
Содержание Am186 CC
Страница 1: ...Am186 CC CH CU Microcontrollers User s Manual Order 21914B...
Страница 4: ...iv Am186 CC CH CU Microcontrollers User s Manual...
Страница 18: ...Table of Contents xviii Am186 CC CH CU Microcontrollers User s Manual...
Страница 24: ...Introduction xxiv Am186 CC CH CU Microcontrollers User s Manual...
Страница 39: ...Architectural Overview Am186 CC CH CU Microcontrollers User s Manual 1 15 Figure 1 6 32 Channel Linecard CH CC...
Страница 40: ...Architectural Overview 1 16 Am186 CC CH CU Microcontrollers User s Manual...
Страница 86: ...System Overview 3 36 Am186 CC CH CU Microcontrollers User s Manual...
Страница 92: ...Emulator Support 4 6 Am186 CC CH CU Microcontrollers User s Manual...
Страница 112: ...DRAM Controller 6 8 Am186 CC CH CU Microcontrollers User s Manual...
Страница 134: ...Interrupts 7 22 Am186 CC CH CU Microcontrollers User s Manual...
Страница 186: ...Programmable I O Signals 9 8 Am186 CC CH CU Microcontrollers User s Manual...
Страница 200: ...Watchdog Timer 11 6 Am186 CC CH CU Microcontrollers User s Manual...
Страница 232: ...Asynchronous Serial Ports UARTs 13 24 Am186 CC CH CU Microcontrollers User s Manual...
Страница 242: ...Synchronous Serial Port SSI 14 10 Am186 CC CH CU Microcontrollers User s Manual...
Страница 264: ...High Level Data Link Control HDLC 15 22 Am186 CC CH CU Microcontrollers User s Manual...
Страница 332: ...Universal Serial Bus USB 18 34 Am186 CC CH CU Microcontrollers User s Manual...
Страница 348: ...Register Summary A 16 Am186 CC CH CU Microcontrollers User s Manual...
Страница 376: ...Index Index 18 Am186 CC CH CU Microcontrollers User s Manual...