2020-07-16 07:06 AM
2020-07-16 07:15 AM
Should be a macro or wrapper,
Typically one just writes the register TIM2->CCR1 = (TIM2->ARR + 1) / 2; // 50/50 duty
2020-07-16 12:22 PM
LL_TIM_OC_SetCompareCH1 does this.
If you're modifying ARR or PSC, you may need to generate or wait for an update event for them to become active.