21 Two-wire Automotive Interface (TWAI)
Data/Remote Frames
DLC
Data Bytes
CRC Sequence
CRC Delim
ACK Slot
ACK Delim
EOF
21.3.2.2 Error and Overload Frames
Error Frames
Error Frames are transmitted when a node detects a Bus Error. Error Frames notably consist of an Error Flag
which is made up of 6 consecutive bits of the same value, thus violating the bit-stuffing rule. Therefore, when
a particular node detects a Bus Error and transmits an Error Frame, all other nodes will then detect a Stuff Error
and transmit their own Error Frames in response. This has the effect of propagating the detection of a Bus Error
across all nodes on the bus. When a node detects a Bus Error, it will transmit an Error Frame starting on the next
bit. However, if the type of Bus Error was a CRC Error, then the Error Frame will start at the bit following the ACK
Delim (see Section 21.3.3). The following Figure
Error Frame
Error Flag
Espressif Systems
Description
The DLC (Data Length Code) is 4-bits and should have a value from 0 to 8.
Data Frames use the DLC to indicate the number data bytes in the Data Frame.
Remote Frames used the DLC to indicate the number of data bytes to request
from another node.
The data payload of Data Frames. The number of bytes should match the value
of DLC. Data byte 0 is transmitted first, and each data byte is transmitted most
significant bit first.
The CRC sequence is a 15-bit cyclic redundancy code.
The CRC Delim (CRC Delimeter) is a single Recessive bit that follows the CRC
sequence.
The ACK Slot (Acknowledgment Slot) that intended for Receiver nodes to indi-
cate that the Data or Remote Frame was received without issue. The Transmit-
ter node will send a Recessive bit in the ACK Slot and Receiver nodes should
override the ACK Slot with a Dominant bit if the frame was received without
errors.
The ACK Delim (Acknowledgment Delimeter) is a single Recessive bit.
The EOF (End of Frame) marks the end of a Data or Remote Frame, and consists
of seven Recessive bits.
21-2
Figure 21-2. Various Fields of an Error Frame
Table 21-2. Error Frame
Description
The Error Flag has two forms, the Active Error Flag consisting of 6 Dom-
inant bits and the Passive Error Flag consisting of 6 Recessive bits (un-
less overridden by Dominant bits of other nodes). Active Error Flags are
sent by Error Active nodes, whilst Passive Error Flags are sent by Error
Passive nodes.
Submit Documentation Feedback
shows the various fields of an Error Frame:
549
ESP32 TRM (Version 5.2)
Need help?
Do you have a question about the ESP32 and is the answer not in the manual?