From c5659251694d9fd575b7e2eea223260c04ddb6f5 Mon Sep 17 00:00:00 2001 From: Grissiom Date: Fri, 9 Jan 2015 15:26:06 +0800 Subject: [PATCH] bsp/{cortex-M}: fix the SysTick_Config SysTick_Config substract one inside the function. So there is no need to substract one when passing the parameter. --- bsp/lpc178x/drivers/board.c | 2 +- bsp/lpc408x/applications/board.c | 2 +- bsp/lpc5410x/applications/board.c | 2 +- bsp/mb9bf500r/board.c | 2 +- bsp/xplorer4330/drivers/board.c | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/bsp/lpc178x/drivers/board.c b/bsp/lpc178x/drivers/board.c index cb974bfa07..42cc85912a 100644 --- a/bsp/lpc178x/drivers/board.c +++ b/bsp/lpc178x/drivers/board.c @@ -65,7 +65,7 @@ void rt_hw_board_init() #endif /* init systick */ - SysTick_Config( SystemCoreClock/RT_TICK_PER_SECOND - 1); + SysTick_Config(SystemCoreClock/RT_TICK_PER_SECOND); /* set pend exception priority */ NVIC_SetPriority(PendSV_IRQn, (1<<__NVIC_PRIO_BITS) - 1); diff --git a/bsp/lpc408x/applications/board.c b/bsp/lpc408x/applications/board.c index d703b1583e..f50148ae1c 100644 --- a/bsp/lpc408x/applications/board.c +++ b/bsp/lpc408x/applications/board.c @@ -52,7 +52,7 @@ void rt_hw_board_init() #endif /* init systick */ - SysTick_Config(SystemCoreClock / RT_TICK_PER_SECOND - 1); + SysTick_Config(SystemCoreClock / RT_TICK_PER_SECOND); /* set pend exception priority */ NVIC_SetPriority(PendSV_IRQn, (1 << __NVIC_PRIO_BITS) - 1); /*init uart device*/ diff --git a/bsp/lpc5410x/applications/board.c b/bsp/lpc5410x/applications/board.c index d6be4bd50c..1fc1803dfc 100644 --- a/bsp/lpc5410x/applications/board.c +++ b/bsp/lpc5410x/applications/board.c @@ -60,7 +60,7 @@ void rt_hw_board_init() #endif SystemCoreClockUpdate(); /* init systick 1 systick = 1/(100M / 100) 100¸ösystick = 1s*/ - SysTick_Config(SystemCoreClock / RT_TICK_PER_SECOND - 1); + SysTick_Config(SystemCoreClock / RT_TICK_PER_SECOND); /* set pend exception priority */ NVIC_SetPriority(PendSV_IRQn, (1 << __NVIC_PRIO_BITS) - 1); diff --git a/bsp/mb9bf500r/board.c b/bsp/mb9bf500r/board.c index c488471b44..f9f83d99ed 100644 --- a/bsp/mb9bf500r/board.c +++ b/bsp/mb9bf500r/board.c @@ -48,7 +48,7 @@ void SysTick_Handler(void) void rt_hw_board_init() { /* init systick */ - SysTick_Config(SystemFrequency/RT_TICK_PER_SECOND - 1); + SysTick_Config(SystemFrequency/RT_TICK_PER_SECOND); } /*@}*/ diff --git a/bsp/xplorer4330/drivers/board.c b/bsp/xplorer4330/drivers/board.c index 421298c19e..b0621b8238 100644 --- a/bsp/xplorer4330/drivers/board.c +++ b/bsp/xplorer4330/drivers/board.c @@ -56,7 +56,7 @@ void rt_hw_board_init() SystemCoreClockUpdate(); /* init systick */ - SysTick_Config(SystemCoreClock / RT_TICK_PER_SECOND - 1); + SysTick_Config(SystemCoreClock / RT_TICK_PER_SECOND); /* set pend exception priority */ NVIC_SetPriority(PendSV_IRQn, (1 << __NVIC_PRIO_BITS) - 1); -- GitLab