]> git.sur5r.net Git - freertos/commitdiff
Corrected SysTick interval calculation.
authorrichardbarry <richardbarry@1d2547de-c912-0410-9cb9-b8ca96c0e9e2>
Sun, 6 Apr 2008 09:25:59 +0000 (09:25 +0000)
committerrichardbarry <richardbarry@1d2547de-c912-0410-9cb9-b8ca96c0e9e2>
Sun, 6 Apr 2008 09:25:59 +0000 (09:25 +0000)
git-svn-id: https://svn.code.sf.net/p/freertos/code/trunk@293 1d2547de-c912-0410-9cb9-b8ca96c0e9e2

Source/portable/IAR/ARM_CM3/port.c

index 5059de372552a8fca4c9d7dc31fea98c4425526a..be91fdfb30875e711c538f1e889b0b4fa55a6d13 100644 (file)
@@ -200,7 +200,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