论坛元老
 
- 积分
- 4467
- 金钱
- 4467
- 注册时间
- 2013-6-27
- 在线时间
- 565 小时
|
发表于 2016-10-15 09:22:09
|
显示全部楼层
void SystickInit() // 1mS 中断一次配置
{
//
// Set up and enable the SysTick timer. It will be used as a reference
// for the delay loop.
//
/*Configuration Systick counter clk=72/8=9MHz*/
SysTick_CLKSourceConfig(SysTick_CLKSource_HCLK_Div8);
/* SysTick end of count event each 1ms with input clock equal to 9MHz (HCLK/8, default) */
SysTick_SetReload(9000);
/* Enable SysTick interrupt */
SysTick_ITConfig(ENABLE);
/* Enable Counter Start*/
SysTick_CounterCmd(SysTick_Counter_Enable);
} |
|