107-systems / 107-Arduino-MCP2515

Arduino library for controlling the MCP2515 in order to receive/transmit CAN frames.

Home Page:https://107-systems.org

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

[Bug Report] Can't get interrupts to fire on ESP32

lordmundi opened this issue Β· comments

πŸ› Bug Report

Describe the bug

I got a Comidox MCP2515 module (https://www.amazon.com/Comidox-MCP2515-Receiver-Controller-Development/dp/B07J9KZ4L4) and I think I'm having a very similar problem to issue #53 or issue #57. Mainly, when I first boot the sniffer/listener example, I get a few CAN messages printed out from the interrupt handler (sometimes 3 or so... sometimes 10 or so) and then it never triggers again. That tiny burst right on bootup prints out correctly though - there doesn't seem to be any corruption or anything. But after that burst on reset/boot, nothing ever gets printed after that. (I have other items that are working so I definitely know there are lots of CAN messages on the bus that other elements are receiving correctly.)

I'm running the MCP2515-CAN-Sniffer.ino example on an ESP32-WROOM-32D and the only thing i've changed is to make the CS pin 16 and the INT pin 17. Also, I set the bit rate with "CanBitRate::BR_500kBPS_8MHZ". Everything else in the code is identical to the example code. The other pins are using the standard VSPI pins on the ESP32.

Some things I've tried:

  • I've tried using different pins for CS and INT - same behavior
  • I've tried unsoldering the 8MHz crystal and soldering on a 16 MHz crystal - same behavior.
  • I've tried powering it from the USB port or from an external 5V supply - same behavior.
  • Library Version 1.3.4

Any ideas on why the interrupt handler isn't continuing to fire?