From b1df7ae67788a1041cf5af4db44a0b133a0b71d2 Mon Sep 17 00:00:00 2001 From: richardbarry Date: Mon, 5 May 2008 08:41:25 +0000 Subject: [PATCH] Add the usual missing -1. git-svn-id: https://svn.code.sf.net/p/freertos/code/trunk@336 1d2547de-c912-0410-9cb9-b8ca96c0e9e2 --- Source/portable/MPLAB/PIC32MX/port.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Source/portable/MPLAB/PIC32MX/port.c b/Source/portable/MPLAB/PIC32MX/port.c index 7e021d4c2..01bcf4a0d 100644 --- a/Source/portable/MPLAB/PIC32MX/port.c +++ b/Source/portable/MPLAB/PIC32MX/port.c @@ -134,7 +134,7 @@ portSTACK_TYPE *pxPortInitialiseStack( portSTACK_TYPE *pxTopOfStack, pdTASK_CODE */ void prvSetupTimerInterrupt( void ) { -const unsigned portLONG ulCompareMatch = (configPERIPHERAL_CLOCK_HZ / portTIMER_PRESCALE) / configTICK_RATE_HZ; +const unsigned portLONG ulCompareMatch = ( (configPERIPHERAL_CLOCK_HZ / portTIMER_PRESCALE) / configTICK_RATE_HZ ) - 1; OpenTimer1( ( T1_ON | T1_PS_1_8 | T1_SOURCE_INT ), ulCompareMatch ); ConfigIntTimer1( T1_INT_ON | configKERNEL_INTERRUPT_PRIORITY ); -- 2.39.5