-
Notifications
You must be signed in to change notification settings - Fork 117
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Timer setup #100
Comments
Yes, you are right. In delta mode, you need to call COTmrService() in ISR, too. Maybe this description explains the reload parameter: Timer Driver / Timer Reload |
Michael, what would be the unit of the reload parameter in delta mode? Seconds or it assumes a certain clock frequency for the timer and the reload is in ticks as well? KR, |
The unit of the reload parameter depends on your driver. I typically configure the timer with a frequency of 1MHz. Then you get an accuracy of 1tick = 1us. The reload parameter is in ticks which is equal to 1us - very comfortable. Just keep an eye on your timer overflow: |
Hello, everyone! I am a bit confused with the two timer modes that can be used. In the cyclic mode, I must set a timer to generate periodic interrupts at a given period (say 1ms) and call the COTmrService() inside the interrupt service routine, correct? In this case, the timer driver employed must be the co_timer_swcycle.c and the reload parameter of the DrvTimerReload() is the number of ticks to the next event.
In the delta mode, do I need to call COTmrService() inside the ISR? What is the meaning of the reload parameter in this case?
Thank you very much in advance.
The text was updated successfully, but these errors were encountered: