Hi,
I am need to interface 10 interrupts with the RPi Pico, I had read that all pins can be used as interrupt pins but the Pico has only 2 external interrupts. Is there a way to interface all the 10 interrupts with the Pico? or can they be directly connected to the board.
Thanks in advance!
-
- Posts: 697
- Joined: Fri Apr 22, 2022 1:39 am
- Location: USA
Re: Multiple Interrupts using RPi Pico
I think what you mean by this is each of the two processors has separate GPIO interrupts, which is true.
Those interrupts have individual enable bits for each GPIO, so you can use a single interrupt to monitor all 10 GPIOs. For example, if you want an interrupt handler to fire on a rising edge on any of the 10 pins, that is possible.
Re: Multiple Interrupts using RPi Pico
The Cortex-M0+ only supports 32 interrupts per core. However the RP2040 has many more interrupts. What they do is use nested interrupts where a single interrupt is multiple interrupts ORed together. You will be called for one or more and you have to read a register to know which one(s) called you. You can then something from there.
Cortex-M3 and others have the ability to dispatch a function from an individual interrupt directly. Use interrupts carefully under both approaches.
All of the GPIOs are external interrupts. This is how they are implemented in the SIO module, which is a custom module for the RP2040. PIO also supports working in a similar manner potentially. (SIO module is better.)
Cortex-M3 and others have the ability to dispatch a function from an individual interrupt directly. Use interrupts carefully under both approaches.
All of the GPIOs are external interrupts. This is how they are implemented in the SIO module, which is a custom module for the RP2040. PIO also supports working in a similar manner potentially. (SIO module is better.)
There is more I could say here but I am going to leave it at this. Till the world is not a complete waste of time.