Rev. 1.10
120
November 04, 2019
Rev. 1.10
121
November 04, 2019
HT45F5Q-3
Battery Charger Flash MCU
HT45F5Q-3
Battery Charger Flash MCU
• UUSR Register
The UUSR register is the status register for the UART, which can be read by the program to
determine the present status of the UART. All flags within the UUSR register are read only. Further
explanation on each of the flags is given below:
Bit
7
6
5
4
3
2
1
0
Name
UPERR
UNF
UFERR
UOERR
URIDLE
URXIF
UTIDLE
UTXIF
R/W
R
R
R
R
R
R
R
R
POR
0
0
0
0
1
0
1
1
Bit 7
UPERR
: Parity error flag
0: No parity error is detected
1: Parity error is detected
The UPERR flag is the parity error flag. When this read only flag is “0”, it indicates a
parity error has not been detected. When the flag is “1”, it indicates that the parity of
the received word is incorrect. This error flag is applicable only if Parity mode (odd or
even) is selected. The flag can also be cleared by a software sequence which involves
a read to the status register UUSR followed by an access to the UTXR_RXR data
register.
Bit 6
UNF
: Noise flag
0: No noise is detected
1: Noise is detected
The UNF flag is the noise flag. When this read only flag is “0”, it indicates no noise
condition. When the flag is “1”, it indicates that the UART has detected noise on
the receiver input. The UNF flag is set during the same cycle as the URXIF flag but
will not be set in the case of as overrun. The UNF flag can be cleared by a software
sequence which will involve a read to the status register UUSR followed by an access
to the UTXR_RXR data register.
Bit 5
UFERR
: Framing error flag
0: No framing error is detected
1: Framing error is detected
The UFERR flag is the framing error flag. When this read only flag is “0”, it indicates
that there is no framing error. When the flag is “1”, it indicates that a framing error
has been detected for the current character. The flag can also be cleared by a software
sequence which will involve a read to the status register UUSR followed by an access
to the UTXR_RXR data register.
Bit 4
UOERR
: Overrun error flag
0: No overrun error is detected
1: Overrun error is detected
The UOERR flag is the overrun error flag which indicates when the receiver buffer has
overflowed. When this read only flag is “0”, it indicates that there is no overrun error.
When the flag is “1”, it indicates that an overrun error occurs which will inhibit further
transfers to the UTXR_RXR receive data register. The flag is cleared by a software
sequence, which is a read to the status register UUSR followed by an access to the
UTXR_RXR data register.
Bit 3
URIDLE
: Receiver status
0: Data reception is in progress (Data being received)
1: No data reception is in progress (Receiver is idle)
The URIDLE flag is the receiver status flag. When this read only flag is “0”, it
indicates that the receiver is between the initial detection of the start bit and the
completion of the stop bit. When the flag is “1”, it indicates that the receiver is idle.
Between the completion of the stop bit and the detection of the next start bit, the
URIDLE bit is “1” indicating that the UART receiver is idle and the RX pin stays in
logic high condition.