소스 검색

[stm32][tim-config] fix F4 TIM6's IRQ source in STM32F412

Meco Man 1 년 전
부모
커밋
384a370c9a
1개의 변경된 파일9개의 추가작업 그리고 0개의 파일을 삭제
  1. 9 0
      bsp/stm32/libraries/HAL_Drivers/drivers/config/f4/tim_config.h

+ 9 - 0
bsp/stm32/libraries/HAL_Drivers/drivers/config/f4/tim_config.h

@@ -74,12 +74,21 @@ extern "C" {
 
 #ifdef BSP_USING_TIM6
 #ifndef TIM6_CONFIG
+#if defined(STM32F412Cx) || defined(STM32F412Rx) || defined(STM32F412Vx) || defined(STM32F412Zx)
+#define TIM6_CONFIG                                         \
+    {                                                       \
+       .tim_handle.Instance     = TIM6,                     \
+       .tim_irqn                = TIM6_IRQn,                \
+       .name                    = "timer6",                 \
+    }
+#else
 #define TIM6_CONFIG                                         \
     {                                                       \
        .tim_handle.Instance     = TIM6,                     \
        .tim_irqn                = TIM6_DAC_IRQn,            \
        .name                    = "timer6",                 \
     }
+#endif /* defined(STM32F412Cx) || defined(STM32F412Rx) || defined(STM32F412Vx) || defined(STM32F412Zx) */
 #endif /* TIM6_CONFIG */
 #endif /* BSP_USING_TIM6 */