AnsweredAssumed Answered

Change CCR1 value with HAL

Question asked by afonso.luis.002 on Dec 3, 2014
Latest reply on Dec 6, 2014 by afonso.luis.002
Hi everyone,

I'm starting with STM32 so i am running through some examples.
I am using HAL since it helps porting codes between different MCUs

I am now trying using PWM with the timer. 
I can't seem to find any function to change the duty of the PWM. What i am doing now is directly accessing the register.

Is there any function that changes the comparator value that i am missing?
Is the method of using TIMx->CCR1= 100 portable between other boards? This is what i care the most. If i have to sometimes use registers i can live with that.

Outcomes