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

pull/4/head
Richard Barry 15 years ago
parent ac19e40336
commit 8c5b77635e

@ -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;

Loading…
Cancel
Save