16.3.10.2 RX Timeout
A receiver timeout function can be implemented by using the RX end of frame to start comparator 1 and look for the RX start bit RXACT
to disable the comparator. See
Table 16.10 USART Application Settings for USARTn_TIMING and USARTn_TIMECMPn on page 476
for details on setting up this example. As long as the next RX start bit occurs before the counter reaches the comparator 1 value
TCMPVAL1, the interrupt will not get set. In this example the RX Timeout was set to 8 baud-times. To get an RX timeout larger than 256
baud-times, RESTART1EN in USARTn_TIMER can used to restart the counter when it reaches TCMPVAL1. By setting TCMPVAL1 in
USARTn_TIMING to 0xFF, an interrupt will be generated after 256 baud-times. An interrupt service routine can then increment a memo-
ry location until the desired timeout is reached. Once the RX start bit is detected, comparator 1 will be disabled. If TIMERRESTARTED
in USARTn_STATUS is clear, the TCMP1 interrupt is the first interrupt after RXEOF.
RX
RX
RECEIVER TIMEOUT
TCMPnINT
Figure 16.28. USART RX Timeout
16.3.10.3 Break Detect
LIN bus and half-duplex UARTs can take advantage of the timer configured for break detection where RX is held low for a number of
baud-times to indicate a break condition.
Table 16.10 USART Application Settings for USARTn_TIMING and USARTn_TIMECMPn on
shows the settings for this mode. Each time RX is active (default of low) such as for a start bit, the timer begins counting. If
the counter reaches 12 baud-times before RX goes to inactive RXACTN (default of high), an interrupt is asserted.
RX
BREAK DETECT
TCMPnINT
Figure 16.29. USART Break Detection
EFM32JG1 Reference Manual
USART - Universal Synchronous Asynchronous Receiver/Transmitter
silabs.com
| Smart. Connected. Energy-friendly.
Preliminary Rev. 0.6 | 478