Mention persisting memory during deep sleep (#3690)

This commit is contained in:
Dániel Buga 2025-06-25 08:41:03 +02:00 committed by GitHub
parent c72889a73d
commit 1e71341922
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -457,6 +457,12 @@ impl<'d> Rtc<'d> {
} }
/// Enter deep sleep and wake with the provided `wake_sources`. /// Enter deep sleep and wake with the provided `wake_sources`.
///
/// In Deep-sleep mode, the CPUs, most of the RAM, and all digital
/// peripherals that are clocked from APB_CLK are powered off.
///
/// You can use the [`#[esp_hal::ram(persistent)]`][procmacros::ram]
/// attribute to persist a variable though deep sleep.
#[cfg(any(esp32, esp32s2, esp32s3, esp32c3, esp32c6, esp32c2))] #[cfg(any(esp32, esp32s2, esp32s3, esp32c3, esp32c6, esp32c2))]
pub fn sleep_deep(&mut self, wake_sources: &[&dyn WakeSource]) -> ! { pub fn sleep_deep(&mut self, wake_sources: &[&dyn WakeSource]) -> ! {
let config = RtcSleepConfig::deep(); let config = RtcSleepConfig::deep();