Anonymous
Not applicable
May 10, 2017
10:08 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
May 10, 2017
10:08 AM
Hi,
My application for multiple time cc events used.
I wish used a same timer resource, it means that I write a compare register value to generate cc event interrupts when timer count reach the compare register, in the mean time, the timer does not stop, keep running and enter interrupt service routine, then firmware change compare register to a new value , new value is great than old (example it is a up counting mode), after clear interrupt return to main routine, wait for reaching next compare register value then CC event happened. The new value is enough to process interrupt service routine.
Is it workable ?
1 Reply
May 10, 2017
12:52 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
May 10, 2017
12:52 PM
yuhua, Here is a link for 2 similar projects that use single Timer/Counter/PWM block for multiple outputs. It operates same way as you describe, that is settings are being updated in isr on-the-fly. http://www.cypress.com/comment/388031#comment-388031 Another approach for re-creating Timer in software can be found in this thread. It is based on software timing, and may not hold for very high frequencies. http://www.cypress.com/comment/401386#comment-401386