Hi everyone,
I'm attempting to have ESP32-S3 acting like a oscillator to drive another MCU, so I need a stable clock output.
I've look around here and github, someone mentioned the I2S APLL on ESP32, but it's not available on ESP32-S3. Does that mean I have to use a ledc generator? I'm kinda afraid that the frequency stability won't meet the requirement. Is there a better way to achieve this?
32MHz clock output on ESP32-S3?
-
- Posts: 101
- Joined: Tue Mar 22, 2022 5:23 am
Re: 32MHz clock output on ESP32-S3?
Have you seen this thread? viewtopic.php?t=1037
It talks about 20MHz though.
It talks about 20MHz though.
Re: 32MHz clock output on ESP32-S3?
That's the LEDC way, it seems that the clock is not as accurate as needed.
-
- Posts: 9764
- Joined: Thu Nov 26, 2015 4:08 am
Re: 32MHz clock output on ESP32-S3?
What do you need wrt accuracy? Simply the right frequency, or do you also need low jitter?
Re: 32MHz clock output on ESP32-S3?
I was trying to drive another MCU to save some space on the pcb. I tested it with a dupont line (~19cm long) and an ESP32-S3-DevKit-M, routing output to GPIO38. While the usb controller (on the other chip) works properly, flashing a new firmware using uart is a constant fail. I left ESP32-S3 continuously working when operating the other chip, so the clock should not break off.
Re: 32MHz clock output on ESP32-S3?
Missed the reply button, see above please.ESP_Sprite wrote: ↑Mon Apr 11, 2022 1:02 amWhat do you need wrt accuracy? Simply the right frequency, or do you also need low jitter?
-
- Posts: 9764
- Joined: Thu Nov 26, 2015 4:08 am
Re: 32MHz clock output on ESP32-S3?
Hm, your issue may be jitter. LEDC uses 80MHz as a base clock, and that doesn't divide nicely into 32MHz; the only way to do it is with a fractional divider, and that introduces jitter. Unfortunately, USB is pretty insistent on a low-jitter clock signal; depending on how the clock infrastructure of the other MCU works, there likely isn't a way to get this to work with the LEDC at all.
Some peripherals in the ESP32S3 can use an internal 160MHz generated by the PLL as a base clock, e.g. the LCD/camera device. If you don't use that, there may be a way to abuse it to generate a clock... 160/5=32 exactly.
Some peripherals in the ESP32S3 can use an internal 160MHz generated by the PLL as a base clock, e.g. the LCD/camera device. If you don't use that, there may be a way to abuse it to generate a clock... 160/5=32 exactly.
Re: 32MHz clock output on ESP32-S3?
Yes, I noticed that too!ESP_Sprite wrote: ↑Mon Apr 11, 2022 4:33 amHm, your issue may be jitter. LEDC uses 80MHz as a base clock, and that doesn't divide nicely into 32MHz; the only way to do it is with a fractional divider, and that introduces jitter. Unfortunately, USB is pretty insistent on a low-jitter clock signal; depending on how the clock infrastructure of the other MCU works, there likely isn't a way to get this to work with the LEDC at all.
Some peripherals in the ESP32S3 can use an internal 160MHz generated by the PLL as a base clock, e.g. the LCD/camera device. If you don't use that, there may be a way to abuse it to generate a clock... 160/5=32 exactly.
Code: Select all
esp_lcd_panel_handle_t panel_handle = NULL;
esp_lcd_rgb_panel_config_t panel_config = {
.data_width = 16, // RGB565 in parallel mode, thus 16bit in width
.clk_src = LCD_CLK_SRC_PLL160M,
.pclk_gpio_num = HSE_OUTPUT_IO,
.timings = {
.pclk_hz = HSE_FREQUENCY,
.h_res = 1,
.v_res = 1,
// The following parameters should refer to LCD spec
.hsync_back_porch = 40,
.hsync_front_porch = 20,
.hsync_pulse_width = 1,
.vsync_back_porch = 8,
.vsync_front_porch = 4,
.vsync_pulse_width = 1,
},
};
ESP_ERROR_CHECK(esp_lcd_new_rgb_panel(&panel_config, &panel_handle));
ESP_ERROR_CHECK(esp_lcd_panel_reset(panel_handle));
ESP_ERROR_CHECK(esp_lcd_panel_init(panel_handle));
Re: 32MHz clock output on ESP32-S3?
is it too later here?
is it possible to use ESP32S3 make a clock without use Internet and External RTC module?
Thanks
Adam
is it possible to use ESP32S3 make a clock without use Internet and External RTC module?
Thanks
Adam
Who is online
Users browsing this forum: No registered users and 155 guests