Skip to content

Commit

Permalink
test: Add a test with CpuClock::max()
Browse files Browse the repository at this point in the history
  • Loading branch information
SergioGasquez committed Sep 19, 2024
1 parent 9fa910b commit 591f0c3
Showing 1 changed file with 21 additions and 0 deletions.
21 changes: 21 additions & 0 deletions hil-test/tests/init.rs
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,27 @@ mod tests {
}
}

#[test]
#[timeout(3)]
fn test_feeding_timg0_wdt_max_clock() {
let peripherals = esp_hal::init({
let mut config = Config::default();
config.cpu_clock = CpuClock::max();
config.watchdog.timg0 =
WatchdogStatus::Enabled(fugit::MicrosDurationU64::millis(500 as u64));
config
});

let timg0 = TimerGroup::new(peripherals.TIMG0);
let mut wdt0 = timg0.wdt;
let delay = Delay::new();

for _ in 0..4 {
wdt0.feed();
delay.delay(250.millis());
}
}

#[test]
#[timeout(4)]
fn test_feeding_rtc_wdt() {
Expand Down

0 comments on commit 591f0c3

Please sign in to comment.