bareboat-necessities / bbn-nmea200-m5atom

N2K esp32 Arduino sketches for M5Atom with can CA-IS3050G based on https://github.com/ttlappalainen/ https://github.com/hatlabs/ https://github.com/AK-Homberger works
GNU General Public License v3.0
5 stars 0 forks source link

m5atom fails to initialize on can bus #2

Closed mgrouch closed 1 year ago

mgrouch commented 1 year ago

Seems similar to issue described here:

https://open-boat-projects.org/en/nmea2000-gateway-mit-m5stack-atom/

NMEA2000 critical: There is probably a problem with the implementation of the CAN 
protocol stack in the ESP32 when communication is started on the bus. 
If the start-start sequence is not answered by the communication partner,
the CAN bus of the requesting ESP32 goes into an undefined state and 
sends garbage data at full data rate until the start-start sequence is answered 
by any communication partner in the bus. If you have connected both ESP32 to 
the CAN bus and then reset both or one of the ESP32s, the connection works again. 
It looks like you can only use the start-start sequence once after a reset. After that 
it no longer works. However, if there are other communication partners in the CAN bus 
who do not use an ESP32 and can still respond correctly to the initial sequence, 
everything is ok. The problem only occurs when two or more ESP32s want to 
communicate with each other.

The problem has now been solved by corrections in an open source library.

It mentions fix exists but it doesn't mention where.

Could it be this one?

https://github.com/wellenvogel/esp32-nmea2000/tree/master/lib/nmea2000esp32

mgrouch commented 1 year ago

Added compiling against patched files