]> git.sur5r.net Git - freertos/commitdiff
Add the usual missing -1.
authorrichardbarry <richardbarry@1d2547de-c912-0410-9cb9-b8ca96c0e9e2>
Mon, 5 May 2008 08:41:25 +0000 (08:41 +0000)
committerrichardbarry <richardbarry@1d2547de-c912-0410-9cb9-b8ca96c0e9e2>
Mon, 5 May 2008 08:41:25 +0000 (08:41 +0000)
git-svn-id: https://svn.code.sf.net/p/freertos/code/trunk@336 1d2547de-c912-0410-9cb9-b8ca96c0e9e2

Source/portable/MPLAB/PIC32MX/port.c

index 7e021d4c27949f81658c22e102358a7eb9a751f6..01bcf4a0d80eeeaebcc1c2caeaef49b990613a01 100644 (file)
@@ -134,7 +134,7 @@ portSTACK_TYPE *pxPortInitialiseStack( portSTACK_TYPE *pxTopOfStack, pdTASK_CODE
  */\r
 void prvSetupTimerInterrupt( void )\r
 {\r
-const unsigned portLONG ulCompareMatch = (configPERIPHERAL_CLOCK_HZ / portTIMER_PRESCALE) / configTICK_RATE_HZ;\r
+const unsigned portLONG ulCompareMatch = ( (configPERIPHERAL_CLOCK_HZ / portTIMER_PRESCALE) / configTICK_RATE_HZ ) - 1;\r
 \r
        OpenTimer1( ( T1_ON | T1_PS_1_8 | T1_SOURCE_INT ), ulCompareMatch );\r
        ConfigIntTimer1( T1_INT_ON | configKERNEL_INTERRUPT_PRIORITY );\r