2015-10-05 10:44 PM
In my application, I have a timer generating periodic interrupts. In its ISR a certain number of PWM cycles needs to be generated on a GPIO pin. I first use another timer to time the duration, but it is not very deterministic since the PWM termination is influenced by other events, and it can end up in logic high sometimes. I can also do some integer counting in main() function, but it is less efficient. Is there a simple and efficient way of doing this?
#stm32f4 #discovery #timers2015-10-06 12:54 AM
The second ''supervising'' timer might trigger a DMA transfer into the first's register(s) which would set the first to inactive.
To avoid hazard, you could set ARR to 0 and use shadowing. JW