NOTE:This is a read only archive of threads posted to the FreeRTOS support forum. Use these archive pages to search previous posts. New forum support threads can be started at the FreeRTOS forums.
FreeRTOS Support Archive
The FreeRTOS support forum can be used for active support both from Amazon Web Services and the community. In return for using our software for free, we request you play fair and do your bit to help others! Sign up for an account and receive notifications of new support topics then help where you can.
This is a read only archive of threads posted to the FreeRTOS support forum. Use these archive pages to search previous posts. New forum support threads can be started at the FreeRTOS forums.
From the “Timers” Reference Manual sections for these devices (Example 11-1 and Figure 11-4 in all manuals) we can see that prvSetupTimerInterrupt() in port.c should be changed from:
Thanks for the feedback. Its not the first time I have made that mistake, and I’m sure it won’t be the last.
However, I’m not sure your solution is completely accurate because of the operator precedence. Should it not be:
const unsigned long ulCompareMatch = ( ( configCPU_CLOCK_HZ / portTIMER_PRESCALE ) / configTICK_RATE_HZ ) – 1;
If you agree with this I will change it in SVN straight away so it does not get lost in the crowds.
Regards.
Multiplicative operators, of which ‘/’ is one, have higher precedence than additive operators, so the added parentheses are unnecessary. However, explicitness is always good in my book, so I say leave them in the way you have it.