Functional Description
23.3.13 Debug/Suspend Mode
The module supports the usage of an external debug unit by providing functions like pausing DCAN
activities and making message RAM content accessible via OCP interface.
Before entering debug/suspend mode, the circuit will either wait until a started transmission or reception
will be finished and bus idle state is recognized, or immediately interrupt a current transmission or
reception. This is depending on bit IDS in the CAN control register.
Afterwards, the DCAN enters debug/suspend mode, indicated by InitDbg flag in the CAN control register.
During debug/suspend mode, all DCAN registers can be accessed. Reading reserved bits will return ‘0’.
Writing to reserved bits will have no effect.
Also, the message RAM will be memory mapped. This allows the external debug unit to read the message
RAM. For the memory organization, see
NOTE:
During debug/suspend mode, the message RAM cannot be accessed via the IFx register
sets.
NOTE:
Writing to control registers in debug/suspend mode may influence the CAN state machine
and further message handling.
For debug support, the auto clear functionality of the following DCAN registers is disabled:
•
Error and status register (clear of status flags by read)
•
IF1/IF2 command registers (clear of DMAActive flag by read/write)
23.3.14 Configuration of Message Objects
The whole message RAM should be configured before the end of the initialization, however it is also
possible to change the configuration of message objects during CAN communication.
The CAN software driver library should offer subroutines that:
•
Transfer a complete message structure into a message object. (Configuration)
•
Transfer the data bytes of a message into a message object and set TxRqst and NewDat. (Start a new
transmission)
•
Get the data bytes of a message from a message object and clear NewDat (and IntPnd). (Read
received data)
•
Get the complete message from a message object and clear NewDat (and IntPnd). (Read a received
message, including identifier, from a message object with UMask = ‘1’)
Parameters of the subroutines are the Message Number and a pointer to a complete message structure or
to the data bytes of a message structure.
Two examples of assigning the IFx interface register sets to these subroutines are shown here:
In the first method, the tasks of the application program that may access the module are divided into two
groups. Each group is restricted to the use of one of the interface register sets. The tasks of one group
may interrupt tasks of the other group, but not of the same group.
In the second method, which may be a special case of the first method, there are only two tasks in the
application program that access the module. A Read_Message task that uses IF2 or IF3 to get received
messages from the message RAM and a Write_Message task that uses IF1 to write messages to be
transmitted (or to be configured) into the message RAM. Both tasks may interrupt each other.
3899
SPRUH73H – October 2011 – Revised April 2013
Controller Area Network (CAN)
Copyright © 2011–2013, Texas Instruments Incorporated