Datasheet
765
32117D–AVR-01/12
AT32UC3C
The bit duration is given by the formula:
Tbit = (PRS + PHS1 + PHS2 + 4) x (PRES + 1) x
PGCLK_CANIF
Note: PRES should not be set to 0, therefore CAN clock is at least divided by 2.
29.6.1.2 Sampling method
Bits are sampled between PHASE_SEG1 and PHASE_SEG2. By writing the Sampling Method
bit (CANCFG.SM) to one, three samples are taken and a majority vote is performed.
Figure 29-3. Sampling by Majority Voting
Majority voting must not be used when the Prescaler field (CANCFG.PRES) is equal to zero.
29.6.1.3 Operating modes
CANIF has three operating modes, selectable by the Channel Mode field (CANCFG.CMODE):
– Normal mode (CANCFG.CMODE=00)
Default mode, TX and RX lines are connected to the transceiver. This mode is used
to communicate with other nodes on the bus.
– Listening mode (CANCFG.CMODE=01)
The TX line is disconnected from the transceiver. The CAN channel cannot send any
message nor acknowledge when a message has been received. The channel is in
Error Passive mode and Transmit/Receive Error Counters (TEC/REC) are frozen.
This mode is used to listen to CAN bus.
– Loop back mode (CANCFG.CMODE=10)
The TX line is internally connected to the RX line and disconnected from the
transceiver. The CAN channel can only send messages or acknowledges to itself.
The channel is in Error Passive mode and TEC/REC are frozen. This mode is used
to detect the bit rate of the CAN bus by successive configuration of bit timing.
29.6.1.4 Overrun mode
When Overrun Mode is disabled, the MOb is disabled after successfully receiving a message.
This prevents overwriting the received message if a second message is received. Overrun Mode
is disabled by writing a zero to CANCFG.OVRM. Overrun Mode is disabled by default.
PHASE_SEG2 [1..8]TQ PHS2 + 1
Prescaler [2..32] PRES + 1
Sync Jump Width [1..4] SJW + 1
Table 29-2. CAN Parameter Settings
Parameter Range CANCFG field
PHASE_SEG1 PHASE_SEG2
S1 S2 SP
CAN clock
Bit
Samples