UG-1262
Rev. B | Page 258 of 312
Similarly, for 0x7F (0b01111111, the ASCII DEL value delete key), COMACR, Bits[6:4] = 1 and COMACR, Bits[11:8] = 3 to count
between the first rising edge and the second rising edge. Automatic baud rate must be disabled to clear the internal counter and
reenabled for another sequence (if required). Based on the UART baud rate configuration, the ABD result can be calculated as follows:
CNT, Bits[19:0] =
CountedBits
× 2
OSR
+ 2 ×
COMDIV
× (
COMFBR, Bits[12:11]
+
COMFBR, Bits[10:0]
/2048)
where:
CountedBits
is the effective number of bits between an active starting edge and ending edge. It is determined by the application code on
the selected edges and character used for ABD.
COMDIV
is calculated as follows:
If CNT, Bits[19:0] < 8 × CountedBits, then OSR = 0, COMDIV = 1, and COMFBR, Bits[10:0] = 512 × CNT, Bits[19:0]/CountedBits − 2048.
If CNT, Bits[19:0] < 16 × CountedBits, then OSR = 1, COMDIV = 1, and COMFBR, Bits[10:0] = 256 × CNT, Bits[19:0]/CountedBits − 2048.
If CNT, Bits[19:0] < 32 × CountedBits, then OSR = 2, COMDIV = 1, and COMFBR, Bits[10:0] = 128 × CNT, Bits[19:0]/CountedBits − 2048.
If CNT, Bits[19:0] ≥ 32 ×
CountedBits, then OSR = 3.
If CNT, Bits[19:0] is exactly divided by 32 × CountedBits, then COMDIV = (CNT, Bits[19:0]/32)/CountedBits.
Otherwise, COMDIV = 2log
2
((CNT[19:0]/32)/CountedBits) and COMFBR, Bits[10:0] = (((64 × CNT, Bits[19:0])/COMDIV)/
CountedBits) − 2048.
To reduce truncation error, the DIVM field (COMFBR, Bits[12:11]) is set to 1. The DIV field (COMDIV, Bits[15:0]) is set to the nearest
power of 2. COMASRH, Bits[7:0] and COMASRL, Bits[15:4] make up CNT, Bits[19:0].
Clock Gating
The clock driving the UART logic is automatically gated off when idle, and not accessed. This automatic clock gating cannot be disabled
by COMCTL, Bit 1.
UART and Power-Down Modes
Complete ongoing UART transfers before powering down the chip into hibernate mode. Alternatively, disable the UART by clearing the
COMDIV register to 0x0000 before placing the device into hibernation. If hibernate mode is selected while a UART transfer is on, the
transfer does not continue on a return from hibernation. All the intermediate data, states, and status logic in the UART are cleared.
However, the transmit pad (UART_SOUT) remains active in the hibernate mode while transmitting. After hibernation, the UART can
be enabled by setting the COMDIV register, if previously cleared. If DMA mode is needed, COMIEN, Bits[5:4] must be configured.
Table 319 details registers retained through hibernate mode. All other registers and internal logic are cleared by a hardware default value.
Table 319. Registers Retained Through Hibernate Mode
Register Affected
Bits
COMIEN ELSI,
ERBFI
COMLCR
BRK, SP, EPS, PEN, WLS
COMFCR
RFTRIG, FDMAMD, FIFOEN
COMFBR FBEN,
DIVM,
DIVN
COMDIV DIV
COMLCR2 OSR
COMCTL RXINV,
FORCECLKON
COMRSC
DISTX, DISRX, OENSP, OENP
Recommendations for UART Receive Wake-Up from Hibernate Mode
If the UART receive input is used to wake the
from hibernate mode, keep in mind that the UART block, along with the rest
of the
chip, requires 10 μs settling time after the first falling edge of the UART wake-up byte. This delay means that the first
UART receive byte may not be read correctly by the
, especially with UART baud rates ≥ 57,600.
For reliable exit of hibernate mode via the UART receive pin, perform one of the two following actions:
Ensure that the wake-up character received by the
is a break byte. On receiving a break byte, the
UART
sets the break indicator status flag in the COMLSR, Bit 4 register. This flag generates an interrupt.
low for a period ≤1 μs. This setting triggers the UART wake-up. After ≥10 μs, normal UART communications
can proceed.