Download Print this page

Espressif ESP32 Technical Reference Manual page 560

Hide thumbs Also See for ESP32:

Advertisement

21 Two-wire Automotive Interface (TWAI)
• If
TWAI_ERR_ST
= 0 and
old value set by
TWAI_ERR_WARNING_LIMIT_REG
21.5.3.4 Data Overrun Interrupt (DOI)
The Data Overrun Interrupt (DOI) is triggered when the message being read is overrun and invalid.
The DOI is only triggered on the first message that causes the Receive FIFO to overrun (i.e., the transition from
the Receive FIFO not being full to the Receive FIFO overrunning). Any subsequent overrun messages will not
trigger the DOI again. The DOI will only be able to trigger again when all received messages (valid or overrun)
have been cleared.
21.5.3.5 Error Passive Interrupt (TXI)
The Error Passive Interrupt (EPI) is triggered whenever the TWAI controller transitions from Error Active to Error
Passive, or vice versa.
21.5.3.6 Arbitration Lost Interrupt (ALI)
The Arbitration Lost Interrupt (ALI) is triggered whenever the TWAI controller is attempting to transmit a message
and loses arbitration. The bit position where the TWAI controller lost arbitration is automatically recorded in
Arbitration Lost Capture register
Capture register will no longer record new bit location until it is cleared (via a read from the CPU).
21.5.3.7 Bus Error Interrupt (BEI)
The Bus Error Interrupt (BEI) is triggered whenever TWAI controller observes an error on the TWAI bus. When
a bus error occurs, the Bus Error type and its bit position are automatically recorded in the Error Code Capture
register (TWAI_ERR_CODE_CAP_REG). When the BEI occurs again, the Error Code Capture register will no longer
record new error information until it is cleared (via a read from the CPU).
21.5.4 Transmit and Receive Buffers
21.5.4.1 Overview of Buffers
Table 21-8. Buffer Layout for Standard Frame Format and Extended Frame Format
Standard Frame Format (SFF)
TWAI address
0x40
0x44
0x48
0x4c
0x50
0x54
0x58
0x5c
0x60
Espressif Systems
TWAI_BUS_OFF_ST
= 1: The TWAI controller's TEC has dropped below the thresh-
(TWAI_ARB LOST
CAP_REG). When the ALI occurs again, the Arbitration Lost
Content
TX/RX frame information
TX/RX identifier 1
TX/RX identifier 2
TX/RX data byte 1
TX/RX data byte 2
TX/RX data byte 3
TX/RX data byte 4
TX/RX data byte 5
TX/RX data byte 6
Submit Documentation Feedback
during BUS_OFF recovery.
Extended Frame Format (EFF)
TWAI address
Content
0x40
TX/RX frame information
0x44
TX/RX identifier 1
0x48
TX/RX identifier 2
0x4c
TX/RX identifier 3
0x50
TX/RX identifier 4
0x54
TX/RX data byte 1
0x58
TX/RX data byte 2
0x5c
TX/RX data byte 3
0x60
TX/RX data byte 4
560
ESP32 TRM (Version 5.2)

Advertisement

loading
Need help?

Need help?

Do you have a question about the ESP32 and is the answer not in the manual?