-
Notifications
You must be signed in to change notification settings - Fork 100
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ESP32 + MCP2518FD Pro board has errors when connected to can network ** and !! #66
Comments
Hmmm, so a different driver working would seem to suggest a problem with my driver. Thus, I'm labeling this a bug. Those errors indicate errors in transmitting bits properly. Are you sending any FD traffic? |
Yes I was testing with FD traffic. |
Just tested with the MCP2518 boards.
|
When using 500k 4000k canfd then I get !! error when the other MCP is sending. I dont know if this is useful or not but from pierre acan2517fd output I get these settings after setup: |
I have actually seen this. It should be documented that, for some reason, using a CAN speed of 500k does not work with this library. If you set the CAN speed to 1M then you can set the FD speed to 2M, 4M, 5M, etc and it works fine. I don't know why this is. But, seeing the settings from ACAN could help to narrow down what is going on. So, thank you. |
Setting the CAN1.debuggingMode = true Diag1: 10020000 ErrFlgs: 8Diag0: 670059 Also tried 1M-2M CAN1.beginFD(1000000, 2000000) I get this output: And 1M x2 from ACAN2517FD |
Hi there! I think the problem here is the setting of SJW inside the _initFD function of the fixed value of "4", called from initFD: The manual says:
So i changed this to: nominalCfg.bF.SJW = tseg2 - 1; after the calculation of tseg2. Now the error is gone :-) |
Short update: So trying further... |
Next update: |
Confirmed. Works.
|
ESP32 + MCP2518FD Pro board has errors when connected to can network ** and !!
Setup configures the MCP2518 correctly but when connected to can network I get !! and ** in serial monitor.
In code I found that these are printed from mcp2517fd.cpp file
if (diagBits & 0x3030000) //either NBIT0 or NBIT1 error (or DBIT0, DBIT1)
and
if (diagBits & 0x38380000) //19 - RX Fixed form, Bit stuff, or CRC error, either FD or not
But I have no idea what these really mean or how to get it to work.
I have tested with https://github.com/pierremolinaro/acan2517FD and there connection works and I can see network traffic.
The text was updated successfully, but these errors were encountered: