Attachments are accessible only for community members.
Sep 19, 2013
06:40 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Sep 19, 2013
06:40 PM
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