如题所说,ledc 配置如下, led pwm在light-sleep模式下没有PWM输出。
在切换rtc_clk_slow_freq_set(RTC_SLOW_FREQ_8MD256)后,PWM输出才正常,但是电流明显增大。
请问,是否可以在rtc_clk_slow_freq_set(RTC_SLOW_FREQ_32K_XTAL)条件下,进入light-sleep后正常工作?
// Prepare and then apply the LEDC PWM timer configuration
ledc_timer_config_t ledc_timer = {
.speed_mode = LEDC_LOW_SPEED_MODE,
.timer_num = LEDC_TIMER_1,
.duty_resolution = LEDC_TIMER_9_BIT,
.freq_hz = 8000, // Set output frequency at 8 kHz
.clk_cfg = LEDC_USE_RTC8M_CLK
};
// Prepare and then apply the LEDC PWM channel configuration
ledc_channel_config_t ledc_channel = {
.speed_mode = LEDC_LOW_SPEED_MODE,
.channel = LEDC_CHANNEL_3,
.timer_sel = LEDC_TIMER_1,
.intr_type = LEDC_INTR_DISABLE,
.gpio_num = 5,
.duty = 0, // Set duty to 0%
.hpoint = 0,
.flags.output_invert = 1
};
esp32 idf-v4.4 ledc light-sleep 工作不正常。
Who is online
Users browsing this forum: No registered users and 76 guests