LIN Master Software Description
State Machine
DRM047 — Rev 0
Designer Reference Manual
MOTOROLA
LIN Master Software Description
41
Figure 5-1. Software State Diagram
5.1.4 Master Mode Initialize
Performs:
•
Turn on LIN supply voltage
•
Initialize LIN driver (including initialization of SCI0 and ECT
channel0)
•
Set up ECT channel1 (Loop1 timing) as an output compare
•
Enable ECT channel1 output compare interrupt
•
Set all program flow control and state variables
MCU Init
Reset
Mode
Selection
Mode Init
Mode
Init
Mode
Init
Mode Init
Control LIN communication
according to change of variables
by means of PC master
Reload
variables
Run
PC master
Recorder
Send
Sleep/Wake-up
LIN frames
Send/Receive
Programming and
Configuration
frames
Enable
Periode timing
interrupts
Wait for
Periode timing
interrupt
Send/Receive
LIN frames
Send/Receive
LIN frames
Wait for
Periode timing
interrupts
Exchange data
between RS232 and
Debug line
Exchange data
between RS232 and LIN
Timer Channel 3
Interrupt
PC master Interrupt
Programming and
Configuration
request
Run request
Sleep/Wake
request
PC master
mode
Master
mode
Debug
mode
Pass
mode
F
re
e
sc
a
le
S
e
m
ic
o
n
d
u
c
to
r,
I
Freescale Semiconductor, Inc.
For More Information On This Product,
Go to: www.freescale.com
n
c
.
..