Trying to adjust the PWM period value using the macro
__HAL_TIM_SET_COMPARE(&htim4,TIM_CHANNEL_3,299);
but it does not work.
However the macro
__HAL_TIM_SET_AUTORELOAD(&htim4, 599);
works fine.
why the __HAL_TIM_SET_COMPARE
does not work ?.
The board I am using is NUCLEO-F401RE with CUBE-MX generated project on Truestudio.