summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDamien George <damien@micropython.org>2023-09-13 16:07:49 +1000
committerDamien George <damien@micropython.org>2023-09-13 16:48:15 +1000
commita4d28e5279ff8d4b8b4676abcd86687c44be5e64 (patch)
tree0f8c842fbf09b2fbebfe63c34efd6df7432384ae
parent67b1c81f69d6cd1c5ad9c35bb68f4490e94865e5 (diff)
stm32/timer: Fix use of TIM8 on H5 MCU's.
Signed-off-by: Damien George <damien@micropython.org>
-rw-r--r--ports/stm32/stm32_it.c2
-rw-r--r--ports/stm32/timer.c3
2 files changed, 3 insertions, 2 deletions
diff --git a/ports/stm32/stm32_it.c b/ports/stm32/stm32_it.c
index 483537b64..7363e26e8 100644
--- a/ports/stm32/stm32_it.c
+++ b/ports/stm32/stm32_it.c
@@ -786,7 +786,7 @@ void TIM8_UP_TIM13_IRQHandler(void) {
IRQ_EXIT(TIM8_UP_TIM13_IRQn);
}
-#if defined(STM32G4) || defined(STM32L4)
+#if defined(STM32G4) || defined(STM32H5) || defined(STM32L4)
void TIM8_UP_IRQHandler(void) {
IRQ_ENTER(TIM8_UP_IRQn);
timer_irq_handler(8);
diff --git a/ports/stm32/timer.c b/ports/stm32/timer.c
index 5319ae4ec..5f2e213a0 100644
--- a/ports/stm32/timer.c
+++ b/ports/stm32/timer.c
@@ -884,10 +884,11 @@ STATIC const uint32_t tim_instance_table[MICROPY_HW_MAX_TIMER] = {
TIM_ENTRY(7, TIM7_IRQn),
#endif
#endif
+
#if defined(TIM8)
#if defined(STM32F4) || defined(STM32F7) || defined(STM32H7)
TIM_ENTRY(8, TIM8_UP_TIM13_IRQn),
- #elif defined(STM32G4) || defined(STM32L4)
+ #else
TIM_ENTRY(8, TIM8_UP_IRQn),
#endif
#endif