SysTimers component

Tip / Sign in to post questions, reply, level up, and achieve exciting badges. Know more

cross mob
lock attach
Attachments are accessible only for community members.
MarkH_61
Employee
Employee
25 likes received 50 replies posted 25 replies posted
        Often I need to time events or execute periodic code from my main loop, but don't want to use additional hardware or use blocking code like CyDelay(). The Cortex M0 and M3 in the PSoC 4 and PSoC 5LP have a nice little built in timer called SysTick. You can set the interrupt period with a wide range of values and it is very useful as a general purpose timer. The SysTimers component attached this post makes use of this timer to run up to 16 parallel non-blocking timers. It is simple to use and can be configured to have a very small (1 line) ISR so not to take up too many CPU cycles. I have attached a workspace that includes the library, and examples for both PSoC4 and PSoC 5LP. Enjoy, Mark   
27 Replies