]> git.sur5r.net Git - freertos/commitdiff
Add a -1 to the calculation of the compare match value.
authorrichardbarry <richardbarry@1d2547de-c912-0410-9cb9-b8ca96c0e9e2>
Mon, 23 Aug 2010 15:59:07 +0000 (15:59 +0000)
committerrichardbarry <richardbarry@1d2547de-c912-0410-9cb9-b8ca96c0e9e2>
Mon, 23 Aug 2010 15:59:07 +0000 (15:59 +0000)
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

index 241c472067bd3a711a9abe60edd6b76b1d0b283b..fb19e586e6af1b0ca4f3a42120a063bee3463933 100644 (file)
@@ -260,7 +260,7 @@ void vPortEndScheduler( void )
  */\r
 static void prvSetupTimerInterrupt( void )\r
 {\r
-const unsigned long ulCompareMatch = ( configCPU_CLOCK_HZ / portTIMER_PRESCALE ) / configTICK_RATE_HZ;\r
+const unsigned long ulCompareMatch = ( ( configCPU_CLOCK_HZ / portTIMER_PRESCALE ) / configTICK_RATE_HZ ) - 1;\r
 \r
        /* Prescale of 8. */\r
        T1CON = 0;\r