4x faster PWM, add Timer changes from #1926

This commit is contained in:
jonasius
2024-06-26 00:13:23 +02:00
parent 56b91ac13c
commit e6a3f380e1
2 changed files with 7 additions and 10 deletions

View File

@@ -105,7 +105,7 @@ void HAL_TIM_PeriodElapsedCallback(TIM_HandleTypeDef *htim) {
if (PWMSafetyTimer == 0) {
htim4.Instance->CCR3 = 0;
} else {
htim4.Instance->CCR3 = pendingPWM;
htim4.Instance->CCR3 = pendingPWM / 4;
}
} else if (htim->Instance == TIM1) {
// STM uses this for internal functions as a counter for timeouts