初级会员

- 积分
- 158
- 金钱
- 158
- 注册时间
- 2016-1-18
- 在线时间
- 21 小时
|

楼主 |
发表于 2016-6-2 10:58:10
|
显示全部楼层
void SysTick_Configuration(void)
{
//-------------------------------------------------------
//Start: Initialize SysTick timer and set period at 1ms
// set SysTick clock source to HCLK=SYSCLK=72MHz
SysTick_CLKSourceConfig(SysTick_CLKSource_HCLK);
// Set SysTick Preemption Priority to 3, sub-priority to 1
NVIC_SystemHandlerPriorityConfig(SystemHandler_SysTick, 1, 2); // SysTick preemption priority = 3
// SysTick interrupt period in us = value / 72
SysTick_SetReload(SYSTICK_US * SYS_CLK_MHz);
// Enable the SysTick Interrupt
SysTick_ITConfig(ENABLE);
// Do not enable the SysTick Counter until all global variables have been properly initialized
SysTick_CounterCmd(SysTick_Counter_Enable);
SysTick_ITConfig(ENABLE);//ê1?üSysTick?D??
// Refer to stm32f10x_it.c - void SysTickHandler(void)
//End: Initialize SysTick timer and set period at 100us
//-------------------------------------------------------
}
上面配置 程序
在执行中断的时候 是没用清除中断的 他是不是每1MS执行一次 可不可以 认为 不用清除中断那
|
|