How to adjust Compare Value in HRTIM Basic PWM
Hello,
currently I am using the NUCLEO-G474RE and the goal is to output a PWM signal simulating a sinewave. Therefore the duty cycle must continuously be adjusted.
My issue is that I seemingly cannot do so.
The Timer is configured as Timer D, TD1 output active
I selected the Basic configuration (though I also tried out the Advanced Configuration) and set the Period to 54400.
The PWM on TD1 was used and the Compare value was set to 27000. All of that works fine and I get my PWM.
However, when trying to change the Compare value using the HAL method or even by writing directly to the register, I don't see a change in my PWM signal.
With the normal timers I just used:
__HAL_TIM_SET_COMPARE
Now for the HRTIM I thought I'd use the equivalent:
__HAL_HRTIM_SETCOMPARE
But the latter does not work for me. It does set the correct register and if I use the __HAL_HRTIM_GETCOMPARE, it correctly reads the new value. But that does not influence the duty cycle of my PWM.
Am I missing something? Do I have to transfer it to another register somehow? Am I using the wrong timer configuration?
