This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

Gpiote interrupt issue

Hi, I have a problem about gpiote interrrupt.I have set two ports to detect the external interrupt(low to high). If only one port get active ,it works fine. But if one port get active first and external interrupt keep high ,and the other port get active after, I find out I can'nt get the interrupt signal from register when the second active.It's some wrong when I set the gpiote interrupt.

Parents
  • If you're using the PORT event, that's how it's documented to work, see the reference manual. The PORT event is generated on the rising edge of the DETECT signal and that signal is the combination of the DETECT events on all the pins enabled for sensing. So if your original port stays active, the DETECT signal stays high, there is no rising edge (because there was never a falling edge) and the PORT interrupt doesn't re-arm.

    So you can't use the PORT event in that manner.

  • don't use the port event, use the pin events on the GPIOTE, or reconfigure the PORT after you get the first interrupt to remove the pin which is high, or change it to re-interrupt when it goes low instead. That will disarm the DETECT event and you'll get another one when the first pin goes low or the second one goes high

Reply
  • don't use the port event, use the pin events on the GPIOTE, or reconfigure the PORT after you get the first interrupt to remove the pin which is high, or change it to re-interrupt when it goes low instead. That will disarm the DETECT event and you'll get another one when the first pin goes low or the second one goes high

Children
No Data
Related