From e85c55a9a70f8f357aceba4cbacd7762ca773d7b Mon Sep 17 00:00:00 2001 From: Piotr Esden-Tempski Date: Mon, 31 Jan 2011 16:15:09 -0800 Subject: Added timer flag reset function. --- examples/stm32/stm32-h103/pwm_6step/pwm_6step.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'examples/stm32/stm32-h103/pwm_6step/pwm_6step.c') 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 -- cgit v1.2.3