RL78/G11 UART Reception in STOP Mode Using Middle-speed On-chip Oscillator IAR
R01AN3634EJ0100 Rev.1.00 Page 82 of 85
Feb. 15, 2017
5.9.23 UART0 reception complete processing
Figure5.29 shows the flowchart for UART0 reception complete processing.
r_uart0_callback_receiveend
Clear UART0 reception error flag
Uart0 reception complete
return
g_uart0rxerr ← 0
g_uart0rxend ← 1
LED1 / LED2 OFF
P3 register
P33, P31 bit ← 1B:Output 1
Figure 5.29 UART0 Reception Complete Processing
5.9.24 UART0 error interrupt function
Figure5.30 shows the flowchart for the UART0 error interrupt function.
r_uart0_interrupt_error
Read reception data and set to variable
Read error flag
UART0 reception error processing
r_uart0_callback_error()
Clear error flag
return
err_type ← (uint8_t)(SSR01 & 0x0007U)
*gp_uart0_rx_address ← RXD0
SIR01 ← (uint16_t)err_type
Figure 5.30 UART0 Error Interrupt Function