Skip to content

Commit 887fc71

Browse files
committed
patches: Setting a fixed clock source for esp32-p4.
Signed-off-by: lbuque <1102390310@qq.com>
1 parent 44d17a1 commit 887fc71

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

m5stack/patches/0011-micropython-1.25.0-fix-esp32-p4-pwm.patch

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,3 +14,13 @@ Index: micropython/ports/esp32/machine_pwm.c
1414
} else {
1515
#if LEDC_SPEED_MODE_MAX > 1
1616
#if CONFIG_IDF_TARGET_ESP32
17+
@@ -232,6 +236,9 @@ static void set_freq(machine_pwm_obj_t *
18+
#else
19+
#error No supported PWM / LEDC clocks.
20+
#endif
21+
+#if CONFIG_IDF_TARGET_ESP32P4
22+
+ timer->clk_cfg = LEDC_USE_XTAL_CLK;
23+
+#endif
24+
#if SOC_LEDC_SUPPORT_REF_TICK
25+
if (freq < EMPIRIC_FREQ) {
26+
timer->clk_cfg = LEDC_USE_REF_TICK;

0 commit comments

Comments
 (0)