![background image](http://html1.mh-extra.com/html/texas-instruments/tms320x281-series/tms320x281-series_reference-manual_1095203055.webp)
2.18 Timer Management Unit
2.18.1 Time Stamp Functions
www.ti.com
Timer Management Unit
Several functions are implemented in the eCAN to monitor the time when messages are
transmitted/received. A separate state machine is included in the eCAN to handle the time-control
functions. This state machine has lower priority when accessing the registers than the CAN state machine
has. Therefore, the time-control functions may be delayed by other ongoing actions.
To get an indication of the time of reception or transmission of a message, a free-running 32-bit timer
(TSC) is implemented in the module. Its content is written into the time stamp register of the
corresponding mailbox (Message Object Time Stamp [MOTS]) when a received message is stored or a
message has been transmitted.
The counter is driven from the bit clock of the CAN bus line. The timer is stopped during the initialization
mode or if the module is in sleep or suspend mode. After power-up reset, the free-running counter is
cleared.
The most significant bit of the TSC register is cleared by writing a 1 to TCC (CANMC.14). The TSC
register can also be cleared when mailbox 16 transmitted or received (depending on the setting of
CANMD.16 bit) a message successfully. This is enabled by setting the MBCC bit (CANMC.15). Therefore,
it is possible to use mailbox 16 for global time synchronization of the network. The CPU can read and
write the counter.
Overflow of the counter is detected by the TSC-counter-overflow-interrupt flag (TCOF
n
-CANGIF
n
.16). An
overflow occurs when the highest bit of the TSC counter changes to 1. Therefore, the CPU has enough
time to handle this situation.
SPRU074F – May 2002 – Revised January 2009
eCAN Registers
55