Datasheet
768
32117D–AVR-01/12
AT32UC3C
According to the CAN specification, a channel can be in error active, error passive or bus off
state. The bus state can be read in the CANFC.EMODE field:
This state depends on both transmit and receive counters value (TEC/REC), also available in
the CANFC register (see CAN specification for more details).
29.6.2.5 Wake-up mode
In this mode the CAN channel is a wake-up source for the CPU. Detection of a falling edge on
the CAN bus is interpreted as the start of frame (SOF) bit of the wake-up frame and will wake the
CPU.
In order to use this mode, execute the following steps:
– Disable CAN channel by writing CANCTRL.CEN to zero
– Wait for channel disabled (CANSR.CES is cleared)
– Enable wake-up mode by writing CANCTRL.WKEN to one
– Optionally mask wake-up interrupt source by writing CANIMR.WKUPIM
– Enter sleep mode, stopping PB and CAN clocks
–Sleep
– Wake-up frame is detected, CANISR.WKUP is set and CPU is woken-up
– Clear CANISR.WKUP by writing it to zero
– Disable wake-up mode and enable CAN channel
Note 1: when channel is disabled PB registers are not cleared, user can resume current applica-
tion by enabling channel again.
Note 2: wake-up frame cannot be received. Moreover next frames cannot be received until CPU
is woken-up. Wake-up time depends on sleep modes (see sleep modes section).
29.6.3 Message Handling
29.6.3.1 Message object structure
Message Objects (MOb) are message descriptors, used to store and handle CAN frames. User
configures and gets status of MObs via user interface registers and writing and reading frames
into allocated RAM space (Section 29.6.1.5).
MObs are independent and are allocated to one channel.
Table 29-3. Bus State Coding
EMODE State
0 error active state
1 error passive state
2 or 3 bus off state