Skip to content

Commit 5e9787d

Browse files
authored
Update esp32_ledc_mcu.cpp to set ledc_timer = false
1 parent c72f063 commit 5e9787d

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/drivers/hardware_specific/esp32/esp32_ledc_mcu.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,6 +81,7 @@ bool _ledcAttachChannelAdvanced(uint8_t pin, int _channel, int _group, uint32_t
8181
ledc_timer.duty_resolution = res;
8282
ledc_timer.freq_hz = freq;
8383
ledc_timer.clk_cfg = LEDC_AUTO_CLK;
84+
ledc_timer.deconfigure = false;
8485
if (ledc_timer_config(&ledc_timer) != ESP_OK) {
8586
SIMPLEFOC_DEBUG("EP32-DRV: ERROR - Failed to configure the timer:", LEDC_TIMER_0);
8687
return false;
@@ -401,4 +402,4 @@ void _writeDutyCycle6PWM(float dc_a, float dc_b, float dc_c, PhaseState *phase
401402
_setPwmPairDutyCycle(params, 4, 5, dc_c, ((ESP32LEDCDriverParams*)params)->dead_zone, phase_state[2]);
402403
}
403404

404-
#endif
405+
#endif

0 commit comments

Comments
 (0)