stm32 红牛开发板 跑ucos
为什么 我加了下面几句就是想用串口中断
NVIC_InitStructure.NVIC_IRQChannel = USART1_IRQChannel;
NVIC_InitStructure.NVIC_IRQChannelPreemptionPriority = 2;
NVIC_InitStructure.NVIC_IRQChannelSubPriority = 1;
NVIC_InitStructure.NVIC_IRQChannelCmd = ENABLE;
NVIC_Init(&NVIC_InitStructure);
加完之后怎么不进void SysTickHandler(void)中断了呢
systick初始化如下:
void SysTick_Config(void)
{
RCC_ClocksTypeDef rcc_clocks;
INT32U cnts;
RCC_GetClocksFreq(&rcc_clocks);
cnts = (INT32U)rcc_clocks.HCLK_Frequency/OS_TICKS_PER_SEC;
SysTick_SetReload(cnts);
SysTick_CLKSourceConfig(SysTick_CLKSource_HCLK);
SysTick_CounterCmd(SysTick_Counter_Enable);
SysTick_ITConfig(ENABLE);
}
是串口的什么 设置影响了 systick呢
刚接触STM32 谢谢各位 |