Skip to content

Commit

Permalink
Update esp32_ledc_mcu.cpp to set ledc_timer = false
Browse files Browse the repository at this point in the history
  • Loading branch information
rob-deutsch authored Jan 17, 2025
1 parent c72f063 commit 5e9787d
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/drivers/hardware_specific/esp32/esp32_ledc_mcu.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,7 @@ bool _ledcAttachChannelAdvanced(uint8_t pin, int _channel, int _group, uint32_t
ledc_timer.duty_resolution = res;
ledc_timer.freq_hz = freq;
ledc_timer.clk_cfg = LEDC_AUTO_CLK;
ledc_timer.deconfigure = false;
if (ledc_timer_config(&ledc_timer) != ESP_OK) {
SIMPLEFOC_DEBUG("EP32-DRV: ERROR - Failed to configure the timer:", LEDC_TIMER_0);
return false;
Expand Down Expand Up @@ -401,4 +402,4 @@ void _writeDutyCycle6PWM(float dc_a, float dc_b, float dc_c, PhaseState *phase
_setPwmPairDutyCycle(params, 4, 5, dc_c, ((ESP32LEDCDriverParams*)params)->dead_zone, phase_state[2]);
}

#endif
#endif

0 comments on commit 5e9787d

Please sign in to comment.