M5Atom icon indicating copy to clipboard operation
M5Atom copied to clipboard

ATOM CAN-example don't work (also the EASYLOADER examples)

Open rudydevolder opened this issue 3 years ago • 4 comments

I tried everything; even the EASYLOADER examples to find out that these don't work either!!!, I own 6 CAN-bus boards and different ATOM5 and MATRIX modules. I tested them all. Always the same problem: when resetting the sender only 2 messages are send than hang... And the receiver keeps rebooting after the button is 1 time pressed, until the sender is reset, but I don't get any further than that. For the moment I'm still guessing the direction of the problem: I tried to avoid conflicts by:

  1. Deleting all references to the display library:
  2. Also disabling I2c: M5.begin(true,false,false); But everything to no avail. I found out this M5-Atom CAN example is actually based on the same libraries and examples from: http://www.iotsharing.com/2017/09/how-to-use-arduino-esp32-can-interface.html So I guess it should work on other boards. Someone having any idea to search in what direction ?

rudydevolder avatar May 17 '21 09:05 rudydevolder

I have exactly the same problem, tried with arduino 1.8.10 and 1.8.15. tried on usb 3.0 and 2.0 port, all the same problem. any solution?

this line causes the problem : "ESP32Can.CANWriteFrame(&tx_frame);"

slechtvalk200 avatar Sep 24 '21 13:09 slechtvalk200

I also have exactly the same problem, I've tried four M5atom CAN units, all have the same problem, any ideas how I can solve this?

commenting out this line alows the program to continue, not very helpful : "ESP32Can.CANWriteFrame(&tx_frame);"

pgrueber avatar Apr 16 '23 00:04 pgrueber

I found a solution that works for me, place this line “ESP32Can.CANStop();" after this line "ESP32Can.CANWriteFrame(&tx_frame);" and place this line "ESP32Can.CANInit();" before "ESP32Can.CANWriteFrame(&tx_frame);" . It would seem that sending more than three frames sequentially will cause the M5Atom CAN to lockup. Reinitializing the ESP32Can for each TX frame avoids this issue.

pgrueber avatar Apr 16 '23 02:04 pgrueber

Update, I'm using an M5Atom CAN to transmit a single message containing simulated Toyota speed information, the software runs fine for about 21minutes then the CAN chip stops transmitting, the software keeps running but no data on the CANBus. I’ve tried a few modules, but they all do the same thing.

pgrueber avatar Apr 25 '23 06:04 pgrueber