pierremolinaro / acan2515

MCP2515 CAN Controller Driver for Arduino
MIT License
77 stars 30 forks source link

MKR hangs when I try to re-use CAN with same CS and INT Pin because of interrupt pin resource management #12

Open mvSarma opened 4 years ago

mvSarma commented 4 years ago

When I call CAN.end() and call CAN.begin() again, it gets stuck at SPI.usingInterrupt()

I noticed that calling the undocumented API SPI.notUsingInterrupt() before detachInterrupt() in ACAN2515::end() is actually fixing this issue for SAMD.