You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
PWM issue occurs on all GPIOs on the Dev boards.
Only UART1 is connected to anything external.
Wifi/Bt are not used.
Version
latest master (checkout manually)
IDE Name
Arduino
Operating System
Windows 11
Flash frequency
80MHZ
PSRAM enabled
no
Upload speed
921600
Description
I am migrating a design from an ESP32 Wroom Module to a SOC, preferably the S3.
I am using LEDC to produce PWM outputs.
On both the S3 and C3 dev boards I have tested, the PWM output does not work at the frequency and resolution I was using on the Wroom module (3,000Hz 14 Bit).
It almost seems like the clock used for LEDC on the S3 and C3 is running at half the speed it is on the Wroom module.
I can't find anything in the hardware documentation to suggest this is the case so I assume it is to do with the implementation of LEDC? Or a bug?
Sketch
Tested with the Arduino LEDC examples, modifying the frequency and resolution accordingly.
Debug Message
N/A
Other Steps to Reproduce
No response
I have checked existing issues, online documentation and the Troubleshooting Guide
I confirm I have checked existing issues, online documentation and Troubleshooting guide.
The text was updated successfully, but these errors were encountered:
Hi @lft8, by default the XTAL clock is used for the LEDC peripheral on newer chips.
You can change the clock source by calling:
/** * @brief Set the LEDC clock source. * * @param source LEDC clock source to set. * * @return true if LEDC clock source was successfully set, false otherwise. */boolledcSetClockSource(ledc_clk_cfg_tsource);
Example clock sources for C3:
/**
* @brief Type of LEDC clock source, reserved for the legacy LEDC driver
*/
typedef enum {
LEDC_AUTO_CLK = 0, /*!< LEDC source clock will be automatically selected based on the giving resolution and duty parameter when init the timer*/
LEDC_USE_APB_CLK = SOC_MOD_CLK_APB, /*!< Select APB as the source clock */
LEDC_USE_RC_FAST_CLK = SOC_MOD_CLK_RC_FAST, /*!< Select RC_FAST as the source clock */
LEDC_USE_XTAL_CLK = SOC_MOD_CLK_XTAL, /*!< Select XTAL as the source clock */
LEDC_USE_RTC8M_CLK __attribute__((deprecated("please use 'LEDC_USE_RC_FAST_CLK' instead"))) = LEDC_USE_RC_FAST_CLK, /*!< Alias of 'LEDC_USE_RC_FAST_CLK' */
} soc_periph_ledc_clk_src_legacy_t;
Board
ESP32-S3 and ESP32-C3
Device Description
ESP32-S3 and ESP32-C3 Dev Boards
Hardware Configuration
PWM issue occurs on all GPIOs on the Dev boards.
Only UART1 is connected to anything external.
Wifi/Bt are not used.
Version
latest master (checkout manually)
IDE Name
Arduino
Operating System
Windows 11
Flash frequency
80MHZ
PSRAM enabled
no
Upload speed
921600
Description
I am migrating a design from an ESP32 Wroom Module to a SOC, preferably the S3.
I am using LEDC to produce PWM outputs.
On both the S3 and C3 dev boards I have tested, the PWM output does not work at the frequency and resolution I was using on the Wroom module (3,000Hz 14 Bit).
It almost seems like the clock used for LEDC on the S3 and C3 is running at half the speed it is on the Wroom module.
I can't find anything in the hardware documentation to suggest this is the case so I assume it is to do with the implementation of LEDC? Or a bug?
Sketch
Tested with the Arduino LEDC examples, modifying the frequency and resolution accordingly.
Debug Message
Other Steps to Reproduce
No response
I have checked existing issues, online documentation and the Troubleshooting Guide
The text was updated successfully, but these errors were encountered: