RMT and light-sleep in ESP32-C3

Pecius
Posts: 2
Joined: Thu Aug 19, 2021 7:33 am

RMT and light-sleep in ESP32-C3

Postby Pecius » Thu Aug 19, 2021 8:06 am

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?

ESP_LJH
Posts: 387
Joined: Tue May 18, 2021 9:21 am

Re: RMT and light-sleep in ESP32-C3

Postby ESP_LJH » Fri Aug 20, 2021 4:02 am

RMT could not work in light-sleep mode but can be waked up through RTC20M_CLK and XTAL_CLK.

Pecius
Posts: 2
Joined: Thu Aug 19, 2021 7:33 am

Re: RMT and light-sleep in ESP32-C3

Postby Pecius » Fri Aug 20, 2021 7:02 am

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.

Who is online

Users browsing this forum: Google [Bot] and 167 guests