734
Chapter 19
CAN Controller (CAN)
Preliminary User’s Manual U17566EE1V2UM00
transmitted from the CAN module to the CAN bus even when a CAN bus error
is detected while receiving a message frame. Since no transmission can be
issued from the CAN module, the transmission error counter the CnERC.TEC7
to CnERC.TEC0 bits are never updated. Therefore, a CAN module in the
receive-only mode does not enter the bus-off state.
Furthermore, ACK is not returned to the CAN bus in this mode upon the valid
reception of a message frame. Internally, the local node recognizes that it has
transmitted ACK. An overload frame cannot be transmitted to the CAN bus.
Caution
If only two CAN nodes are connected to the CAN bus and one of them is
operating in the receive-only mode, there is no ACK on the CAN bus. Due to
the missing ACK, the transmitting node will transmit an active error flag, and
repeat transmitting a message frame. The transmitting node becomes error
passive after transmitting the message frame 16 times (assuming that the error
counter was 0 in the beginning and no other errors have occurred). When the
message frame is transmitted for the 17th time, the transmitting node
generates a passive error flag. The receiving node in the receive-only mode
detects the first valid message frame at this point, and the VALID bit is set to 1
for the first time.
19.14.2
Single-shot mode
In the single-shot mode, automatic re-transmission as defined in the CAN
protocol is switched off. (According to the CAN protocol, a message frame
transmission that has been aborted by either arbitration loss or error
occurrence has to be repeated without control by software.)
The single-shot mode disables the re-transmission of an aborted message
frame transmission according to the setting of the CnCTRL.AL bit. When the
AL bit is cleared to 0, re-transmission upon arbitration loss and upon error
occurrence is disabled. If the AL bit is set to 1, re-transmission upon error
occurrence is disabled, but re-transmission upon arbitration loss is enabled. As
a consequence, the CnMCTRLm.TRQ bit in a message buffer defined as a
transmit message buffer is cleared to 0 by the following events:
• Successful transmission of the message frame
• Arbitration loss while sending the message frame (AL bit = 0)
• Error occurrence while sending the message frame
The events arbitration loss and error occurrence can be distinguished by
checking the CnINTS.CINTS4 and CnINTS.CINTS3 bits, and the type of the
error can be identified by reading the CnLEC.LEC2 to CnLEC.LEC0 bits of the
register.
Upon successful transmission of the message frame, the transmit completion
interrupt the CINTS0 bit of the CnINTS register is set to 1. If the CnIE.CIE0 bit
is set to 1 at this time, an interrupt request signal is output.
The single-shot mode can be used when emulating time-triggered
communication methods (e.g., TTCAN level 1).
electronic components distributor