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

Source/portable/GCC/ARM_CM3/port.c

index cc3568fdec7ca6d51bb59b7e2c5a5c009f069ec5..eb0e03340ebb05907a6bba22f726b865c648717f 100644 (file)
@@ -276,7 +276,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