Information

2010 Microchip Technology Inc. DS80496C-page 9
PIC18F2480/2580/4480/4580
10. Module: ECAN Technology
Under specific conditions, the TXBnSIDH register
of the pending message for transmission may be
corrupted. This occurs when the following
conditions exist:
A transmit message is pending.
All of the receive buffers are full and a received
message is in the Message Assembly Buffer
(MAB).
A receive buffer is made available (RXFUL
(RXBxCON<7>) set to ‘0’) at either of the
following times:
- When a Start-of-Frame (SOF) is recognized
on the CAN bus
- On the instruction cycle prior to the SOF
The timing of this event is crucial.
Work around
Ensure that a receive buffer overflow condition
does not occur and/or ensure that a transmit
request is not pending if a receive buffer
overflow condition does exist.
The pseudo code segment in Example 4 is an
example of how to disable a pending transmission.
This code is for illustration purposes only.
Affected Silicon Revisions
EXAMPLE 4: DISABLING A PENDING TRANSMISSION
A1 B0 B2
X
If (RXBnOVFL == 1) // Has an overflow occurred?
{ If (TXREQ == 1) // Is a transmission pending?
{ TXREQ = 0; // Clear transmit request
If (TXABT == 1) // Store transmission aborted status value
MyFlag = 1;
}
}
Temp_RXREG = RXBx; // Read receive buffer
If (MyFlag) // Was previous transmission aborted?
{ TXREQ = 1; // Set transmit request
MyFlag = 0; // Reset stored transmission aborted status
}