Page 1 of 1

RTC fast memory and a sleeping shtc3 sensor

Posted: Thu Sep 15, 2022 2:53 am
by bowlofeggs
I've got an ESP-32-C3 which I am programming in Rust, and I've found something that seems odd to me. I've got an shtc3[0] hygrometer on i2c. If I use the hygrometer's low power mode, which means using https://docs.rs/shtcx/latest/shtcx/trait.LowPower.html to sleep()/wake() it, I observe that a variable that I'm stashing in the device's RTC memory seems to reset between deep sleeps. If I simply comment out the calls to sleep()/wake(), the RTC memory is not cleared between deep sleeps. This seems odd since the shtcx driver is written generically, and not for the ESP-32. I don't see mentions of the RTC fast memory interacting with i2c in the esp-32's tech specs.

Does anybody know what might be happening?

[0] This is the ESP32-C3-DevKit-RUST-1 board, which comes with this sensor.