From 452df14af9cd616041da60538819fe6c78c84008 Mon Sep 17 00:00:00 2001 From: richardbarry Date: Sun, 6 Apr 2008 09:26:51 +0000 Subject: [PATCH] Corrected SysTick interval calculation. git-svn-id: https://svn.code.sf.net/p/freertos/code/trunk@294 1d2547de-c912-0410-9cb9-b8ca96c0e9e2 --- Source/portable/RVDS/ARM_CM3/port.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Source/portable/RVDS/ARM_CM3/port.c b/Source/portable/RVDS/ARM_CM3/port.c index 98a404d5a..3fe98a99e 100644 --- a/Source/portable/RVDS/ARM_CM3/port.c +++ b/Source/portable/RVDS/ARM_CM3/port.c @@ -257,7 +257,7 @@ void xPortSysTickHandler( void ) void prvSetupTimerInterrupt( void ) { /* Configure SysTick to interrupt at the requested rate. */ - *(portNVIC_SYSTICK_LOAD) = configCPU_CLOCK_HZ / configTICK_RATE_HZ; + *(portNVIC_SYSTICK_LOAD) = ( configCPU_CLOCK_HZ / configTICK_RATE_HZ ) - 1UL; *(portNVIC_SYSTICK_CTRL) = portNVIC_SYSTICK_CLK | portNVIC_SYSTICK_INT | portNVIC_SYSTICK_ENABLE; } /*-----------------------------------------------------------*/ -- 2.39.5