Skip to content

Commit 65eafd1

Browse files
authored
Fixes ESP32-S2 LEDC PWM #5375 #5050 (#5452)
Fixes: #5375 Fixes: #5050
1 parent d5a98f9 commit 65eafd1

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

Diff for: cores/esp32/esp32-hal-ledc.c

+4
Original file line numberDiff line numberDiff line change
@@ -115,6 +115,10 @@ static void _ledcSetupTimer(uint8_t chan, uint32_t div_num, uint8_t bit_num, boo
115115
uint8_t group=(chan/8), timer=((chan/2)%4);
116116
static bool tHasStarted = false;
117117
static uint16_t _activeChannels = 0;
118+
#if CONFIG_IDF_TARGET_ESP32S2
119+
// ESP32-S2 TRM v1.0 on Page 789 -> BIT LEDC_TICK_SEL_TIMERx is 0 for LEDC_PWM_CLK and 1 for REF_TICK
120+
apb_clk = 0;
121+
#endif
118122
if(!tHasStarted) {
119123
tHasStarted = true;
120124
periph_module_enable(PERIPH_LEDC_MODULE);

0 commit comments

Comments
 (0)