Datasheet

Table Of Contents
Byte Data Link
MC9S12DP256 — Revision 1.1
Byte Data Link Controller Module
Step 2: When TDRE
is Indicated, Write
the Next Byte into
the DLCBDR
When a TDRE state is reflected in the BSVR, the CPU writes the next
byte to be transmitted into the BDR. This step is repeated until the last
byte to be transmitted is written to the DLCBDR.
NOTE:
Due to the design and operation of the BDLC, when transmitting a
message the user may write two, or possibly even three of the bytes to
be transmitted into the DLCBDR before the first RDRF interrupt occurs.
For this reason, the user should never use receive interrupts to control
the sequencing of bytes to be transmitted.
Step 3: Write the
Last Byte to the
DLCBDR and Set
TEOD
Once the user has written the last byte to be transmitted into the
DLCBDR, the user then sets the TEOD bit in DLCBCR2. When the
TEOD bit is set, once the byte written to the DLCBDR is transmitted onto
the bus, the BDLC will begin transmitting the 8-bit CRC byte, as
specified in SAE J1850. Following the CRC byte, the BDLC will transmit
an EOD symbol onto the SAE J1850 bus, indicating that this part of the
message has been completed. If no IFR bytes are transmitted following
the EOD, an EOF will be recognized and the message will be complete.
Setting the TEOD bit is the last step the CPU needs to take to complete
the message transmission, and no further transmission-related
interrupts will occur. Once the message has been completely received
by the BDLC, an EOF interrupt will be generated. However, this is
technically a receive function which can be handled by the message
reception routine.
NOTE:
While the TEOD bit is typically set immediately following the write of the
last byte to the BDR, it is also acceptable to wait until a TDRE interrupt
is generated before setting the TEOD bit. While the example flowchart in
Figure 129 shows the TEOD bit being set after the write to the BDR,
either method is correct. If a TDRE interrupt is pending, it will be cleared
when the TEOD bit is set.
Transmitting
Exceptions
While this is the basic transmit flow, at times the message transmit
process will be interrupted. This can be due to a loss of arbitration to a
higher priority message or due to an error being detected on the
Freescale Semiconductor, I
Freescale Semiconductor, Inc.
For More Information On This Product,
Go to: www.freescale.com
nc...