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

Not getting bsp button interrupt after sd_power_system_off

Hello,

I am using sdk12.2.2 and nrf52832 customized board. I am putting mcu to sleep mode using sd_power_system_off. Now when I am pressing button for first time I am not getting interrupt. When I am pressing button again I am getting interrupt and mcu wakes up from sleep mode.

How can I resolve this issue?

Thanks

Parents
  • When the chip is in deep sleep (system off) and when you press the button with the pin that is configured correctly to wake the system, then after the wake, it will not run the gpio interrupt handler, but rather, there will be a system reset and it will run the reset_handler. When you press the button again for the second time, then by this time the pin is reconfigured to generate interrupt after wakeup and hence it you are able to see that the interrupt handler is executed. This is normal behavior that you see in my opinion.

  • Hi Aryan,

    I am also trying to run default nordic firmware where timer is configured to put mcu in sd_power_system_off mode. In that when I press button once on dk mcu starts advertising. I have implemented same logic using same code chunk. So why do I have to press button again?

    Thanks

  • If you have configured the same button to wake the system up and at the same time added some logic after wakeup based on the same button. 

    First press will wake the system up (system is reset on wakeup and button event handler is not executed)

    Second press, at this point the system is already awake, so it will run your button event handler .

Reply Children
No Data
Related