cancel
Showing results for 
Search instead for 
Did you mean: 

STM32F407IET Timer Gated Mode

Jm3
Associate II

Hello, 

I am using the STM32F407IET in one of my projects and I have timer 1 set us as follows below 

Jm3_0-1743517295652.png

Jm3_1-1743517313084.png

Jm3_2-1743517350952.png

currently my channel 1 is used to record the positive rises on a incoming pulse signal and what I want to do is use the gated mode to be able to tell me when the pulse is high this way I should be able to calculate duty cycle. the issue that I am currently facing is the gated count can elapse before my DMA interrupt flags so I'm struggling to measure anything with over ~5% duty cycle. is there a way on this timer to throw an interrupt when the count has elapsed? 

for example I have another timer set up to so when the count reaches the end of its counting period it throws an interrupt so I can set a bunch of flags every second and that's using the global interrupt but for some reason timer 1 doesn't have a global interrupt and I don't know how to make it interrupt from the timer. 

if you need any more information please let me know and hopefully that makes sense. 

Thank you

 

2 REPLIES 2

I have no idea whatsoever what do you want to achieve. Try to draw a timing diagram.

JW

All I want to be able to do is have an interrupt when the count on timer 1 elapses?