ESP32-C3 TWAI transmit error

Acuario
Posts: 17
Joined: Mon Apr 04, 2016 11:21 am

ESP32-C3 TWAI transmit error

Postby Acuario » Thu Mar 06, 2025 7:27 am

Hi,
I have an ESP32-C3 SuperMini and I am trying to get the TWAI interface working.
I am using GPIO6 for TX and GPIO5 for RX and they are connected to a TAJ1050.
I can receive CAN messages without problems but when I try to send a message:
err = twai_transmit(&data_message, pdMS_TO_TICKS(1000));
the function returns an error 0X103
The alert reports an error of 0x3100
-TWAI controller has become error passive
-Bus-off condition occurred. TWAI controller can no longer influence bus
-One of the error counters have exceeded the error warning limit

Any idea what is happening? I have the same code running without problems on an ESP32 and ESP32S3

Thanks

Acuario
Posts: 17
Joined: Mon Apr 04, 2016 11:21 am

Re: ESP32-C3 TWAI transmit error

Postby Acuario » Thu Mar 06, 2025 8:45 am

Now having tested some more I discovered that terminating the CAN bus with a 120R resistor on the device I was testing was causing the problem.
Removing the terminator has solved the problem.
Strange it only affected this device and only on transmit.

Who is online

Users browsing this forum: No registered users and 3 guests