pierremolinaro / acan2517FD

Distribution of Arduino driver for MCP2517FD CAN controller (CANFD mode)
MIT License
70 stars 17 forks source link

Arduino Nano RequestedModeTimeOut #44

Closed wouter-heerwegh closed 7 months ago

wouter-heerwegh commented 9 months ago

Hi,

I'm trying to get the loopbackdemo sketch to run, but seem to be stuck. I'm using an mcp2517fd on a custom board with a 20MHz clock. The sketch seems to run quite well, until the requested mode is changed. It seems like the chip is stuck in configuration mode. I've tried to modify the library to stay on 800khz, but that didn't seem to have any effect.

Data transfer seems to work as expected (CS is pulled low and clock signal is sent when sending a message). The sketch does say that the message is sent, but when querying the operating mode, I can see that it is still in configuration mode. I tried modifying the interrupt routine, but it seems like it is never triggered, even though the interrupt pin is going low.

Anyone who has an idea on how I could debug this further?

pierremolinaro commented 9 months ago

Hello,

The MCP2517FD chip is very buggy, try instead a MCP2518FD. None of tham has a RESET pin,this an actual problem, the chip cannot be reset properly in any situation.

What is your microcontroller ? Do you select ACAN2517FDSettings::OSC_20MHz or ACAN2517FDSettings::OSC_20MHz_DIVIDED_BY_2 when you instanciate ACAN2517FDSettings ?

Pierre

Le 7 févr. 2024 à 17:42, Wouter Heerwegh @.***> a écrit :

Hi,

I'm trying to get the loopbackdemo sketch to run, but seem to be stuck. I'm using an mcp2517fd on a custom board with a 20MHz clock. The sketch seems to run quite well, until the requested mode is changed. It seems like the chip is stuck in configuration mode. I've tried to modify the library to stay on 800khz, but that didn't seem to have any effect.

Data transfer seems to work as expected (CS is pulled low and clock signal is sent when sending a message). I tried modifying the interrupt routine, but it seems like it is never triggered, even though the interrupt pin is going low.

Anyone who has an idea on how I could debug this further?

— Reply to this email directly, view it on GitHub https://github.com/pierremolinaro/acan2517FD/issues/44, or unsubscribe https://github.com/notifications/unsubscribe-auth/AEWKZVHGROO5TF56HMMVC33YSOVJBAVCNFSM6AAAAABC6FDEOGVHI2DSMVQWIX3LMV43ASLTON2WKOZSGEZDGNBUHE2TOOI. You are receiving this because you are subscribed to this thread.

wouter-heerwegh commented 9 months ago

Hi @pierremolinaro,

I found out that my transceiver was not properly powered. After providing power to it, the mcp was able to change modes.

Thanks for the response.