ESP internal CAN

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

ESP internal CAN

Postby PeterR » Wed Sep 05, 2018 3:15 pm

Hi,
I am attempting to get the internal CAN running.
I am using https://github.com/ThomasBarth/ESP32-CAN-Driver with pins TX:5, RX: 4
I have also tried with an ESP32-EVB and TX:5, RX:35

Hooking probes onto GPIO_NUM_4 and GPIO_NUM_5 shows no activity.

The SJA1000 registers on reset (0x):
MOD: 76, CMR: 76, SR: 76, IR: 76, IER: 76, BTR0: 76, BTR1: 76

Following CAN_init() & CAN_write_frame():
MOD: 00, CMR: 00, SR: 0c, IR: 00, IER: ff, BTR0: 53, BTR1: 9c

Then:
MOD: 01, CMR: 00, SR: d4, IR: 00, IER: ff, BTR0: 53, BTR1: 9c

So I seem to have entered RM. Why? Also the registers do not seem to reflect SJA1000 power on/reset values.
Has anyone got the internal CAN working? If so please provide links.
& I also believe that IDF CAN should be fixed.

jcsbanks
Posts: 305
Joined: Tue Mar 28, 2017 8:03 pm

Re: ESP internal CAN

Postby jcsbanks » Wed Sep 05, 2018 5:40 pm

There is now a CAN driver in esp-idf too.

It works fine with ESP32-EVB.

Do you have a CAN device to give ACKs and termination link closed on the ESP32-EVB or another 120R?

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

Re: ESP internal CAN

Postby PeterR » Thu Sep 06, 2018 8:38 am

Thanks. Awesome, I will try the IDF driver. I tried the EVB with termination, CANdo etc & my production board just monitoring TX & RX. No signals. I will try the driver though.
& I also believe that IDF CAN should be fixed.

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

Re: ESP internal CAN

Postby PeterR » Thu Sep 06, 2018 11:31 am

Great that works (once I type in the correct GPIO numbers)

Something which may not be obvious to all is that on the ESP32-EVB rev D:
CAN-HI is next to the circular power in.
CAN-LOW is middle.

Thanks for the help.
& I also believe that IDF CAN should be fixed.

Who is online

Users browsing this forum: No registered users and 56 guests