TC1796
Peripheral Units (Vol. 2 of 2)
Controller Area Network (MultiCAN) Controller
User’s Manual
22-148
V2.0, 2007-07
MultiCAN, V2.0
22.7
TTCAN Operation
22.7.1
Configuration
After a reset operation, the TTCAN extension must be configured. The Configuration
Mode is entered automatically after reset or can be initiated through software by writing
TTFMR.CFGMEL = 01
B
. The Configuration Mode can be left only by software by writing
TTFMR.CFGMEL = 10
B
. The status flag TTSR.CFGM indicates whether or not the
Configuration Mode is active. This flag is automatically set when the corresponding CAN
node turns off its clock (disable request).
In Configuration Mode of the TTCAN node (CAN node 0 in TC1796), the following
actions must be performed, as indicated, by software or hardware:
For all nodes:
•
The local time, the global time, and the cycle time are set to 0 (hardware).
•
Transmission or reception of messages of TTCAN node is not possible, because the
results of the acceptance filtering are not enabled (hardware).
•
An appropriate TUR value must be written to bit field TURR.TURADJ (software). This
value is automatically transferred to TURR.TUR (hardware).
•
The scheduler memory entries must be initialized (software).
•
The TTCAN control information (ID of reference message, etc.) and the TTCAN node
itself must be set up completely and enabled for CAN message transfer (software).
•
After the complete configuration (software), TTFMR.CFGMEL must be set to 10
B
(software).
•
The local time starts after leaving the Configuration Mode (hardware).
•
The synchronization phase is entered automatically when the Configuration Mode is
left (hardware). This is indicated by bit field TTSR.SYNCS = 01
B
(hardware).
•
For time masters, the transmission of the reference messages is scheduled as in a
gap while the TTCAN node is in the “synchronizing” state. The scheduler entries
RME with GM = 1 are taken into account only while the TTCAN node is in the “in
schedule” state.
•
For time masters and for time slaves, the scheduler entries BCE with GM = 1 are
taken into account only while the TTCAN node is in the “in schedule” state.
22.7.2
Configuration Error
During the scheduler actions, some conditions lead to a configuration error:
•
At the end of a basic cycle, a merged arbitration window is still open.
•
An RME entry is found for a slave device.
•
No time mark is found during instruction collection.
•
An RCE, ICE, TCE or ARBE has been found before TME1
(after start or at the end of a basic cycle).