Skip to content

Commit d984480

Browse files
authored
Merge pull request ARMmbed#12295 from jeromecoutant/PR_PR_H7_TIM17
STM32H7 correct PWMOUT instances
2 parents 159a57b + 9f42a58 commit d984480

File tree

1 file changed

+5
-29
lines changed

1 file changed

+5
-29
lines changed

targets/TARGET_STM/TARGET_STM32H7/pwmout_device.c

Lines changed: 5 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -34,42 +34,18 @@
3434
#if DEVICE_PWMOUT
3535

3636
const pwm_apb_map_t pwm_apb_map_table[] = {
37-
#if defined(TIM2_BASE)
37+
{PWM_1, PWMOUT_ON_APB2},
3838
{PWM_2, PWMOUT_ON_APB1},
39-
#endif
40-
#if defined(TIM3_BASE)
4139
{PWM_3, PWMOUT_ON_APB1},
42-
#endif
43-
#if defined(TIM4_BASE)
4440
{PWM_4, PWMOUT_ON_APB1},
45-
#endif
46-
#if defined(TIM5_BASE)
4741
{PWM_5, PWMOUT_ON_APB1},
48-
#endif
49-
#if defined(TIM12_BASE)
42+
{PWM_8, PWMOUT_ON_APB2},
5043
{PWM_12, PWMOUT_ON_APB1},
51-
#endif
52-
#if defined(TIM13_BASE)
5344
{PWM_13, PWMOUT_ON_APB1},
54-
#endif
55-
#if defined(TIM14_BASE)
5645
{PWM_14, PWMOUT_ON_APB1},
57-
#endif
58-
#if defined(TIM1_BASE)
59-
{PWM_1, PWMOUT_ON_APB2},
60-
#endif
61-
#if defined(TIM8_BASE)
62-
{PWM_8, PWMOUT_ON_APB2},
63-
#endif
64-
#if defined(TIM9_BASE)
65-
{PWM_9, PWMOUT_ON_APB2},
66-
#endif
67-
#if defined(TIM10_BASE)
68-
{PWM_10, PWMOUT_ON_APB2},
69-
#endif
70-
#if defined(TIM11_BASE)
71-
{PWM_11, PWMOUT_ON_APB2},
72-
#endif
46+
{PWM_15, PWMOUT_ON_APB2},
47+
{PWM_16, PWMOUT_ON_APB2},
48+
{PWM_17, PWMOUT_ON_APB2},
7349
{(PWMName) 0, PWMOUT_UNKNOWN}
7450
};
7551

0 commit comments

Comments
 (0)