STM32 Timer 一次计数出现两次中断?
大家看看这段代码,很简单,好像没有问题。应该能得到方波输出。extern u8 gpio_flg;void TIM2_IRQHandler(void){ if(gpio_flg==0) { gpio_flg = 1; GPIO_SetBits(GPIOB, GPIO_Pin_12); } else { gpio_flg = 0; GPIO_ResetBits(GPIOB, GPIO_Pin_12); } T
原创
2021-08-14 15:08:46 ·
1120 阅读 ·
2 评论