summaryrefslogtreecommitdiff
path: root/Source
diff options
context:
space:
mode:
authorrichardbarry <richardbarry@1d2547de-c912-0410-9cb9-b8ca96c0e9e2>2008-04-16 16:29:28 +0000
committerrichardbarry <richardbarry@1d2547de-c912-0410-9cb9-b8ca96c0e9e2>2008-04-16 16:29:28 +0000
commit276e605e668a0aa8f2366435767574f088aeae9c (patch)
tree11d636ab2b2fde2e6b17d24e1ec8f978230814a3 /Source
parent0eecfcb76fab10c08d7182d5f18043a4bc6e488f (diff)
downloadfreertos-276e605e668a0aa8f2366435767574f088aeae9c.tar.gz
freertos-276e605e668a0aa8f2366435767574f088aeae9c.tar.bz2
freertos-276e605e668a0aa8f2366435767574f088aeae9c.tar.xz
Correct timer calculation.
git-svn-id: https://freertos.svn.sourceforge.net/svnroot/freertos/trunk@327 1d2547de-c912-0410-9cb9-b8ca96c0e9e2
Diffstat (limited to 'Source')
-rw-r--r--Source/portable/GCC/STR75x/port.c2
-rw-r--r--Source/portable/IAR/STR75x/port.c2
2 files changed, 2 insertions, 2 deletions
diff --git a/Source/portable/GCC/STR75x/port.c b/Source/portable/GCC/STR75x/port.c
index 3050a622..2cce4c64 100644
--- a/Source/portable/GCC/STR75x/port.c
+++ b/Source/portable/GCC/STR75x/port.c
@@ -192,7 +192,7 @@ TB_InitTypeDef TB_InitStructure;
/* Setup the TB for the generation of the tick interrupt. */
TB_InitStructure.TB_Mode = TB_Mode_Timing;
TB_InitStructure.TB_CounterMode = TB_CounterMode_Down;
- TB_InitStructure.TB_Prescaler = portPRESCALE;
+ TB_InitStructure.TB_Prescaler = portPRESCALE - 1;
TB_InitStructure.TB_AutoReload = ( ( configCPU_CLOCK_HZ / ( portPRESCALE + 1 ) ) / configTICK_RATE_HZ ) + 1;
TB_Init(&TB_InitStructure);
diff --git a/Source/portable/IAR/STR75x/port.c b/Source/portable/IAR/STR75x/port.c
index d6e3a339..588508e0 100644
--- a/Source/portable/IAR/STR75x/port.c
+++ b/Source/portable/IAR/STR75x/port.c
@@ -207,7 +207,7 @@ TB_InitTypeDef TB_InitStructure;
/* Setup the TB for the generation of the tick interrupt. */
TB_InitStructure.TB_Mode = TB_Mode_Timing;
TB_InitStructure.TB_CounterMode = TB_CounterMode_Down;
- TB_InitStructure.TB_Prescaler = portPRESCALE;
+ TB_InitStructure.TB_Prescaler = portPRESCALE - 1;
TB_InitStructure.TB_AutoReload = ( ( configCPU_CLOCK_HZ / ( portPRESCALE + 1 ) ) / configTICK_RATE_HZ ) + 1;
TB_Init(&TB_InitStructure);