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

How to use of RTC to wake up from sleep

Hello,

I am after an example for nRF5340 showing how to use RTC to wake up from sleep.

I have a couple of timers running few tasks at regular intervals in a forever loop then I send the chip to sleep. At this point everything stops including the timers.

I need an interrupt source to wake the chip up and the RTC seems like a good way but I am not sure how to set it up and configure it to use.

Note, I am using SES V5.34a as a development environment and Zephyr V1.5.0-rc1.

Thank you.

Kind regards

Mohamed

Parents Reply
  • Thank you Einar for the quick response.

    I am not using threads for now. I may be using threads at some point in the near future.

    You are free to use an RTC peripheral directly and do it that way,

    Could you please provide an example where the RTC is used to come out of sleep?

    but there are few good reasons for not using the build in thread and work queues support in Zephyr as suggested above.

    Are you saying there are few good reasons for NOT using the built-in thread and work queues?

    In other ways you are discouraging me from using threads. Is this what you meant to say?

    Kind regards

    Mohamed

Children
Related