Skip to content

Commit

Permalink
stm32/timer: Fix use of TIM8 on H5 MCU's.
Browse files Browse the repository at this point in the history
Signed-off-by: Damien George <damien@micropython.org>
  • Loading branch information
dpgeorge committed Sep 13, 2023
1 parent 67b1c81 commit a4d28e5
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion ports/stm32/stm32_it.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
3 changes: 2 additions & 1 deletion ports/stm32/timer.c
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit a4d28e5

Please sign in to comment.