cancel
Showing results for 
Search instead for 
Did you mean: 

Timer registers to be updated simultaneously

DKuro.1
Associate III

Hi,

I am using STM32G474 with TIM1, TIM8 and TIM20 and working with STM32CubeIDE.

I want to updatethe ARR, CCR1, CCR2 and CCR3 regs at the same time. I taught that with the preload register it can be done but it doesn't work for me.

So how can I do to set the ARR, CCR1, CCR2 and CCR3 shadow registers and to make them be updated in a, lets say, overflow event of the CNT register?

Thanks!

3 REPLIES 3
TDK
Guru

In output compare mode, enable the OCxPE preload bits. You'll need to write all values before an update occurs.

If you feel a post has answered your question, please click "Accept as Solution".
DKuro.1
Associate III

Hi, thanks for your answer.

I am working in PWM mode 1. I must work in output compare mode? I think it will work in a different way..

PWM is one of the output compare modes. Read the timer chapter in RM.

JW