sandeepmistry / arduino-CAN

An Arduino library for sending and receiving data using CAN bus.
MIT License
670 stars 227 forks source link

Starting CAN failed! #84

Open mianqi2016 opened 2 years ago

mianqi2016 commented 2 years ago

I used a module with MCP2515 + TJA1050 on Arduino UNO, I tried 2 modules on 2 UNO with sender and receiver example, and I have changed parameters for MCP2515, but it just prompted: Starting CAN failed!

CAN.setSPIFrequency(4E6); CAN.setClockFrequency(8E6); if (!CAN.begin(10E3))

What maybe the reason?

qubolino commented 2 years ago

does it start without changing spi and clock freq?

mianqi2016 commented 2 years ago

No, so I went to change them.

My wiring was here: https://forum.arduino.cc/t/starting-can-failed/944127/4


发件人: qubolino @.> 发送时间: 2022年1月9日 9:31 收件人: sandeepmistry/arduino-CAN @.> 抄送: Mian Qi @.>; Author @.> 主题: Re: [sandeepmistry/arduino-CAN] Starting CAN failed! (Issue #84)

does it start without changing spi and clock freq?

― Reply to this email directly, view it on GitHubhttps://github.com/sandeepmistry/arduino-CAN/issues/84#issuecomment-1008262270, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AFPCOAVVSW452NIWZ5YDCTLUVFIVNANCNFSM5LMMKRLQ. Triage notifications on the go with GitHub Mobile for iOShttps://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Androidhttps://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub. You are receiving this because you authored the thread.Message ID: @.***>

mianqi2016 commented 2 years ago

does it start without changing spi and clock freq?

No.

mianqi2016 commented 2 years ago

I found if you select "ACAN" in Arduino IDE "Library Manager", you could meet others CAN libraries, I havn't try them, maybe there is any could run.


发件人: jackievlobos1 @.> 发送时间: 2022年2月8日 18:52 收件人: sandeepmistry/arduino-CAN @.> 抄送: Mian Qi @.>; Author @.> 主题: Re: [sandeepmistry/arduino-CAN] Starting CAN failed! (Issue #84)

I am having the same issue. Did you find a solution?

― Reply to this email directly, view it on GitHubhttps://github.com/sandeepmistry/arduino-CAN/issues/84#issuecomment-1032949817, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AFPCOAVAUD3SPIPAVF45XDLU2FQ73ANCNFSM5LMMKRLQ. Triage notifications on the go with GitHub Mobile for iOShttps://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Androidhttps://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub. You are receiving this because you authored the thread.Message ID: @.***>