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

sleep and wake up services of nordic nrf52840

hello

I have ble_app_hrs_freertos project for that, I have to make sleep and wake up the services in the project.

 my question is that

1) how to sleep the service in nrf52840?

2)how to wake up that service at specific intervals time?

is there any tutorial and snippet for that?

Thank you.

  • I assume you are asking about System ON sleep?

    1) how to sleep the service in nrf52840?

     To enter System ON sleep with the freertos examples you set the following config in the FreeRTOSConfig.h file:

    #define configUSE_TICKLESS_IDLE 1

    You don't need to do anything else besides this, the chip will automatically go to System ON sleep when idle.

    I think this is already set in the ble_app_hrs_freertos example. 

    2)how to wake up that service at specific intervals time?

     You could simply use a timer

     

    is there any tutorial and snippet for that?

     Take a look at the ble_app_hrs_freertos example, it has both sleep enabled (configUSE_TICKLESS_IDLE) and some timers main()-->application_timers_start()

    Best regards,

    Simon

  • Hai simon!

    Thanks for the reply.

    What you explained is very clear and it helps to make the device sleep and wakeup.

    but I need for example if I have sensors and ble services when ble is in sleep mode sensor has to wakeup means reading of values/data.

    Is that happens in nordic? can you help me with this task?

  • When the chip is in System ON mode, it will wake up from any event/interrupts, including BLE events, timer events and interrupts from various peripherals. The system will wake up, run the associated handler of the interrupt/event and go back to sleep again.

    Best regards,

    Simon

Related