Important changes to forums and questions
All forums and questions are now archived. To start a new conversation or read the latest updates go to forums.mbed.com.
7 years, 4 months ago.
Managing sleep intervals based on Timer Interrupts on NRF52
I have been looking at several forum articles on the Nordic site regarding NRF52 especially around managing sleep intervals and also how to use a timer interrupt to wake the CPU. So all of the code there uses the NRF52 softdevice api or other nordic api's to use the timer interrupts. I was wondering if there is something within the MBED API that wraps those calls and makes it more user friendly like most other interfaces such as I2C or SPI?
In the event I don't have such wrapper API's within the mbed api how does one manage to put the NRF52 to sleep for say 25-30 seconds, wake up read a sensor value transmit the payload over BLE and then go back to sleep and wake up again in 25-30 seconds. I am looking for the non-power off mode where the CPU can be woken up via a timer interrupt?
Thanks, Yogesh
You can consider using https://docs.mbed.com/docs/mbed-os-api-reference/en/5.1/APIs/tasks/Ticker/ .
posted by Andrzej Puzdrowski 02 Jan 2017& sleep
posted by Andrzej Puzdrowski 02 Jan 2017