From 0db3b5c2583e0eb838ffd5c25ac0178e03d50988 Mon Sep 17 00:00:00 2001 From: Richard Barry Date: Thu, 15 Oct 2009 11:56:48 +0000 Subject: [PATCH] Correct the auto reload value. --- Source/portable/IAR/STR75x/port.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Source/portable/IAR/STR75x/port.c b/Source/portable/IAR/STR75x/port.c index 19fb863207..0017ec429a 100644 --- a/Source/portable/IAR/STR75x/port.c +++ b/Source/portable/IAR/STR75x/port.c @@ -212,7 +212,7 @@ TB_InitTypeDef TB_InitStructure; TB_InitStructure.TB_Mode = TB_Mode_Timing; TB_InitStructure.TB_CounterMode = TB_CounterMode_Down; TB_InitStructure.TB_Prescaler = portPRESCALE - 1; - TB_InitStructure.TB_AutoReload = ( ( configCPU_CLOCK_HZ / ( portPRESCALE + 1 ) ) / configTICK_RATE_HZ ) + 1; + TB_InitStructure.TB_AutoReload = ( ( configCPU_CLOCK_HZ / portPRESCALE ) / configTICK_RATE_HZ ); TB_Init(&TB_InitStructure); /* Enable TB Update interrupt */