Can Frame Counter; Can Node Interrupts - Infineon Technologies TC1728 User Manual

32-bit single-chip microcontroller
Table of Contents

Advertisement

20.3.5.4 CAN Frame Counter

Each CAN node is equipped with a frame counter that counts transmitted/received CAN
frames or obtains information about the time when a frame has been started to transmit
or be received by the CAN node. CAN frame counting/bit time counting is performed by
a 16-bit counter that is controlled by Node x Frame Counter Register NFCRx (see
Page
20-88). Bit field NFCRx.CFSEL determines the operation mode of the frame
counter:
Frame Count Mode:
After the successful transmission and/or reception of a CAN frame, the frame counter
is copied into the CFCVAL bit field of the MOIPRn register of the message object
involved in the transfer. Afterwards, the frame counter is incremented.
Time Stamp Mode:
The frame counter is incremented with the beginning of a new bit time. When the
transmission/reception of a frame starts, the value of the frame counter is captured
and stored to the CFC bit field of the NFCRx register. After the successful transfer of
the frame the captured value is copied to the CFCVAL bit field of the MOIPRn register
of the message object involved in the transfer.
Bit Timing Mode:
Used for baud rate detection and analysis of the bit timing

20.3.5.5 CAN Node Interrupts

Each CAN node has four hardware triggered interrupt request types that are able to
generate an interrupt request upon:
The successful transmission or reception of a frame
A CAN protocol error with a last error code
An alert condition: Transmit/receive error counters reach the warning limit, bus-off
state changes, a List Length Error occurs, or a List Object Error occurs
An overflow of the frame counter
Besides the hardware generated interrupts, software initiated interrupts can be
generated using the Module Interrupt Trigger Register MITR. Writing a 1 to bit n of bit
field MITR.IT generates an interrupt request signal on the corresponding interrupt output
line INT_On. When writing MITR.IT more than one bit can be set resulting in activation
of multiple INT_On interrupt output lines at the same time. See also
on Page 20-123
for further processing of the CAN node interrupts.
User's Manual
MultiCAN, V2.24
Controller Area Network Controller (MultiCAN)
20-25
TC1728
(Chapter
20.3.7.3).
"Interrupt Control"
V1.0, 2011-12

Advertisement

Table of Contents
loading

Table of Contents