I need things to happen at precise (down to the clock, ~5.5ns at 180MHz) periods of time based on a list; let's say 5 periods of 444444, 555555, 666666, 777777 and 888888 timer clocks (obviously a 32bit timer clock).
I propose the following:
- I set TIM2 "TIM_Period" with the first period. I set clock to system clock. I set it to trigger itself (is that possible?). I also set up an ISR to get fired at same time
- I start TIM2.
I pre-load the next "TIM_Period" in the timer, somehow that it will only be "effective" after it "fires/updates".
In ISR I increment an index through the array of values: If a next value exists I pre-load it into "TIM_Period" so TIM2 loads it next time. If no next value I turn off the self triggering. Other things might be done in the ISR as long as short enough to end before next timer firing.
If this works, could I (in the ISR, based on some list) also set up other timers to be triggered by this main timer?
Thank you for answers so far but soft timers are out of the question. Also, I don't need many; I need 3-4. I'd prefer hard answers from somebody that actually did trigger one timer from another.