aboutsummaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorxoviat <[email protected]>2023-10-23 21:29:36 +0000
committerGitHub <[email protected]>2023-10-23 21:29:36 +0000
commit17b4cf8ce75c985445754eea8c437b934c14c68c (patch)
tree1ab662327adada853fc9f73eb3a99febcbafe54c /tests
parentd673f8a865930d78b4bc863eadd8dd15850e54fe (diff)
parentdf4aa0fe253252734dacd555364f5613044f7ecf (diff)
Merge pull request #2106 from xoviat/fix-stop-2
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