Pin configured for wakeup from system off sleep misbehaving.

I am working on nrf52832 based custom board and I want system off sleep and wakeup using GPIO pin state change. For that I have configured MCU standby timeout in sdk_config.h.

There is a switch in the hardware that can be pressed to wake up the system from sleep. But the switch has alternate function when the system is awake. So I have configured the pin as wakeup just before the system is going to sleep. Initially this works, but sometime the system skips this configuration and directly goes to sleep. 

So I have modified the hardware and assigned two GPIO pins to the switch, one for normal switch mode and other for wakeup switch. Initially I have configured one of the pins for wakeup using "nrf_gpio_cfg_sense_input()" function. But after that the other pin is not working properly, that means when I configured one pin as wakeup pin the other pin won't working properly. Another issue is while system is awake any transition in the wakeup pin halts the code execution. 

Could anyone help me to solve this issue?

Thanks

Sachin

Parents Reply Children
No Data
Related