LIN Master Software Description
Data Flow
DRM047 — Rev 0
Designer Reference Manual
MOTOROLA
LIN Master Software Description
43
The meanings of the variables above and below the bubbles are
described in
Section 7.7. Programming and Configuration
excluding
LIN_SleepWakeReq
.
5.2.3 Loop1/Loop2 Priority Selector
If there is a request to communicate via the LIN-bus (
LIN_RunStopReq
),
the Loop1 timer (ECT channel1 output compare register) is set
according to the value of
periodeSend_Loop1
. That determinates the
next LIN communication time. The Loop2 timer (ECT channel2 output
compare register) is set in the same way (
periodeSend_Loop2
) but only
if the Loop2 is enabled (
enableLoop2
). Whenever the ECT channel1 or
channel2 interrupt arises, the priority of the service routine executing
(
Send and Receive LIN messages
) is resolved. Loop1 has the main
priority. If a Loop2 interrupt arises, the time remaining to the Loop1 timer
interrupt request is calculated. If it is recognized that the remaining time
is greater or equal to the time needed to service the Loop2 service
routine, then this process is enabled. In the opposite event, the task is
deferred. Then, as soon as the Loop1 request is satisfied, it immediately
services the Loop2 communication request. Note that there is one
exception to this rule; i.e. when the time between Loop1 timer interrupts
is always shorter than the time needed to service communication
initialized by Loop2. Then the frames of both loops follow each other with
minimal distances between them. The distance is determined by the
program flow delay, and the distance is negligible in comparison to the
time needed to transmit one LIN frame. Those states are indicated by a
note on the LIN-bus Control page. The page and the variables
mentioned in this subsection are described in
.
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
.
..