2016-03-25 03:51 AM
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 #!stm322016-03-28 08:21 AM
2016-03-28 10:47 AM
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.