Add a -1 to the calculation of the compare match value.

This commit is contained in:
Richard Barry 2010-08-23 15:59:07 +00:00
parent ac19e40336
commit 8c5b77635e

View File

@ -260,7 +260,7 @@ void vPortEndScheduler( void )
*/ */
static void prvSetupTimerInterrupt( void ) static void prvSetupTimerInterrupt( void )
{ {
const unsigned long ulCompareMatch = ( configCPU_CLOCK_HZ / portTIMER_PRESCALE ) / configTICK_RATE_HZ; const unsigned long ulCompareMatch = ( ( configCPU_CLOCK_HZ / portTIMER_PRESCALE ) / configTICK_RATE_HZ ) - 1;
/* Prescale of 8. */ /* Prescale of 8. */
T1CON = 0; T1CON = 0;