660
Chapter 32 USART (LIN / FIFO)
7.USART Operation
■ USART as master device
Figure 7-15 USART LIN master flow chart
START
TIE = 0, RIE = 0
Send Message?
Y
N
Initialization:
Set Operat. mode 3
(8N1 data format)
Send Synch Break:
Send Sleep Mode?
Y
N
Send Identify Field:
TDR = Id
Write to slave?
Y
N
TIE = 0
RIE = 1
Read data from slave
RIE = 0
Write data to slave
TIE = 0
TIE = 1
Errors occurred?
Y
N
Error Handler
Send Sleep Mode
TDR = 0x80
Wake up
from CPU?
Y
N
RIE = 1
TIE = 0
0x00, 0x80,
or 0xC0
N
Y
RIE = 0
Send Wake up signal
RIE = 0
TIE = 1
TDR = 0x80
received?
write "1" to ECCR:
LBR; TIE = 1;
TDRE = 1
Transm. Interrupt
Send Synch Field:
TDR = 0x55