Page 1 of 1

RMT and light-sleep in ESP32-C3

Posted: Thu Aug 19, 2021 8:06 am
by Pecius
I've noticed in the reference manual for ESP32-C3 that the RMT peripheral now supports two new additional clock sources: RTC20M_CLK and XTAL_CLK.

Can one of those clock source allow RMT to receive/transmit while the chip is in light-sleep mode?

Re: RMT and light-sleep in ESP32-C3

Posted: Fri Aug 20, 2021 4:02 am
by ESP_LJH
RMT could not work in light-sleep mode but can be waked up through RTC20M_CLK and XTAL_CLK.

Re: RMT and light-sleep in ESP32-C3

Posted: Fri Aug 20, 2021 7:02 am
by Pecius
Thank you for the response!

But what do you mean it can be waked through those clocks? Could you please share an example code how to do it?
The reason why I wanted to know if it's possible to run it in light-sleep is because I need to lower the current usage but still receive Manchester encoded messages from a bus.

The half-bit is around 416 us, and with current implementation done on ESP32 with pin triggered wake up, I'm losing a part of the first half-bit (around half of it).
While it doesn't prevent me from decoding the message correctly, sometimes light-sleep starts in a wrong time (probably when a message is about to be transmitted on the bus) and I'm losing the whole first half-bit and therefore message is no longer valid.
Putting the chip to sleep manually may be difficult due to the fact that I need timers to be running as well.

Strangely enough, the lower the CPU clock is, the more of the first half-bit I can receive after the chip wakes up from a pin wake up signal.