Question
Changing MITx_CRRx and ARR on the fly
Hi, I am trying to change MIT4_CRR2 on the fly to change the period of the PWM output by doing:
void EXTI4_IRQHandler(void)
{
/* USER CODE BEGIN EXTI0_IRQn 0 */
htim4.Instance->CNT = 0;
htim4.Instance->CCR3 = 0x0000A978;
/* USER CODE END EXTI0_IRQn 0 */
HAL_GPIO_EXTI_IRQHandler(GPIO_PIN_4);
/* USER CODE BEGIN EXTI0_IRQn 1 */
/* USER CODE END EXTI0_IRQn 1 */
} Somehow I sometime can see that the value resets itself to the original value. is that the correct way to do it ?
Can I also change ARR on the fly ?
