SAM3X8C Atmel Corporation, SAM3X8C Datasheet - Page 1222

no-image

SAM3X8C

Manufacturer Part Number
SAM3X8C
Description
Manufacturer
Atmel Corporation
Datasheets
40.8.2
1222
1222
SAM3X/A
SAM3X/A
CAN Controller Interrupt Handling
Figure 40-10. Possible Initialization Procedure
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 register.
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
• System interrupts
– Data registers in the mailbox object are available to the application. In Receive
– A sent transmission was aborted.
– Bus off interrupt: The CAN module enters the bus off state.
– Error passive interrupt: The CAN module enters Error Passive Mode.
– Error Active Mode: The CAN module is neither in Error Passive Mode nor in Bus Off
Mode, a new message was received. In Transmit Mode, a message was transmitted
successfully.
mode.
Configure a Mailbox in Reception Mode
Enable CAN Controller Interrupt Line
(ABM == 1 and CANEN == 1)
Enable CAN Controller Clock
(CAN_SR or CAN_MSRx)
ABM = 0 and CANEN = 0
CANEN = 1 (ABM == 0)
Change CAN_BR value
End of Initialization
Errors ?
(PMC)
(AIC)
No
Yes
11057A–ATARM–17-Feb-12
11057A–ATARM–17-Feb-12

Related parts for SAM3X8C