MPC5200B Users Guide, Rev. 1
20-32 Freescale Semiconductor
Functional Description
Similar to a loss of arbitration, if any error (except a CRC error) is detected on the SAE J1850 bus during a transmission, the BDLC
module will stop transmitting immediately. The byte which was being transmitted will be discarded, and the “Symbol Invalid or
Out of Range” status will be reflected in the BDLC State Vector Register. As with the loss of arbitration, if the TEOD bit was set,
it will be cleared automatically, and any attempt to transmit the same message will have to start from the beginning.
If a CRC error occurs following a transmission, this will also be reflected in the BDLC State Vector Register. However, since the
CRC error is really a receive error based on the received CRC byte, at this point all bytes of the message will have been transmitted.
It is therefore up to the user’s software to determine if another attempt should be made to transmit the message in which the error
occurred.
Transmitter Underrun
A transmitter underrun can occur when a TDRE interrupt is not serviced in a timely fashion. If the last byte loaded into the BDLC
Data Register is completely transmitted onto the network before the next byte is loaded into the BDLC Data Register, a transmitter
underrun will occur. If this does happen, the BDLC module will transmit two additional logic ones to ensure that the partial message
which was transmitted onto the bus does not end on a byte boundary. This will be followed by an EOD and EOF symbol. The only
indication to the CPU that an underrun occurred is the Symbol Invalid or Out of Range error which will be indicated in the BDLC
State Vector Register. As with the other errors, it is up to the user’s software to determine if another transmission attempt should be
made.
In-Frame Response to a Transmitted Message
If an In-Frame Response (IFR) is received following the transmission of a message, the status indicating that an IFR byte has been
received will be indicated in the BDLC State Vector Register before an EOF is indicated. Refer to Section 20.8.7, Re ceiving An
In-Frame Response (IFR) for a description of how to handle the reception of IFR bytes.
20.8.4.3 Aborting a Transmission
The BDLC module does not have a mechanism designed specifically for aborting a transmission. Since the module transmits each message
on a byte-by-byte basis, there is little need to implement an abort mechanism. If the user has loaded a byte into the BDLC Data Register to
initiate a message transmission and decides to send a different message, the byte in the BDLC Data Register can be replaced, right up to the
point that the message transmission begins.
If the user has loaded a byte into the BDLC Data Register and then decides not to send any message at all, the user can let the byte transmit,
and when the TDRE interrupt occurs let the transmitter underrun. This will cause two extra logic ones followed by an EOF to be transmitted.
While this method may require a small amount of bus bandwidth, the need to do this should be very rare. Replacing the byte originally written
to the BDLC Data Register with $FF will also increase the probability of the transmitter losing arbitration if another node begins transmitting
at the same time, also reducing the bus bandwidth needed.