Rainbow Electronics AT91CAP9S250A User Manual
Page 703

703
6264A–CAP–21-May-07
AT91CAP9S500A/AT91CAP9S250A
0 and mailbox 5 have the same priority and have a message to send at the same time, then
the message of the mailbox 0 is sent first.
Setting the MACR bit in the CAN_MCRx register aborts the transmission. Transmission for
several mailboxes can be aborted by writing MBx fields in the CAN_MACR register. If the
message is being sent when the abort command is set, then the application is notified by the
MRDY bit set and not the MABT in the CAN_MSRx register. Otherwise, if the message has
not been sent, then the MRDY and the MABT are set in the CAN_MSR register.
When the bus arbitration is lost by a mailbox message, the CAN controller tries to win the next
bus arbitration with the same message if this one still has the highest priority. Messages to be
sent are re-tried automatically until they win the bus arbitration. This feature can be disabled
by setting the bit DRPT in the CAN_MR register. In this case if the message was not sent the
first time it was transmitted to the CAN transceiver, it is automatically aborted. The MABT flag
is set in the CAN_MSRx register until the next transfer command.
shows three MBx message attempts being made (MRDY of MBx set to 0).
The first MBx message is sent, the second is aborted and the last one is trying to be aborted
but too late because it has already been transmitted to the CAN transceiver.
Figure 39-15. Transmitting Messages
39.7.3.3
Remote Frame Handling
Producer/consumer model is an efficient means of handling broadcasted messages. The push
model allows a producer to broadcast messages; the pull model allows a customer to ask for
messages.
MTCR
(CAN_MCRx)
MRDY
(CAN_MSRx)
CAN BUS
MBx message
Reading CAN_MSRx
Writing CAN_MDHx &
CAN_MDLx
MBx message
MACR
(CAN_MCRx)
Abort MBx message
Try to Abort MBx message
MABT
(CAN_MSRx)