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

GPIOTE sometimes freeze after several days test on nrf51822QFAC. SDK version 12.3.0 .

I use a motion sensor interrupt and 4 buttons and one charge interrupt, all works well in product development, but after go into mass production, some pcs product( 1 or 2 of 2000) freeze the GPIOTE after several days test, both of  button and charge interrupt can not be triggered, the nrf51822 is not dead since the app_timer works then.

I use app_button.c , so 4 buttons set as NRF_GPIOTE_POLARITY_TOGGLE, my charge(in and out)interrupt also set as NRF_GPIOTE_POLARITY_TOGGLE, but my sensor interrupt is set as  NRF_GPIOTE_POLARITY_LOTOHI, to make the sensor interrupt work, I also modified some code in GPIOTE_IRQHandler, the following PNG shows the code I've modifyed.

GPIOTE_IRQHandler

The sensor pulse is about 200us active high in every 50ms. Is the code I modified in GPIOTE_IRQHandler OK? Or something I missed since I can not totally understand the official code in GPIOTE_IRQHandler.

Related