2014-03-05 06:52 AM
Hi guys.
I know some of you guys have done something like this. I would like to implement the TIM1 to generate a clock, using it as a PWM out-up mode, but I wish ( if it is possible) modify its functioning to generate a certain quantity of pulses depending of a trigger by software.For example I would like to write in some register (I don't know which one yet) a number, to generate 10 OCx Pulses. At this moment I have to disable the PRELOAD REGISTER and COUNTER.Has anyone done something like this? #clock #pulses #tim12014-03-05 12:24 PM
You should be able to program the repetition counter (TIMx_RCR - TIM_TimeBaseInitStruct->TIM_RepetitionCounter), alternatively you can use DMA to provide a table of sequences to be feed to the TIM peripheral.