本帖最后由 yzzly 于 2011-12-27 12:56 编辑
TIM6中断配置
NVIC_InitStructure.NVIC_IRQChannel = TIM6_IRQChannel;
NVIC_InitStructure.NVIC_IRQChannelPreemptionPriority = 2;
NVIC_InitStructure.NVIC_IRQChannelSubPriority = 0;
NVIC_InitStructure.NVIC_IRQChannelCmd = ENABLE;
NVIC_Init(&NVIC_InitStructure);
void SysTick_Configuration(void)
{
SysTick->CTRL |= SysTick_CLKSource_HCLK;
SysTick->LOAD = SysTick_Delay*AHBCLK/1000;
SysTick->CTRL |= 0x02; //使能系统定时器中断
}
TIM6的中断函数内有个延时,而延时时基就是系统Tick的中断,现在的问题是一旦进入TIM6的中断延时就死了,是Tick不能中断造成的。进入TIM6中断后如何使Tick的中断不受影响?谢谢!
顺便问问,哪个资料上有NVIC寄存器的详细介绍?? |