arduino-CAN icon indicating copy to clipboard operation
arduino-CAN copied to clipboard

Processing suddenly stops after 1 second at 500kbps and 1000kbps

Open dARoB2108 opened this issue 4 years ago • 5 comments

Hi!

I have wired an sn65hvd230 to the ESP32s standard CAN RX and TX pins and I'm using the standard library with standard receive example where I change only the baudrate for testing.

As a CAN sending device, I have a notebook with Busmaster and a logfile which I'm replaying and sending through a Vector CanCaseXL.

When setting up the standard example as well as the sender to 100kbps, everything works fine, no glitches, no isses. The story changes when changing the baudrate to 500 or 1000 respectively. It takes approx 1s (+10-100ms) until the communication stops. I monitor the communication through the serial monitor in ArduinoIDE.

Since my level is beginner, I first started looking if someone had similar issues but found nothing, hence why I'm writing this and asking for help on how to proceed further and how to troubleshoot what might be the issue? I have a small oscilloscope to monitor stuff if this is needed.

Thanks!

EDIT: I forgot to mention that I use this product: https://www.amazon.de/gp/product/B072C29H3K?pf_rd_p=8997cce2-05c4-4359-bdb7-10e52332d836&pf_rd_r=WVQRVN463A8BPR2MKDXM I tried it with and without resistor and tried to pull down the pin nr. 8 directly to GND with same outcome.

Best regards, RoB

dARoB2108 avatar Feb 21 '20 07:02 dARoB2108

Would be nice if someone can try out the above with the sn65hvd230 CAN transceiver as now I'm pretty sure that (at least in my case) the transceiver is the whole problem.

I received a TJA1050 today and it works like it is supposed to. It was literaly exchange one against the other, start the CAN stream and everything worked nicely.

BR RoB

dARoB2108 avatar Feb 24 '20 16:02 dARoB2108

Hi Rob! I work with the same boards on Proto Boards and also usee the same chip in my product. No problems so far!

you can Probe Volatages maybe this is the prblem?

I also want to mention that the Board also comes with 120 OHM resistor on board (I desolder theese) because my environment is already terminated. Im not shure about your test setup by try to remove the resistor and give it a try! Baud over 500kbs needs good connections -> TP cable .

Petros144 avatar Mar 16 '20 11:03 Petros144

Hi!

Thanks for the heads up but due to complete waste of time, I have gone on with the other chip which works flawlessly!

Regarding the resistor, I have tried the board with and without it so this wasn‘t the issue. Also, I have monitored the voltages which were fine so this could not be the issue as well. As mentioned, exchanging the sn65 board to the other was plug and play and without a change in the code everything was running smooth and without issues!

Regarding the wiring for the bus speed above 500kbps, I cannot agree. I‘m working with the canbus for the past 10 years and for all my sniffing and even for my complete car rewire, i never used a special cable, also, i do not twist it as well as it is not necessary for lengths under 20-30m. If it is terminated at both ends, everything will be fine. My test setup is on my working desk and a max of 30-50cm in length! Bare in mind that the oem car manufacturers also don’t use special cables, most of them are not even twisted.

Thanks!

Best regards RoB

dARoB2108 avatar Mar 16 '20 17:03 dARoB2108

Nice To hear, I made some investigations and found out that some Chineese Chips are Fake so maybe you got your hand on a bad Copy of silicon.

wow okay, this is new to me. Most german cars I saw used Twished pair cables for Can bus signals, maybe for signal integrity who knows.

Maybe you can tell which Chip you used for other People with the same issue?

Petros144 avatar Mar 17 '20 11:03 Petros144

When you controller gets into that state, what are the values of the EFLG, TEC, REC registers?

timurrrr avatar Jul 31 '20 17:07 timurrrr