
Rev. 1.20
138
November 20, 2019
Rev. 1.20
139
November 20, 2019
HT66F2740
12V High Current Flash MCU
HT66F2740
12V High Current Flash MCU
Bit 4
UMD
: UART mode selection bit
0: SPI or I
2
C mode
1: UART mode
This bit is used to select the UART mode. When this bit is cleared to zero, the actual
SPI or I
2
C mode can be selected using the SIM2~SIM0 bits. Note that the UMD bit
must be cleared to zero for SPI or I
2
C mode.
Bit 3~2
SIMDEB1~SIMDEB0
: I
2
C Debounce Time Selection
Refer to the I
2
C register section.
Bit 1
SIMEN
: USIM SPI/I
2
C Enable Control
This bit is only available when the USIM is configured to operate in an SPI or I
2
C
mode with the UMD bit cleared to zero. Refer to the SPI or I
2
C register section for
more details.
Bit 0
SIMICF
: USIM SPI Incomplete Flag
Refer to the SPI register section.
• 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.