From 6c29595774bb670adcc735706f353a216f3995fa Mon Sep 17 00:00:00 2001 From: richardbarry Date: Mon, 23 Aug 2010 15:59:07 +0000 Subject: [PATCH] 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 --- Source/portable/MPLAB/PIC24_dsPIC/port.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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; -- 2.39.5