AnsweredAssumed Answered

Switching from TIM cascade mode 32bit counter to a 16 bit counter and vice-versa

Question asked by Ferreira on Sep 3, 2013
Latest reply on Sep 5, 2013 by John F.
Hi,

I would like to ask, what is necessary to make when I configure a input channel as a cascade 32 bit counter, using a master/slave timers as counters, and then when I need to use this input channel as a 16 bit counter (only). And when it is configured as a single 16 bit counter and want to switch to a 32 bit counter.

Can I make at start_up stage, all the configuration required for a 32bit counter in cascade mode using two timers, and then if necessary I make the enable/disable of the slave counter, and enable/disable of  the RCC clock of that slave peripheric. Or need I to configure all the registers again? I'm not sure, but I thing I have read somewhere that if I disable the peripheral clk it clears all register. Is this true?

I know that you could say that a 32 bit counter is always a 16 bit counter. Yes, I know but it spends energy and I'm a environmental friend, so I would like to applicate this principle in all my applications.

Best regards,

Almerindo Paiva

Outcomes