sram2 standby working

This commit is contained in:
Priec
2025-12-03 18:33:07 +01:00
parent 434e2b3d21
commit 68d13ebbbc
2 changed files with 32 additions and 2 deletions

View File

@@ -20,6 +20,7 @@ use dma_gpio::config::{
use dma_gpio::hw_uart_pc::{driver::uart_task, usart1};
use dma_gpio::wakeup::iwdg::{clear_wakeup_flags, init_watchdog};
use dma_gpio::sleep::shutdown::enter_shutdown;
use dma_gpio::sleep::standby::enter_standby_with_sram2_retention;
use {defmt_rtt as _, panic_probe as _};
bind_interrupts!(struct Irqs {
@@ -64,12 +65,12 @@ async fn main(spawner: Spawner) {
// MAIN LOOP
Timer::after(Duration::from_millis(500)).await;
// init_watchdog(p.IWDG).await;
init_watchdog(p.IWDG).await;
Timer::after(Duration::from_millis(10)).await;
loop {
info!("entering shutdown");
enter_shutdown();
enter_standby_with_sram2_retention();
cortex_m::asm::wfi();
yield_now().await;
}