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

Periodic_Task

Hi ,

I want to create a periodic task which has to run every 10 seconds, how can I create such a task?should I use threads for it? And which clock source does the task use to count 10 seconds?

Thank you for your help!

Parents Reply
  • Why do you want to use TIMER1 for such a long delay? RTC (or app_timer which use RTC as the clock source) is accurate enough for such long delay, and will provide lower power consumption. It is possible to create multiple timers/delays using a single TIMER peripheral as well, but you will have to create some sort of software control if you do not clear the timer when it reaches the compare value. Please have a look at the timer peripheral example in the normal SDK for details on how to use the TIMER peripheral for single periodic timer. Which device and Mesh SDK version are you using?

Children
No Data
Related