CAN Module Configuration
1053
SPNU503C – March 2018
Copyright © 2018, Texas Instruments Incorporated
Controller Area Network (DCAN) Module
Step 1:
Enter “initialization mode” by setting the Init (Initialization) bit in the CAN Control Register.
While the Init bit is set, the message transfer from and to the CAN bus is stopped, and the status of the
CAN_TX output is recessive (high).
The CAN error counters are not updated. Setting the Init bit does not change any other configuration
register.
Also note that the CAN module is also in initialization mode on hardware reset and during Bus-Off.
Step 2:
Set the CCE (Configure Change Enable) bit in the CAN Control Register.
The access to the Bit Timing Register for the configuration of the Bit timing is enabled when both Init and
CCE bits in the CAN Control Register are set.
Step 3:
Wait for the Init bit to get set. This would make sure that the module has entered “Initialization
mode”.
Step 4:
Write the Bit-Timing values into the Bit-Timing Register (BTR).
Refer to
for BTR value calculation for a given bit-timing.
Step 5:
Clear the CCE bit followed by Init bit.
Step 6:
Wait for the Init bit to clear. This would make sure that the module has come out of “initialization
mode”.
After step 6 (Init bit cleared), the module will attempt a synchronization on the CAN bus, provided that the
BTR settings are meeting the CAN bus parameters.
NOTE:
The module would not come out of the “initialization mode” if any incorrect BTR values are
written in step 4.
23.4.2.2 Configuration of Message Objects
The whole Message RAM should be configured before putting the CAN into operation. All the message
objects are deactivated by default. The user should configure the message object that are to be used to a
particular identifier. The user can change the configuration of any message object or deactivate it when
required.
The message objects can be configured only through the Interface registers (IFx) and the CPU does not
have direct access to the message object (Message RAM) when DCAN is in operation.
To configure the message objects, the user must know about:
1. The message object structure (
)
2. The interface register set (IFx) (
NOTE:
The message objects initialization is independent of the bit-timing configuration procedure.