XC886/888CLM
Controller Area Network (MultiCAN) Controller
User’s Manual
15-11
V1.3, 2010-02
MultiCAN, V1.0
15.1.3.4
CAN Frame Counter
Each CAN node is equipped with a frame counter which enables the counting of
transmitted/received CAN frames or helps obtain information on the time instant when a
frame has started to transmit or received by the CAN node. CAN frame counting/bit time
counting is performed by a 16-bit counter which is controlled by register NFCRx. Bit field
NFCRx.CFSEL defines the operation mode of the frame counter:
•
Frame Count Mode:
The frame counter is incremented after the successful transmission and/or reception
of a CAN frame. The incremented value is stored to the bit field NFCRx.CFC and
copied to the bit field MOIPRn.CFCVAL of the message object involved in the
transfer.
•
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 bit field NFCRx.CFC. After the successful transfer of the frame, the
captured value is copied to the bit field MOIPRn.CFCVAL of the message object
involved in the transfer.
•
Bit Timing Mode:
Used for baud rate detection and analysis of the bit timing (
15.1.3.5
CAN Node Interrupts
Each CAN node is equipped with four interrupt sources to generate an interrupt request
upon:
•
the successful transmission/reception of a frame
•
a CAN protocol error with a last error code
•
an alert condition occurs: 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 register MITR. Writing a 1 to bit n of bit field MITR.IT generates an
interrupt request signal on the corresponding interrupt output line CANSRCm. When
writing MITR.IT more than one bit can be set resulting in the activation of multiple
CANSRCm interrupt output lines at the same time.
*