Voting resources, early voting, and poll worker information - VOTE. ... Adafruit is open and shipping.
0

Interrupt Pins on the Grand Central M4 Express
Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.

Interrupt Pins on the Grand Central M4 Express

by chaz_w on Sat Mar 07, 2020 1:18 pm

Hello everyone,

I have a Grand Central M4 Express and I would like to have a couple of pins as interrupt pins so I can continuously use the VL53L0X sensor without holding up the microcontroller. I can't seem to find any specs on this on the product page about interrupt pins though... Maybe I'm just looking in all the wrong places... But is this even possible with this board? If so, where can I find information on this?

Thank you!

chaz_w
 
Posts: 1
Joined: Sat Mar 07, 2020 1:13 pm

Re: Interrupt Pins on the Grand Central M4 Express

by westfw on Sat Mar 07, 2020 6:35 pm

It's a little bit complicated.
In theory, any pin can cause an interrupt, and you can just use the "attachinterrupt(digitalPinToInterrupt(P) ..." form to set them up.
However, there are only 16 separate external interrupts, multiple pins map to the same interrupt, and only one of them can be configured at any one time. At least, that's the way I read the chip documentation.

westfw
 
Posts: 1735
Joined: Fri Apr 27, 2007 1:01 pm
Location: SF Bay area

Re: Interrupt Pins on the Grand Central M4 Express

by adafruit_support_mike on Mon Mar 16, 2020 3:47 am

To clarify the above slightly: an external interrupt can only be mapped to one pin at a time. All 16 external interrupts can be active at the same time, as long as they're assigned to 16 different pins.

adafruit_support_mike
 
Posts: 61443
Joined: Thu Feb 11, 2010 2:51 pm

Please be positive and constructive with your questions and comments.