Datasheet
505
6120F–ATARM–03-Oct-06
AT91SAM7X512/256/128 Preliminary
To disable Low-power Mode, the software application must:
– Enable the CAN Controller clock. This is done by programming the Power
Management Controller (PMC).
– Clear the LPM field in the CAN_MR register
The CAN controller synchronizes itself with the bus activity by checking for eleven consecutive
“recessive” bits. Once synchronized, the WAKEUP signal in the CAN_SR register is set.
Depending on the corresponding mask in the CAN_IMR register, an interrupt is generated
while WAKEUP is set. The SLEEP signal in the CAN_SR register is automatically cleared
once WAKEUP is set. WAKEUP signal is automatically cleared once SLEEP is set.
If no message is being sent on the bus, then the CAN controller is able to send a message
eleven bit times after disabling Low-power Mode.
If there is bus activity when Low-power mode is disabled, the CAN controller is synchronized
with the bus activity in the next interframe. The previous message is lost (see Figure 36-9).
Figure 36-9. Disabling Low-power Mode
36.7 Functional Description
36.7.1 CAN Controller Initialization
After power-up reset, the CAN controller is disabled. The CAN controller clock must be acti-
vated by the Power Management Controller (PMC) and the CAN controller interrupt line must
be enabled by the interrupt controller (AIC).
The CAN controller must be initialized with the CAN network parameters. The CAN_BR regis-
ter defines the sampling point in the bit time period. CAN_BR must be set before the CAN
controller is enabled by setting the CANEN field in the CAN_MR register.
The CAN controller is enabled by setting the CANEN flag in the CAN_MR register. At this
stage, the internal CAN controller state machine is reset, error counters are reset to 0, error
flags are reset to 0.
Once the CAN controller is enabled, bus synchronization is done automatically by scanning
eleven recessive bits. The WAKEUP bit in the CAN_SR register is automatically set to 1 when
the CAN controller is synchronized (WAKEUP and SLEEP are stuck at 0 after a reset).
SLEEP
(CAN_SR)
MRDY
(CAN_MSRx)
LPM
(CAN_MR)
CAN BUS
Bus Activity Detected
Message x
Interframe synchronization
WAKEUP
(CAN_SR)
Message lost