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.

Parents
  • Are you dynamically enabling/modifying the GPIOTE pins during usage, or are the only initialized one time in beginning of main() and then not touched? Is it possible that you any time enable sense on any other pin not used by GPIOTE?

    Have you been able to measure the current consumption in this mode? I just want to understand if the chip may be stuck in code or in debug mode. For instance is it possible that the product have entered system OFF at any time when it failed?

  • No, I only init the GPIOTE  at the early stage of the poweron process. I can confirm the chip is not stuck since the RTC is running well(the system has an RTC displayed on LCD, nrf51822 need to toggle an gpio every second to let the RTC run,when GPIOTE freeze, the RTC is running well),  the GPIOTE seems can not be actived again since the charge and button has no action.

Reply
  • No, I only init the GPIOTE  at the early stage of the poweron process. I can confirm the chip is not stuck since the RTC is running well(the system has an RTC displayed on LCD, nrf51822 need to toggle an gpio every second to let the RTC run,when GPIOTE freeze, the RTC is running well),  the GPIOTE seems can not be actived again since the charge and button has no action.

Children
Related