ESP32 CAN/TWAI using IDF V5.1.1

Ezra_Krause
Posts: 1
Joined: Fri Sep 22, 2023 6:11 am

ESP32 CAN/TWAI using IDF V5.1.1

Postby Ezra_Krause » Fri Sep 22, 2023 6:20 am

Hi

I've spent quite a few years on different embedded platforms, but I am new to the ESP32 platform.

I am trying to get CAN/TWAI running on my esp32 device. I have tried using both an ESP32C6 and ESP32S3, but cannot get the TX line to communicate. It remains high. The same goes for the RX line. I pretty much have tried everything I can think of.

I have verified that my CAN transceiver is operational. I am using the TWAI example project provided by the IDF in vsCode.

Any assistance would be appreciated!

Regards
Ezra

DrMickeyLauer
Posts: 168
Joined: Sun May 22, 2022 2:42 pm

Re: ESP32 CAN/TWAI using IDF V5.1.1

Postby DrMickeyLauer » Fri Sep 29, 2023 1:17 pm

Seems to work fine here on both chips. Perhaps an incompatibility with your transceiver? Which one are you using?

ESP_Dazz
Posts: 308
Joined: Fri Jun 02, 2017 6:50 am

Re: ESP32 CAN/TWAI using IDF V5.1.1

Postby ESP_Dazz » Fri Sep 29, 2023 5:00 pm

@Ezra_Krause A couple of pointers

- Double check which GPIOs you are using and whether they are Input and/or output capable (see Datasheet for list of GPIOs and their capabilities/restrictions)
- Try running the self-test example without the transceiver to see if it's an issue with the GPIOs

Who is online

Users browsing this forum: No registered users and 107 guests