this post was submitted on 27 Apr 2025
13 points (100.0% liked)

Ask Electronics

3644 readers
16 users here now

For questions about component-level electronic circuits, tools and equipment.

Rules

1: Be nice.

2: Be on-topic (eg: Electronic, not electrical).

3: No commercial stuff, buying, selling or valuations.

4: Be safe.


founded 2 years ago
MODERATORS
 

I'm using an Arduino and through a library working with an IC (MCP2515, a CAN controller) over SPI. The IC indicates interrupts by causing a falling edge on an interrupt pin.

Components are connected using jumper wires on a breadboard.

  • When a logic analyzer is not attached, the IRQ gets called a few hundred times. It should only be called once. I thought it must be noise on the external interrupt pin but 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 an error internal to the Arduino, I attach my logic analyzer. Now it works perfect.

Any idea what might cause such a weird issue? Looking around I haven't found anything.

EDIT: I found a Reddit post for a different circuit where a user suggested placing a small capacitor to make the edges of a signal rise slower. This has fixed my problem.

Since I've already created a post: does anyone know why I was getting an unending number of interrupts? Why would the edges of the interrupt signal changing too fast cause something like this?

all 2 comments
sorted by: hot top controversial new old
[–] [email protected] 3 points 22 hours 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?