diff options
| author | Meco Man <[email protected]> | 2024-03-07 19:53:39 -0500 |
|---|---|---|
| committer | Rbb666 <[email protected]> | 2024-03-08 09:39:57 +0800 |
| commit | 384a370c9a0bd92ff984d6ecfc077ba54a1f538a (patch) | |
| tree | f719dc8690fcdffcf830ab4202410c50c6ba021e | |
| parent | 5f87e10032e730547b87088e59551b2a3511a6ff (diff) | |
[stm32][tim-config] fix F4 TIM6's IRQ source in STM32F412
| -rw-r--r-- | bsp/stm32/libraries/HAL_Drivers/drivers/config/f4/tim_config.h | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/bsp/stm32/libraries/HAL_Drivers/drivers/config/f4/tim_config.h b/bsp/stm32/libraries/HAL_Drivers/drivers/config/f4/tim_config.h index 1d80edf3ce..08646d9af7 100644 --- a/bsp/stm32/libraries/HAL_Drivers/drivers/config/f4/tim_config.h +++ b/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 */ |
