aboutsummaryrefslogtreecommitdiff
path: root/examples/stm32/stm32-h103
diff options
context:
space:
mode:
Diffstat (limited to 'examples/stm32/stm32-h103')
-rw-r--r--examples/stm32/stm32-h103/pwm_6step/pwm_6step.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/examples/stm32/stm32-h103/pwm_6step/pwm_6step.c b/examples/stm32/stm32-h103/pwm_6step/pwm_6step.c
index 9c04c9b..cf53ac6 100644
--- a/examples/stm32/stm32-h103/pwm_6step/pwm_6step.c
+++ b/examples/stm32/stm32-h103/pwm_6step/pwm_6step.c
@@ -253,7 +253,8 @@ void tim1_trg_com_isr(void)
{
static int step = 0;
- TIM1_SR &= ~TIM_SR_COMIF;
+ /* Clear the COM trigger interrupt flag. */
+ timer_clear_flag(TIM1, TIM_SR_COMIF);
/* A simplified and inefficient implementation of PWM On
* scheme. Look at the implementation in Open-BLDC on