661
Chapter 32 USART (LIN / FIFO)
7.USART Operation
■ USART as slave device
Figure 7-16 USART LIN slave flow chart (part1)
START
Initialization:
Set Operat. mode 3
(8N1 data format)
waiting
Awaiting message
LBD = 1
LIN break interrupt
A
A
Errors occurred?
Y
N
Y
N
0x80 received?
(sleep mode)
B
B
Y
N
Slave address
match?
C
C
RIE = 0; LBIE = 1; RXE = 0
Y
N
Master wants to
send data?
Receive data
+ checksum
RIE = 0
TIE = 1
Calculate
checksum
Send data
TIE = 0
C
Errors occurred?
Y
N
C
Error handler
C
E
continued next page
S
(on next page)
(slave
action)
from LIN master.
Write "0" to LBD
waiting
(slave
action)
to clear interrupt.
waiting
(slave
action)
ICU -
E
Enable ICU inter-
rupt (both edges)
ICU -
Interrupt
Read ICU value
and store it.
Clear Interrupt.
Read ICU value.
Calculate new
baud rate.
Set it to Reload
Counter.
Clear Interrupt.
Interrupt
waiting
action)
(slave
Wait for Bus Idle
RBI -
Interrupt
BIE = 1
Receive Indenti-
fier.
RIE = 1,
RXE = 1