cancel
Showing results for 
Search instead for 
Did you mean: 

STM32F429 TIM1 trigger flag (TIF) issue

I have TIM1 configured in one pulse mode triggered by rising edge on TIM1_CH1 to generate single pulse. Timer works correctly (generate single pulse for each rising edge on input). Datasheet claims that TIF flag is set on trigger event in all modes but gated mode. In gated mode flag is set when timer starts and also when stops. I am running timer in trigger mode but flag is rised when trigger event and also when timer stops. Like in gated mode. Looks like a bug. Has anyone observed this problem as well?

1 ACCEPTED SOLUTION

Accepted Solutions

Problem solved (as always my mistake). I've used TI1F_ED instead TI1FP1. TI1F_ED generate impulses on rising and falling edge of input signal. My input pulse has accidentally almost same length like timer ouput pulse and therefore second inpulse from Timer edge detector comes at same time as timer stops. That confused me and i hought that second "trigger" flag comes from timer stop...but in reality it comes from falling edge of input signal.

View solution in original post

4 REPLIES 4

Hm interesting.

Are you sure the trigger source does not generate another pulse which you see as the second TIF?

How exactly do you observe this?

JW

I am pretty sure. I am monitoring input signal on PCB by scope and it is clean. I am also monitoring timer output pin and see one pulse and also watching UPDATE flag (rised only once when timer stops). Everything works as it should except TIF, which behave like in "GATE" mode...

Problem solved (as always my mistake). I've used TI1F_ED instead TI1FP1. TI1F_ED generate impulses on rising and falling edge of input signal. My input pulse has accidentally almost same length like timer ouput pulse and therefore second inpulse from Timer edge detector comes at same time as timer stops. That confused me and i hought that second "trigger" flag comes from timer stop...but in reality it comes from falling edge of input signal.

Thanks for coming back with the solution. Sounds confusing indeed.

Please select your post as Best so that thread is marked as solved.

JW