From: richardbarry Date: Mon, 23 Aug 2010 15:59:07 +0000 (+0000) Subject: Add a -1 to the calculation of the compare match value. X-Git-Tag: V6.1.0~76 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=6c29595774bb670adcc735706f353a216f3995fa;p=freertos Add a -1 to the calculation of the compare match value. git-svn-id: https://svn.code.sf.net/p/freertos/code/trunk@1059 1d2547de-c912-0410-9cb9-b8ca96c0e9e2 --- diff --git a/Source/portable/MPLAB/PIC24_dsPIC/port.c b/Source/portable/MPLAB/PIC24_dsPIC/port.c index 241c47206..fb19e586e 100644 --- a/Source/portable/MPLAB/PIC24_dsPIC/port.c +++ b/Source/portable/MPLAB/PIC24_dsPIC/port.c @@ -260,7 +260,7 @@ void vPortEndScheduler( 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. */ T1CON = 0;