提交 571095e8 编写于 作者: B Bernard Xiong

Merge pull request #411 from grissiom/fix-cortex-m

bsp/{cortex-M}: fix the SysTick_Config
......@@ -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);
......
......@@ -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*/
......
......@@ -60,7 +60,7 @@ void rt_hw_board_init()
#endif
SystemCoreClockUpdate();
/* init systick 1 systick = 1/(100M / 100) 100systick = 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);
......
......@@ -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);
}
/*@}*/
......@@ -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);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册