= HAL_OK) { // 主从模式配置错误处理 Error_Handler(); } // 配置TIM1的中断优先级 HAL_NVIC_SetPriority(TIM1_UP_TIM10_IRQn, 0, 0); HAL_NVIC_EnableIRQ(TIM1_UP_TIM10_IRQn); } // TIM1中断服务程序 void TIM1_UP_TIM10_IRQHandler(void) { HAL_TIM_IRQHandler(&htim1); } // ...
NVIC_InitStructure.NVIC_IRQChannel = TIM1_UP_TIM10_IRQn;/*定时器1的中断通道使能*/ NVIC_...
#if !defined (TIM10_BASE) #define TIM1_IRQn TIM1_UP_IRQn #define TIM1_IRQHandler TIM1_UP_IRQHandler #else #define TIM1_IRQn TIM1_UP_TIM10_IRQn #define TIM1_IRQHandler TIM1_UP_TIM10_IRQHandler #endif #elif defined(STM32H7xx) || defined(STM32MP1xx) #define TIM1_IRQn TIM1_UP_...
159. else if (TIMx == TIM9) irq = TIM1_BRK_TIM9_IRQn; 160. else if (TIMx == TIM10) irq = TIM1_UP_TIM10_IRQn; 161. else if (TIMx == TIM11) irq = TIM1_TRG_COM_TIM11_IRQn; 162. else if (TIMx == TIM12) irq = TIM8_BRK_TIM12_IRQn; 163. else if (TIMx == ...
NVIC_InitStructure.NVIC_IRQChannel = TIM1_UP_TIM10_IRQn;/*定时器1的中断通道使能*/ NVIC_InitStructure.NVIC_IRQChannelCmd = ENABLE;/*定时器1的中断通道使能*/ NVIC_InitStructure.NVIC_IRQChannelPreemptionPriority = 0;/*抢占优先级*/ NVIC_InitStructure.NVIC_IRQChannelSubPriority = 2;/*响应优先级*/ NV...
128. if (TIMx == TIM1) irq = TIM1_UP_IRQn; 129. else if (TIMx == TIM2) irq = TIM2_IRQn; 130. else if (TIMx == TIM3) irq = TIM3_IRQn; 131. else if (TIMx == TIM4) irq = TIM4_IRQn; 132. else if (TIMx == TIM5) irq = TIM5_IRQn; ...
【原创】stm32f407的TIM1的中断和PWM
stm32f10x_nvic.h 里 在 3.0 以上的库. 用 TIM1_UP_IRQn 了, 定义在 stm32f10x.h 里 ...
NVIC_InitStructure.NVIC_IRQChannel = TIM1_UP_IRQChannel;//TIM1_UP_IRQn;NVIC_InitStructure.NVIC_...
\SrcWrapper\src\stm32\timer.c: In function 'getTimerUpIrq': C:\Users\user\AppData\Local\Arduino15\packages\STM32\hardware\stm32\1.8.0\cores\arduino/stm32/timer.h:54:19: error: 'TIM1_UP_TIM10_IRQn' undeclared (first use in this function); did you mean 'TIM1_BRK_TIM9_IRQn'?