CAN Subsystem
44.3.11.1 Rx Buffer Handling
•
Reset interrupt flag IR.DRX
•
Read New Data registers
•
Read messages from Message RAM
•
Reset New Data flags of processed messages
44.3.12
Debug on CAN Support
Debug messages are stored into Rx Buffers. For debug handling three consecutive Rx
buffers (e.g.#61, #62, #63) have to be used for storage of debug messages A, B, and C.
The format is the same as for an Rx Buffer or an Rx FIFO element (see <Cross
Refs>Section 44.3.6.1, "Rx Buffer and FIFO element).
Advantage: Fixed start address for the DMA transfers (relative to RXBC.RBSA), no
additional configuration required.
For filtering of debug messages Standard / Extended Filter Elements with SFEC / EFEC =
"111" have to be set up. Messages matching these filter elements are stored into the Rx
Buffers addressed by SFID2 / EFID2[5:0].
After message C has been stored, the DMA request output m_can_dma_req is activated
and the three messages can be read from the Message RAM under DMA control. The RAM
words holding the debug messages will not be changed by the M_CAN while
m_can_dma_req is activated. The behavior is similar to that of an Rx Buffers with its New
Data flag set.
After the DMA has completed the DMA unit sets m_can_dma_ack. This resets
m_can_dma_req. Now the M_CAN is prepared to receive the next set of debug messages.
44.3.12.1 Filtering for Debug Messages
Filtering for debug messages is done by configuring one Standard / Extended Message ID
Filter Element for each of the three debug messages. To enable a filter element to filter for
debug messages SFEC / EFEC has to be programmed to "111". In this case fields SFID1 /
SFID2 and EFID1 / EFID2 have a different meaning. While SFID2 /EFID2[10:9] controls the
debug message handling state machine, SFID2 / EFID2[5:0] controls the location for
storage of a received debug message.
When a debug message is stored, neither the respective New Data flag nor IR.DRX are set.
The reception of debug messages can be monitored via RXF1S.DMS.
Filter Element
0
1
2
44.3.12.2 Debug Message Handling
The debug message handling state machine assures that debug messages are stored to
three consecutive Rx Buffers in correct order. In case of missing messages the process is
1068/2058
Table 576. Example Filter Configuration for debug messages
SFID1[10:0]
EFID1[28:0]
ID debug message A
ID debug message B
ID debug message C
DocID027809 Rev 4
SFID2[10:9]
SFID2[5:0]
EFID2[10:9]
EFID2[5:0]
01
11 1101
10
11 1110
11
11 1111
RM0400
Need help?
Do you have a question about the SPC572L series and is the answer not in the manual?
Questions and answers