Datasheet
506
6120F–ATARM–03-Oct-06
AT91SAM7X512/256/128 Preliminary
The CAN controller can start listening to the network in Autobaud Mode. In this case, the error
counters are locked and a mailbox may be configured in Receive Mode. By scanning error
flags, the CAN_BR register values synchronized with the network. Once no error has been
detected, the application disables the Autobaud Mode, clearing the ABM field in the CAN_MR
register.
Figure 36-10. Possible Initialization Procedure
36.7.2 CAN Controller Interrupt Handling
There are two different types of interrupts. One type of interrupt is a message-object related
interrupt, the other is a system interrupt that handles errors or system-related interrupt
sources.
All interrupt sources can be masked by writing the corresponding field in the CAN_IDR regis-
ter. They can be unmasked by writing to the CAN_IER register. After a power-up reset, all
interrupt sources are disabled (masked). The current mask status can be checked by reading
the CAN_IMR register.
The CAN_SR register gives all interrupt source states.
The following events may initiate one of the two interrupts:
• Message object interrupt
– Data registers in the mailbox object are available to the application. In Receive
Mode, a new message was received. In Transmit Mode, a message was
transmitted successfully.
– A sent transmission was aborted.
Errors ?
No
Yes
(ABM == 1 and CANEN == 1)
CANEN = 1 (ABM == 0)
ABM = 0 and CANEN = 0
(CAN_SR or CAN_MSRx)
Change CAN_BR value
End of Initialization
Configure a Mailbox in Reception Mode
Enable CAN Controller Interrupt Line
Enable CAN Controller Clock
(AIC)
(PMC)