cancel
Showing results for 
Search instead for 
Did you mean: 

STM32L Possibility of timer expiry missing

darla14
Senior
Posted on March 25, 2016 at 11:51

I have Timer1(TIM1) channels configured @ different frequencies.I have loaded appropriate values inside the uhCCRX_Val register as well.The frequencies for channel 1,2 and 4 are 10,100 and 1 Hz , that means i must get the timer expiry at 100,10 and 1000 ms respectively.Since they are multiple of each other , is there a possibility of missing the timer expiries for any one.

for example

T1--channel1-->100ms,

T1--channel2-->10ms,

T1--channel4-->1000ms,

so at 1000ms I will get the expiries for channel 2 as well 4 after 10 and 100th time respectively besides for channel4 after 1th time.Is there any possibility that I may miss the expiries for any oneof them or all three expiries are bound to be captured.

 

#timers #discovery #stm32f4 #!stm32
11 REPLIES 11
Radosław
Senior II
Posted on March 28, 2016 at 17:21

Posted on March 28, 2016 at 19:47

Writing zero clears ALL pending interrupts, whether you have read the state in the previous time displaced read, or not. There is a race hazard

Both RMW and BB forms are dangerous in this case, as X & 0 = 0 in all cases. The hardware was designed to clear using a mask to eliminate the hazard.

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..