This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts
This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

Using timer how to make 5 sec delay in pca10040 board?

Hi,

I am using pca10040 board. i need to toggle a led in 5sec once. I tried to change the prescale value. But im not able to get that much time delay.

Can any one help me on this?

Parents
  • Have you tried using app_timer? It uses the RTC which will give you overflow at 512 seconds with prescaler 0. The RTC is also much more power efficient than using TIMER. See here for a tutorial on how to use it. You can also use the RTC directly, but be aware that RTC0 is used by SoftDevice and RTC1 is used by app_timer.

Reply
  • Have you tried using app_timer? It uses the RTC which will give you overflow at 512 seconds with prescaler 0. The RTC is also much more power efficient than using TIMER. See here for a tutorial on how to use it. You can also use the RTC directly, but be aware that RTC0 is used by SoftDevice and RTC1 is used by app_timer.

Children
No Data
Related