English
Language : 

MC68HC908QL4 Datasheet, PDF (158/226 Pages) Motorola, Inc – Microcontrollers
Slave LIN Interface Controller (SLIC) Module
data bytes will fit in the buffer and only one interrupt should occur. At this time, the final interrupt may be
handled normally, continuing to use the software counter to read the proper number of bytes from the
appropriate SLCD registers.
NOTE
Do not write SLCDLC more than one time per LIN message frame. The
SLIC tracks the number of sent or received bytes based on the value written
to this register at the beginning of the data field and rewriting this register
will corrupt the checksum calculation and cause unpredictable behavior in
the SLIC module. The application software must track the number of sent
or received bytes to know what the current byte count in the SLIC is. If
programming in C, make sure to use the VOLATILE modifier on this
variable (or make it a global variable) to ensure that it keeps its value
between interrupts.
14.9.8.3 Possible Errors on Command Message Data
Possible errors on command message data are:
• Byte Framing Error
• Checksum-Error (LIN specified error)
• No-Bus-Activity (LIN specified error)
• Receiver Buffer Overrun Error
14.9.9 Handling Request LIN Message Frames
Figure 14-17 shows how to handle request message frames, where the SLIC module is sending data to
the master node.
Request message frames refer to LIN messages frames where the master node is “requesting” the slave
node to supply information. The implication is that the slave will then be transmitting data to the master
for this message frame. This can be a standard LIN message frame of 1–8 data bytes, a reserved LIN
system message (using 0x3D identifier), or an extended request message frame utilizing the reserved
0x3E identifier or perhaps the 0x3F LIN reserved extended identifier. The SLIC module is capable of
handling request message frames containing up to 64 bytes of data, while still automatically calculating
and/or verifying the checksum.
14.9.9.1 Standard Request Message Frames
Dealing with request messages with the SLIC is very similar to dealing with command messages, with
one important difference. Because the SLIC is now to be transmitting data in the LIN message frame, the
user software must load the data to be transmitted into the message buffer prior to initiating the
transmission. This means an extra step is taken inside the interrupt service routine after the identifier has
been decoded and is determined to be an ID for a request message frame.
Figure 14-17 deals with request messages, where the SLIC will be transmitting data to the master node.
If the received identifier corresponds to a standard LIN command frame (i.e., 1-8 data bytes), the
message processing is very simple. The user must load the data to be transmitted into the transmit buffer
by writing it to the SLCD registers. The first byte to be transmitted on the LIN bus must be loaded into
SLCD0, then SLCD1 for the second byte, etc. After all of the bytes to be transmitted are loaded in this
way, a single write to SLCDLC will allow the user to encode the number of data bytes to be transmitted
(1–8 bytes for standard request frames), set the proper checksum calculation method for the data
MC68HC908QL4 Data Sheet, Rev. 7
158
Freescale Semiconductor