ESP32 CAN

PrashanthV
Posts: 1
Joined: Sun Oct 14, 2018 8:21 am

ESP32 CAN

Postby PrashanthV » Tue Oct 16, 2018 9:28 am

Hi All

For our application, we are using ESP32 as our central controller. We have designed a custom board around it. We require to communicate two such boards through CAN bus. In our design, we have used IFX1050G transciever chip along with ESP32 for CAN and are using the code https://github.com/miwagner/ESP32-Arduino-CAN.

Now we first checked the waveform using a logic analyser by connecting the TX and RX pin of esp32 dev board(not our custom board) and we were able to get the transmitted data properly. But when we used the same code on our custom boards, we are unable to receive any data on either of the boards, or on the logic analyser. On the logic analyser, the signal on TX pin is continuously high.

Has anyone encountered anything like this before? Dont know where we are going wrong.

Snipesy
Posts: 2
Joined: Sun Sep 16, 2018 5:29 pm

Re: ESP32 CAN

Postby Snipesy » Tue Oct 16, 2018 4:07 pm

Both ends of the CAN must be terminated using a 120 ohm resistor (or 180 ohm maybe, sometimes). I don't think that would cause the Tx to be stuck high but who knows.

Also read the datasheet of the transceiver. Make sure its not in sleep mode.



I use CAN alot on the ESP32s but never have I used the internal CAN. I think its way too untested of a system and should never be used for production. I recommend connecting something like an MCP2515 connected with SPI. Or even a second micrcontroller.

PeterR
Posts: 621
Joined: Mon Jun 04, 2018 2:47 pm

Re: ESP32 CAN

Postby PeterR » Fri Oct 19, 2018 9:46 am

I have used the ESP32 CAN. We are early in the design but I have clocked up >10 days stress testing back to back with an MCP2515 before moving on to other things. Only used two of our prototypes and an ESP32-EVB so far.

PS @ Snipesy
There is a driver but it has not yet been included in ESP IDF production release. I could not get Thomas' driver to work nor the Ardunio but the ESP32 IDF adaptation worked first time. Check my posts, I asked for help & think Sprite pointed me at the ESP trunk (which seems very solid to me).
& I also believe that IDF CAN should be fixed.

Who is online

Users browsing this forum: No registered users and 81 guests