Skip to content
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

Due hangs when the chip select pin entered is wrong #13

Open
mvSarma opened this issue Dec 27, 2019 · 4 comments
Open

Due hangs when the chip select pin entered is wrong #13

mvSarma opened this issue Dec 27, 2019 · 4 comments

Comments

@mvSarma
Copy link

mvSarma commented Dec 27, 2019

Arduino Due stalls while attaching interrupt when the chip select pin number is wrong.

@mvSarma
Copy link
Author

mvSarma commented Dec 30, 2019

The same happens with MKR when I give a wrong chip select pin for the second time.

@pierremolinaro
Copy link
Owner

pierremolinaro commented Dec 31, 2019 via email

@mvSarma
Copy link
Author

mvSarma commented Jan 2, 2020

I believe here the stall happens because the library tries to attach an interrupt Pin even after figuring out that MCP2515 is not available in the specified CS pin. I am not sure on Arduino's Interrupt library implementation. But this can be avoided if we can check for the pass case of errorCode in addition to the usage check of interrupt pin in ACAN2515::beginWithoutFilterCheck method

if(mINT != 255 && errorCode == 0)

I think this should help me out.

@pierremolinaro
Copy link
Owner

pierremolinaro commented Jan 7, 2020 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants