aboutsummaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorxoviat <[email protected]>2023-10-23 16:26:34 -0500
committerxoviat <[email protected]>2023-10-23 16:26:34 -0500
commitdf4aa0fe253252734dacd555364f5613044f7ecf (patch)
tree8f11004719b10ce77475f0193b3ddc2c9bb8ba16 /tests
parente70c531d3d28565b6926d99d8e977c4df6c13c60 (diff)
stm32: fix low-power test
Diffstat (limited to 'tests')
-rw-r--r--tests/stm32/src/bin/stop.rs4
1 files changed, 3 insertions, 1 deletions
diff --git a/tests/stm32/src/bin/stop.rs b/tests/stm32/src/bin/stop.rs
index f38924c90..4f62ecae2 100644
--- a/tests/stm32/src/bin/stop.rs
+++ b/tests/stm32/src/bin/stop.rs
@@ -11,7 +11,7 @@ use common::*;
11use cortex_m_rt::entry; 11use cortex_m_rt::entry;
12use embassy_executor::Spawner; 12use embassy_executor::Spawner;
13use embassy_stm32::low_power::{stop_with_rtc, Executor}; 13use embassy_stm32::low_power::{stop_with_rtc, Executor};
14use embassy_stm32::rcc::LsConfig; 14use embassy_stm32::rcc::{low_power_ready, LsConfig};
15use embassy_stm32::rtc::{Rtc, RtcConfig}; 15use embassy_stm32::rtc::{Rtc, RtcConfig};
16use embassy_stm32::Config; 16use embassy_stm32::Config;
17use embassy_time::Timer; 17use embassy_time::Timer;
@@ -28,6 +28,7 @@ fn main() -> ! {
28async fn task_1() { 28async fn task_1() {
29 for _ in 0..9 { 29 for _ in 0..9 {
30 info!("task 1: waiting for 500ms..."); 30 info!("task 1: waiting for 500ms...");
31 defmt::assert!(low_power_ready());
31 Timer::after_millis(500).await; 32 Timer::after_millis(500).await;
32 } 33 }
33} 34}
@@ -36,6 +37,7 @@ async fn task_1() {
36async fn task_2() { 37async fn task_2() {
37 for _ in 0..5 { 38 for _ in 0..5 {
38 info!("task 2: waiting for 1000ms..."); 39 info!("task 2: waiting for 1000ms...");
40 defmt::assert!(low_power_ready());
39 Timer::after_millis(1000).await; 41 Timer::after_millis(1000).await;
40 } 42 }
41 43