Datasheet for CAN bus

vincalvo
Posts: 2
Joined: Mon Apr 19, 2021 3:07 pm

Datasheet for CAN bus

Postby vincalvo » Mon Apr 19, 2021 3:18 pm

Hi there,

I am wondering why the CAN bus does not feature in the datasheet?
There is a question here on the forum that dates back to 2016 saying that it was coming.

Are you commited to CAN bus or is it a way to be able to deprecate it? Or is it known that it is buggy in any way?

CAN bus is a requirement for me and I am wondering if it is better to use a SPI version?
Thanks for letting me know.

Vince

ESP_Sprite
Posts: 9764
Joined: Thu Nov 26, 2015 4:08 am

Re: Datasheet for CAN bus

Postby ESP_Sprite » Tue Apr 20, 2021 2:09 am

It's a legal thing. If you want a protocol that speaks ISO 11898-3 (which is commonly refered to as 'CAN') look for the TWAI peripheral in any of the ESP32s.

WiFive
Posts: 3529
Joined: Tue Dec 01, 2015 7:35 am

Re: Datasheet for CAN bus

Postby WiFive » Tue Apr 20, 2021 5:20 am

There are bugs in the twai peripheral and they have been addressed in recent esp-idf commits

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

Re: Datasheet for CAN bus

Postby PeterR » Tue Apr 20, 2021 5:16 pm

Wifi, Do you have the commit details? I should check that all issues have been addressed.

There were at least 2 errors. (1) The driver would lock failed after overflow, reboot being the only recovery. Try switching interrupts off for 100mS and you will see. (2) Corrupt data getting through. I could force this issue by toggling the termination resistor.

I have used the patches for 6 months+ & I think them good.
My application uses CAN data for a display and so a glitch would only cause a display artifact. I added 'braces' protection to the patch's 'belt', strings being strings, ranges etc. No user reports so guess fixed. Unfortunately was not able to add stress tests to the backlog (accountants!).

Looks like I might have to change my signature, which would be great!
& I also believe that IDF CAN should be fixed.

vincalvo
Posts: 2
Joined: Mon Apr 19, 2021 3:07 pm

Re: Datasheet for CAN bus

Postby vincalvo » Tue Apr 20, 2021 6:05 pm

Ok !!! Thanks wifive, that makes sense.
Thank you all for the feedback on the libs. I will have a closer look soon.

WiFive
Posts: 3529
Joined: Tue Dec 01, 2015 7:35 am

Re: Datasheet for CAN bus

Postby WiFive » Tue Apr 20, 2021 6:31 pm

PeterR wrote:
Tue Apr 20, 2021 5:16 pm
Wifi, Do you have the commit details? I should check that all issues have been addressed.

There were at least 2 errors. (1) The driver would lock failed after overflow, reboot being the only recovery. Try switching interrupts off for 100mS and you will see. (2) Corrupt data getting through. I could force this issue by toggling the termination resistor.

I have used the patches for 6 months+ & I think them good.
My application uses CAN data for a display and so a glitch would only cause a display artifact. I added 'braces' protection to the patch's 'belt', strings being strings, ranges etc. No user reports so guess fixed. Unfortunately was not able to add stress tests to the backlog (accountants!).

Looks like I might have to change my signature, which would be great!
https://github.com/espressif/esp-idf/co ... 9b86d26e00

RidgeRacer
Posts: 1
Joined: Tue Feb 15, 2022 5:05 pm

Re: Datasheet for CAN bus

Postby RidgeRacer » Tue Feb 15, 2022 5:15 pm

The ESP32 CAN internal registers and operation behave just like a Phillips SJA1000 CAN Controller. I have successfully used the SJA1000 datasheet to develop ESP32 CAN Bus apps.

Who is online

Users browsing this forum: No registered users and 125 guests