external interrupts on the D series board

The official PYBD running MicroPython, and its accessories.
Target audience: Users with a PYBD
Post Reply
gratefulfrog
Posts: 149
Joined: Sun Mar 01, 2015 12:10 pm

external interrupts on the D series board

Post by gratefulfrog » Sun Jun 26, 2022 9:57 am

Hi,

Can anyone please tell me the specs for using external interrupts on the D series board. In particular, when using the WBUS-DIP extension boards?

I am looking for lots of interrupts, and the 16 available on the pyboard v1x are not enough.

But the doc in the pyb library on class ExtInt would seem to indicate that there can only be 16 external interrupts from pins regardless of the underlying hardware?
There are a total of 22 interrupt lines. 16 of these can come from GPIO pins and the remaining 6 are from internal sources.
For lines 0 through 15, a given line can map to the corresponding line from an arbitrary port. So line 0 can map to Px0 where x is A, B, C, … and line 1 can map to Px1 where x is A, B, C, …
Is this true, or simply my misunderstanding?

If I have misunderstood, is there a way to get more external interrupt channels using the pyb library?

Thanks
Bob

User avatar
dhylands
Posts: 3821
Joined: Mon Jan 06, 2014 6:08 pm
Location: Peachland, BC, Canada
Contact:

Re: external interrupts on the D series board

Post by dhylands » Sun Jun 26, 2022 6:05 pm

That's a limitation of the ExtInt module.

What do you need all of the interrupts for?

gratefulfrog
Posts: 149
Joined: Sun Mar 01, 2015 12:10 pm

Re: external interrupts on the D series board

Post by gratefulfrog » Sun Jun 26, 2022 6:59 pm

Hi Dave!

I'm back to pyboard projects.

I have a load of rotary encoders to read for input and the 16 channels aren't enough....

So I'm wondering how to access some of the many interrupt channels available on the STM32F722IEK microcontroller?

Please don't offer me suggestions as to how to not use rotary encoders.

My only desire is to have more external interrupt channels, if possible without adding external ICs...

Thanks
Bob

User avatar
jimmo
Posts: 2754
Joined: Tue Aug 08, 2017 1:57 am
Location: Sydney, Australia
Contact:

Re: external interrupts on the D series board

Post by jimmo » Mon Jun 27, 2022 2:22 am

gratefulfrog wrote:
Sun Jun 26, 2022 6:59 pm
So I'm wondering how to access some of the many interrupt channels available on the STM32F722IEK microcontroller?
Not an expert on STM32 peripherals, but I thought there was a limit of 16 GPIOs connected to the EXTI on most of the F family? Is that incorrect?

From the F722 reference manual:
The external interrupt/event controller consists of 24 edge-detector lines used to generate
interrupt/event requests. Each line can be independently configured to select the trigger
event (rising edge, falling edge, both) and can be masked independently. A pending register
maintains the status of the interrupt requests. The EXTI can detect an external line with a
pulse width shorter than the Internal APB2 clock period. Up to 140 GPIOs in the
STM32F722xx devices (138 GPIOs in the STM32F723xx devices) can be connected to the
16 external interrupt lines.

Post Reply