2022-11-09 14:10:46 +01:00
|
|
|
#![no_std]
|
|
|
|
#![no_main]
|
|
|
|
|
|
|
|
use defmt::*;
|
|
|
|
use embassy_executor::Spawner;
|
|
|
|
use embassy_stm32::wdg::IndependentWatchdog;
|
2023-10-15 01:57:25 +02:00
|
|
|
use embassy_time::Timer;
|
2022-11-09 14:10:46 +01:00
|
|
|
use {defmt_rtt as _, panic_probe as _};
|
|
|
|
|
|
|
|
#[embassy_executor::main]
|
|
|
|
async fn main(_spawner: Spawner) {
|
|
|
|
let p = embassy_stm32::init(Default::default());
|
|
|
|
info!("Hello World!");
|
|
|
|
|
|
|
|
let mut wdg = IndependentWatchdog::new(p.IWDG1, 20_000_000);
|
|
|
|
|
2023-06-19 03:07:26 +02:00
|
|
|
wdg.unleash();
|
2022-11-09 14:10:46 +01:00
|
|
|
|
|
|
|
loop {
|
2023-10-15 01:57:25 +02:00
|
|
|
Timer::after_secs(1).await;
|
2023-06-19 03:07:26 +02:00
|
|
|
wdg.pet();
|
2022-11-09 14:10:46 +01:00
|
|
|
}
|
|
|
|
}
|