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

Not able to wake the board from deep sleep(System off)

I am very new to Nordic products so please excuse my ignorance.I have been trying to put my nrf52840 board to deep sleep. It seems to go to sleep but when I try to wake it up by pushing the buttons, it doesn't wake up.

This is how  I modified Ble_app_blinky_c, I added sleep_mode_enter(){}, buttons_leds_init(){}, and bsp_event_handler(bsp_event_t event){} from Ble app template . And then I am calling buttons_leds_init  and sleep_mode_enter in Main.c.Basically I want the board to be in deep sleep at all times and wake up only when I push the buttons.

I have included my project below.

What I am doing wrong?

Thank you in advanceble_app_blinky_c.zip

Parents
  • Hi

    Yes, I just mentioned SCAN_DURATION if it is relevant to you that if the device isn't able to connect to another one in a given amount of time, it might want to go back to sleep.

    SUPERVISION_TIMEOUT however, should be able to disconnect you from an inactive connection so you can go to sleep upon disconnection from the peripheral. Remember that when you go to deep sleep (System OFF) mode, the wake-up call will trigger a reset, which is why you can't start the main loop by going to sleep. If you want it to do something when it wakes up, you'll have to add that before going to sleep.

    Best regards,

    Simon

Reply
  • Hi

    Yes, I just mentioned SCAN_DURATION if it is relevant to you that if the device isn't able to connect to another one in a given amount of time, it might want to go back to sleep.

    SUPERVISION_TIMEOUT however, should be able to disconnect you from an inactive connection so you can go to sleep upon disconnection from the peripheral. Remember that when you go to deep sleep (System OFF) mode, the wake-up call will trigger a reset, which is why you can't start the main loop by going to sleep. If you want it to do something when it wakes up, you'll have to add that before going to sleep.

    Best regards,

    Simon

Children
  • I can see SUPERVISION_TIMEOUT could have been useful but in my case I want it to go to sleep right after the data has been sent. So basically when you push the button,it wakes up, connects to peer board, sends data to it(data sent will depend on the button pushed, that is why I was trying to put this on button event handler ), and then it goes back to sleep.In other words, the board will be forced out of connection as a result of the central going to sleep.

Related