RTC8M_CLK for LED control
-
- Posts: 6
- Joined: Wed Oct 09, 2019 4:48 am
RTC8M_CLK for LED control
I'm new in this platform, and I've been designing a simple project with it, to test some things I need for bigger ones. The thing is I wanted to keep a PWM signal while on light sleep. According to the TRM, that's possible with the LEDC low speed channels, if I set LEDC_SCLK to follow RTC8M_CLK (LEDC_APB_CLK_SEL set to 0). I tried to do this using REG_CLR_BIT, but whenever I do this, the PWM signal simply stay still. Do any of you know if there's any activation bit for RTC8M_CLK or any other hidden configuration in the Arduino IDE that keeps this clock idle?
-
- Posts: 6
- Joined: Wed Oct 09, 2019 4:48 am
Re: RTC8M_CLK for LED control
So I continued working and I found there are a couple of bits that power up and enable the 8 MHz clock in the RTC_CNTL_CLK_CONF_REG register. I managed to make the PWM work in regular power mode (no sleep), but the signal stays idle as soon I start light sleep mode. I set all the RTC domains (peripherals, both memories and XTAL) to be ON using esp_sleep_pd_config() and nothing changes. Any ideas on this?
Re: RTC8M_CLK for LED control
Hopefully someone who knows what they're talking about will chime in, but I'll throw in a few thoughts in the meantime:
Are you using the API? I'm sure you'll have a lot more luck with that than starting from scratch fiddling with individual registers, at least as a starting point for your own custom implementation.
https://docs.espressif.com/projects/esp ... /ledc.html
especially ledc_clk_cfg_t for ledc_timer_config() and ledc_clk_src_t for ledc_timer_set()
There's also a note in there that might be relevant:
Are you using the API? I'm sure you'll have a lot more luck with that than starting from scratch fiddling with individual registers, at least as a starting point for your own custom implementation.
https://docs.espressif.com/projects/esp ... /ledc.html
especially ledc_clk_cfg_t for ledc_timer_config() and ledc_clk_src_t for ledc_timer_set()
There's also a note in there that might be relevant:
Maybe this test using REF_TICK will be a useful example: https://github.com/espressif/esp-idf/bl ... edc.c#L311For additional details regarding speed modes, refer to ESP32 Technical Reference Manual (PDF). Please note that the support for SLOW_CLOCK mentioned in this manual is not yet supported in the LEDC driver.
Who is online
Users browsing this forum: No registered users and 66 guests