130
MC95FG308 / MC95FG208
ABOV Semiconductor Co., Ltd.
11.7.8.4
Disabling Transmitter
Disabling the Transmitter by clearing the TXE bit will not become effective until ongoing transmission is completed.
When the Transmitter is disabled, the TXD pin is used as normal General Purpose I/O (GPIO) or primary function pin.
11.7.9 USART Receiver
The USART Receiver is enabled by setting the RXE bit in the UCTRLx1 register. When the Receiver is enabled, the
normal pin operation of the RXD pin is overridden by the USART as the serial input pin of the Receiver. The baud-rate,
mode of operation and frame format must be set before serial reception. If synchronous or SPI operation is used, the
clock on the XCK pin will be used as transfer clock. If USART operates in SPI mode, SS pin is used as SS input pin in
slave mode or can be configured as SS output pin in master mode. This can be done by setting SPISS bit in
UCTRLx3 register.
11.7.9.1
Receiving Rx data
When USART is in synchronous or asynchronous operation mode, the Receiver starts data reception when it detects
a valid start bit (LOW) on RXD pin. Each bit after start bit is sampled at pre-defined baud-rate (asynchronous) or
sampling edge of XCK (synchronous), and shifted into the receive shift register until the first stop bit of a frame is
received. Even if there’s 2nd stop bit in the frame, the 2nd stop bit is ignored by the Receiver. That is, receiving the first
stop bit means that a complete serial frame is present in the receiver shift register and contents of the shift register are
to be moved into the receive buffer. The receive buffer is read by reading the UDATAx register.
If 9-bit characters are used (USIZE[2:0] = 7) the ninth bit is stored in the RX8 bit position in the UCTRLx3 register. The
9th bit must be read from the RX8 bit before reading the low 8 bits from the UDATAx register. Likewise, the error flags
FE, DOR, PE must be read before reading the data from UDATAx register. This is because the error flags are stored in
the same FIFO position of the receive buffer.
11.7.9.2
Receiver flag and interrupt
The USART Receiver has one flag that indicates the Receiver state.
The Receive Complete (RXC) flag indicates whether there are unread data present in the receive buffer. This flag is
set when there are unread data in the receive buffer and cleared when the receive buffer is empty. If the Receiver is
disabled (RXE=0), the receiver buffer is flushed and the RXC flag is cleared.
When the Receive Complete Interrupt Enable (RXCIE) bit in the UCTRLx2 register is set and Global Interrupt is
enabled, the USART Receiver Complete Interrupt is generated while RXC flag is set.
The USART Receiver has three error flags which are Frame Error (FE), Data OverRun (DOR) and Parity Error (PE).
These error flags can be read from the USTATx register. As data received are stored in the 2-level receive buffer,
these error flags are also stored in the same position of receive buffer. So, before reading received data from UDATAx
register, read the USTATx register first which contains error flags.
Содержание MC95FG208 Series
Страница 14: ...14 MC95FG308 MC95FG208 ABOV Semiconductor Co Ltd 4 Package Diagram Figure 4 1 32 Pin SOP Package...
Страница 15: ...15 MC95FG308 MC95FG208 ABOV Semiconductor Co Ltd Figure 4 2 32 Pin QFN Package...
Страница 16: ...16 MC95FG308 MC95FG208 ABOV Semiconductor Co Ltd Figure 4 3 32 Pin LQFP Package...
Страница 17: ...17 MC95FG308 MC95FG208 ABOV Semiconductor Co Ltd Figure 4 4 28 Pin SOP Package...
Страница 18: ...18 MC95FG308 MC95FG208 ABOV Semiconductor Co Ltd Figure 4 5 28 Pin SOP Package continue...
Страница 19: ...19 MC95FG308 MC95FG208 ABOV Semiconductor Co Ltd Figure 4 6 28 Pin SOP Package...
Страница 20: ...20 MC95FG308 MC95FG208 ABOV Semiconductor Co Ltd Figure 4 7 28 Pin TSSOP Package...
Страница 21: ...21 MC95FG308 MC95FG208 ABOV Semiconductor Co Ltd Figure 4 8 20 Pin SOP Package...
Страница 22: ...22 MC95FG308 MC95FG208 ABOV Semiconductor Co Ltd Figure 4 9 20 Pin TSSOP Package...
Страница 23: ...23 MC95FG308 MC95FG208 ABOV Semiconductor Co Ltd Figure 4 10 16 Pin SOP Package...
Страница 24: ...24 MC95FG308 MC95FG208 ABOV Semiconductor Co Ltd Figure 4 11 16 Pin TSSOP Package...