ESP32 CAN Bus Pinout

Pak00_ESP
Posts: 3
Joined: Wed Dec 16, 2020 4:27 pm

ESP32 CAN Bus Pinout

Postby Pak00_ESP » Thu Dec 17, 2020 7:43 am

Hi,

I designed custom board using ESP32-WROOM-32D. I can't find information on which pins I can put the CAN bus. Are there specific pins assigned to the CAN bus ?

Thank you very much!

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

Re: ESP32 CAN Bus Pinout

Postby ESP_Dazz » Thu Dec 17, 2020 9:29 am

Pak00_ESP wrote: Hi,

I designed custom board using ESP32-WROOM-32D. I can't find information on which pins I can put the CAN bus. Are there specific pins assigned to the CAN bus ?

Thank you very much!
No, there are no specific pins for TWAI/CAN. All the of TWAI/CAN signals (e.g., TX, RX, CLKOUT, BUS_OFF) are routed through the GPIO matrix, thus you are able to select which pin you want to assign for each of those signals via the driver configuration. The current CAN examples default the TX and RX signal to GPIOs 21 and 22 respectively on the ESP32, with CLKOUT and BUS_OFF being left unused). But you are free to change them to the pins of your choosing. Just make sure you pick an Input capable pin for RX and output capable pin for TX.

Note that you'll need to hook up the TX and RX signal to an external CAN transceiver.

Who is online

Users browsing this forum: Majestic-12 [Bot] and 109 guests