]> git.sur5r.net Git - freertos/commitdiff
Corrected SysTick interval calculation.
authorrichardbarry <richardbarry@1d2547de-c912-0410-9cb9-b8ca96c0e9e2>
Sun, 6 Apr 2008 09:26:51 +0000 (09:26 +0000)
committerrichardbarry <richardbarry@1d2547de-c912-0410-9cb9-b8ca96c0e9e2>
Sun, 6 Apr 2008 09:26:51 +0000 (09:26 +0000)
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

index 98a404d5af5b9c6a51771b8b7509fbddb9873805..3fe98a99e48addf2a6ec51ba7edcef9d178e420e 100644 (file)
@@ -257,7 +257,7 @@ void xPortSysTickHandler( void )
 void prvSetupTimerInterrupt( void )\r
 {\r
        /* Configure SysTick to interrupt at the requested rate. */\r
-       *(portNVIC_SYSTICK_LOAD) = configCPU_CLOCK_HZ / configTICK_RATE_HZ;\r
+       *(portNVIC_SYSTICK_LOAD) = ( configCPU_CLOCK_HZ / configTICK_RATE_HZ ) - 1UL;\r
        *(portNVIC_SYSTICK_CTRL) = portNVIC_SYSTICK_CLK | portNVIC_SYSTICK_INT | portNVIC_SYSTICK_ENABLE;\r
 }\r
 /*-----------------------------------------------------------*/\r