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

Delay GPIOTE events (synchronize handling of external interrupts)

Good morning,

I am using nRF51 SDK v10.0.0 and I have to synchronize access to a hardware resource shared between two control flows. One flow is an interrupt handler invoked by GPIOTE (high accuracy, using the hardware registers). I can use nrf_drv_gpiote_in_event_enable() and nrf_drv_gpiote_in_event_disable() to enable or disable the interrupt handler.

My question is: Can I use these functions to delay the interrupt or will it be completely lost in this case? The GPIOTE driver documentation does not give any information about how to delay interrupts during critical sections.

Example:

  • nrf_drv_gpiote_in_init() is called
  • nrf_drv_gpiote_in_event_enable() is called
  • nrf_drv_gpiote_in_event_disable() called
  • interrupt is triggered on the disabled GPIOTE pin
  • nrf_drv_gpiote_in_event_enable() is called a bit later

Will the interrupt handler be invoked by GPIOTE in this scenario?

Related