I’m using an Arduino and through a library working with a CAN controller (MCP2515) over SPI, sending messages to itself over a loopback mode it offers. The IC indicates interrupts by a falling edge.
Components are connected using jumper wires on a breadboard.
- When a logic analyzer is not attached, the IRQ gets called without end. A pull-up doesn’t help. I’ve tried the internal pullup and an external one.
- Trying to see if there is a ton of interrupts from the IC, or a software error, I attach my logic analyzer. Now it works perfect.
- I detached the connection to the IC’s interrupt pin and manually triggered my own interrupts by holding then releasing a jumper to the Arduino’s external interrupts pin. It works fine, only triggering as many interrupts as I cause.
Any idea what might cause such an insanely weird issue? Looking around I haven’t found anything.
litchralee@sh.itjust.works 1 day ago
Switching noise is naturally the first place to look, when an IRQ is firing rapidly and unexpectedly. But have you verified that your IRQ handler is completely handling each interrupt event? And that another interrupt event while handling the prior one will not lead to unusual behavior?
It could very well be a rare, spurious interior firing due to noise, but then exacerbated by an IRA handler that doesn’t clear properly, leading to high speed sprioois events.
What are the approximate sizes for the internal and external pull-up resistors you’ve attached? And what is the impedance for the actual interrupt source, when it actually fires?