
CHAPTER 15 ASYNCHRONOUS SERIAL INTERFACE (UART)
User
’
s Manual U15862EJ3V0UD
460
15.6.4 Receive operation
The awaiting reception state is set by setting the UARTEn bit to 1 in the ASIMn register and then setting the RXEn
bit to 1 in the ASIMn register. To start the receive operation, first perform start bit detection. The start bit is detected
by sampling the RXDn pin. When the receive operation begins, serial data is stored sequentially in the reception shift
register according to the baud rate that was set. A reception completion interrupt (INTSRn) is generated each time
the reception of one frame of data is completed. Normally, the receive data is transferred from reception buffer
register n (RXBn) to memory by this interrupt servicing.
(1) Reception enabled state
The receive operation is set to the reception enabled state by setting the RXEn bit in the ASIMn register to 1.
RXEn bit = 1: Reception enabled state
RXEn bit = 0: Reception disabled state
In reception disabled state, the reception hardware stands by in the initial state. At this time, the contents of
reception buffer register n (RXBn) are retained, and no reception completion interrupt or reception error
interrupt is generated.
(2) Starting a receive operation
A receive operation is started by the detection of a start bit.
The RXDn pin is sampled using the serial clock from baud rate generator n (BRGn).
(3) Reception completion interrupt
When RXEn = 1 in the ASIMn register and the reception of one frame of data is completed (the stop bit is
detected), a reception completion interrupt (INTSRn) is generated and the receive data within the reception
shift register is transferred to RXBn at the same time.
Also, if an overrun error (OVEn bit = 1 in the asynchronous serial interface status register (ASISn)) occurs,
the receive data at that time is not transferred to reception buffer register n (RXBn), and either a reception
completion interrupt (INTSRn) or a reception error interrupt (INTSREn) is generated according to the ISRMn
bit setting in the ASIMn register.
Even if a parity error (PEn bit = 1 in the ASISn register) or framing error (FEn bit = 1 in the ASISn register)
occurs during a reception operation, the receive operation continues until stop bit is received, and after
reception is completed, either a reception completion interrupt (INTSRn) or a reception error interrupt
(INTSREn) is generated according to the ISRMn bit setting in the ASIMn register (the receive data within the
reception shift register is transferred to RXBn).
If the RXEn bit is reset (0) during a receive operation, the receive operation is immediately stopped. The
contents of reception buffer register n (RXBn) and of the asynchronous serial interface status register (ASISn)
at this time do not change, and no reception completion interrupt (INTSRn) or reception error interrupt
(INTSREn) is generated.
No reception completion interrupt is generated when RXEn = 0 (reception is disabled).