]> git.sur5r.net Git - freertos/commitdiff
Correct timer calculation.
authorrichardbarry <richardbarry@1d2547de-c912-0410-9cb9-b8ca96c0e9e2>
Wed, 16 Apr 2008 16:29:28 +0000 (16:29 +0000)
committerrichardbarry <richardbarry@1d2547de-c912-0410-9cb9-b8ca96c0e9e2>
Wed, 16 Apr 2008 16:29:28 +0000 (16:29 +0000)
git-svn-id: https://svn.code.sf.net/p/freertos/code/trunk@327 1d2547de-c912-0410-9cb9-b8ca96c0e9e2

Source/portable/GCC/STR75x/port.c
Source/portable/IAR/STR75x/port.c

index 3050a622148be3b34662ea393fa869a37b0aa992..2cce4c643db9ed169216999ef7a87d766c953b84 100644 (file)
@@ -192,7 +192,7 @@ TB_InitTypeDef      TB_InitStructure;
        /* Setup the TB for the generation of the tick interrupt. */\r
        TB_InitStructure.TB_Mode = TB_Mode_Timing;\r
        TB_InitStructure.TB_CounterMode = TB_CounterMode_Down;\r
-       TB_InitStructure.TB_Prescaler = portPRESCALE;\r
+       TB_InitStructure.TB_Prescaler = portPRESCALE - 1;\r
        TB_InitStructure.TB_AutoReload = ( ( configCPU_CLOCK_HZ / ( portPRESCALE + 1 ) ) / configTICK_RATE_HZ ) + 1;\r
        TB_Init(&TB_InitStructure);\r
        \r
index d6e3a339b92a1612da1316ab65cdac9bbc0d7443..588508e01abca88d210843c34b5cbcd58a625f81 100644 (file)
@@ -207,7 +207,7 @@ TB_InitTypeDef      TB_InitStructure;
        /* Setup the TB for the generation of the tick interrupt. */\r
        TB_InitStructure.TB_Mode = TB_Mode_Timing;\r
        TB_InitStructure.TB_CounterMode = TB_CounterMode_Down;\r
-       TB_InitStructure.TB_Prescaler = portPRESCALE;\r
+       TB_InitStructure.TB_Prescaler = portPRESCALE - 1;\r
        TB_InitStructure.TB_AutoReload = ( ( configCPU_CLOCK_HZ / ( portPRESCALE + 1 ) ) / configTICK_RATE_HZ ) + 1;\r
        TB_Init(&TB_InitStructure);\r
        \r