Datasheet

Table Of Contents
Figure 39-4. Pin Control in Loop Back Modes
CAN_TX CAN_RX CAN_TX CAN_RX
TX
HANDLER
RX
HANDLER
TX
HANDLER
RX
HANDLER
CAN CAN
External Loop Back Mode Internal Loop Back Mode
=1
39.6.3 Timestamp Generation
For timestamp generation the CAN supplies a 16-bit wrap-around counter. A prescaler TSCC.TCP can be
configured to clock the counter in multiples of CAN bit times (1…16). The counter is readable via
TSCV.TSC. A write access to register TSCV resets the counter to zero. When the timestamp counter
wraps around interrupt flag IR.TSW is set.
On start of frame reception / transmission the counter value is captured and stored into the timestamp
section of an Rx Buffer / Rx FIFO (RXTS[15:0]) or Tx Event FIFO (TXTS[15:0]) element.
39.6.4 Timeout Counter
To signal timeout conditions for Rx FIFO 0, Rx FIFO 1, and the Tx Event FIFO the CAN supplies a 16-bit
Timeout Counter. It operates as down-counter and uses the same prescaler controlled by TSCC.TCP as
the Timestamp Counter. The Timeout Counter is configured via register TOCC. The actual counter value
can be read from TOCV.TOC. The Timeout Counter can only be started while CCCR.INIT = ‘0’. It is
stopped when CCCR.INIT = ‘1’, e.g. when the CAN enters Bus_Off state.
The operation mode is selected by TOCC.TOS. When operating in Continuous Mode, the counter starts
when CCCR.INIT is reset. A write to TOCV presets the counter to the value configured by TOCC.TOP
and continues down-counting.
When the Timeout Counter is controlled by one of the FIFOs, an empty FIFO presets the counter to the
value configured by TOCC.TOP. Down-counting is started when the first FIFO element is stored. Writing
to TOCV has no effect.
When the counter reaches zero, interrupt flag IR.TOO is set. In Continuous Mode, the counter is
immediately restarted at TOCC.TOP.
Note: The clock signal for the Timeout Counter is derived from the CAN Core’s sample point signal.
Therefore the point in time where the Timeout Counter is decremented may vary due to the
synchronization / re-synchronization mechanism of the CAN Core. If the baud rate switch feature in CAN
FD is used, the timeout counter is clocked differently in arbitration and data field.
39.6.5 Rx Handling
The Rx Handler controls the acceptance filtering, the transfer of received messages to the Rx Buffers or
to one of the two Rx FIFOs, as well as the Rx FIFO’s Put and Get Indices.
SAM D5x/E5x Family Data Sheet
CAN - Control Area Network
© 2019 Microchip Technology Inc.
Datasheet
DS60001507E-page 1213