This is an automated email from the ASF dual-hosted git repository.

jerzy pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/mynewt-core.git


The following commit(s) were added to refs/heads/master by this push:
     new 2640b48d5 mcu/stm32: Fix TIM6 timer interrupt number
2640b48d5 is described below

commit 2640b48d5a9ed2c2fee937fc3af21d892d07b900
Author: Jerzy Kasenberg <[email protected]>
AuthorDate: Wed Mar 6 13:30:30 2024 +0100

    mcu/stm32: Fix TIM6 timer interrupt number
    
    Most supported device have TIM6_DAC_IRQn.
    STM32U5xx and STM32L1xx line has TIM6_IRQn.
    So default is changed to TIM6_DAC_IRQn while U5
    overrides it to TIM6_IRQn
    
    Signed-off-by: Jerzy Kasenberg <[email protected]>
---
 hw/mcu/stm/stm32_common/include/stm32_common/stm32_hal.h | 2 +-
 hw/mcu/stm/stm32l1xx/include/mcu/stm32_hal.h             | 1 +
 hw/mcu/stm/stm32u5xx/include/mcu/stm32_hal.h             | 1 +
 3 files changed, 3 insertions(+), 1 deletion(-)

diff --git a/hw/mcu/stm/stm32_common/include/stm32_common/stm32_hal.h 
b/hw/mcu/stm/stm32_common/include/stm32_common/stm32_hal.h
index 3124715b6..7d67d25a7 100644
--- a/hw/mcu/stm/stm32_common/include/stm32_common/stm32_hal.h
+++ b/hw/mcu/stm/stm32_common/include/stm32_common/stm32_hal.h
@@ -56,7 +56,7 @@ void stm32_periph_create(void);
 #define STM32_HAL_TIMER_TIM4_IRQ    TIM4_IRQn
 #endif
 #ifndef STM32_HAL_TIMER_TIM6_IRQ
-#define STM32_HAL_TIMER_TIM6_IRQ    TIM6_IRQn
+#define STM32_HAL_TIMER_TIM6_IRQ    TIM6_DAC_IRQn
 #endif
 #ifndef STM32_HAL_TIMER_TIM7_IRQ
 #define STM32_HAL_TIMER_TIM7_IRQ    TIM7_IRQn
diff --git a/hw/mcu/stm/stm32l1xx/include/mcu/stm32_hal.h 
b/hw/mcu/stm/stm32l1xx/include/mcu/stm32_hal.h
index 38630cf36..2591841f8 100644
--- a/hw/mcu/stm/stm32l1xx/include/mcu/stm32_hal.h
+++ b/hw/mcu/stm/stm32l1xx/include/mcu/stm32_hal.h
@@ -73,6 +73,7 @@ struct stm32_hal_spi_cfg {
 
 #define STM32_HAL_TIMER_MAX     (3)
 
+#define STM32_HAL_TIMER_TIM6_IRQ    TIM6_IRQn
 #define STM32_HAL_TIMER_TIM9_IRQ    TIM9_IRQn
 #define STM32_HAL_TIMER_TIM10_IRQ   TIM10_IRQn
 #define STM32_HAL_TIMER_TIM11_IRQ   TIM11_IRQn
diff --git a/hw/mcu/stm/stm32u5xx/include/mcu/stm32_hal.h 
b/hw/mcu/stm/stm32u5xx/include/mcu/stm32_hal.h
index 72d4ab36c..946f0997b 100644
--- a/hw/mcu/stm/stm32u5xx/include/mcu/stm32_hal.h
+++ b/hw/mcu/stm/stm32u5xx/include/mcu/stm32_hal.h
@@ -65,6 +65,7 @@ struct stm32_hal_spi_cfg {
 
 #define STM32_HAL_TIMER_TIM1_IRQ    TIM1_UP_IRQn
 #define STM32_HAL_TIMER_TIM8_IRQ    TIM8_UP_IRQn
+#define STM32_HAL_TIMER_TIM6_IRQ    TIM6_IRQn
 #define STM32_HAL_TIMER_TIM15_IRQ   TIM15_IRQn
 #define STM32_HAL_TIMER_TIM16_IRQ   TIM16_IRQn
 #define STM32_HAL_TIMER_TIM17_IRQ   TIM17_IRQn

Reply via email to