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

How to detect gpio interrupt for 10 seconds.

Hi,

We are using nrf51822 custom board.

i want to hard reboot of my device whenever gpio button is pressed for longer than 10 seconds.

i am using ble_app_hrs application.

For that i started 10 second timer whenever in button_event_handler whenever button is pressed.

in time out handler i am checking whether the button gets low or not.

if it low i am calling this function.

sd_nvic_system_reset();

But my device is not reset.

Kindly suggest me how can i achieve this.

Is there any sd api to power off and on the device.

Regards Balaji

Related