diff options
| author | xoviat <[email protected]> | 2023-10-23 16:26:34 -0500 |
|---|---|---|
| committer | xoviat <[email protected]> | 2023-10-23 16:26:34 -0500 |
| commit | df4aa0fe253252734dacd555364f5613044f7ecf (patch) | |
| tree | 8f11004719b10ce77475f0193b3ddc2c9bb8ba16 /tests | |
| parent | e70c531d3d28565b6926d99d8e977c4df6c13c60 (diff) | |
stm32: fix low-power test
Diffstat (limited to 'tests')
| -rw-r--r-- | tests/stm32/src/bin/stop.rs | 4 |
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::*; | |||
| 11 | use cortex_m_rt::entry; | 11 | use cortex_m_rt::entry; |
| 12 | use embassy_executor::Spawner; | 12 | use embassy_executor::Spawner; |
| 13 | use embassy_stm32::low_power::{stop_with_rtc, Executor}; | 13 | use embassy_stm32::low_power::{stop_with_rtc, Executor}; |
| 14 | use embassy_stm32::rcc::LsConfig; | 14 | use embassy_stm32::rcc::{low_power_ready, LsConfig}; |
| 15 | use embassy_stm32::rtc::{Rtc, RtcConfig}; | 15 | use embassy_stm32::rtc::{Rtc, RtcConfig}; |
| 16 | use embassy_stm32::Config; | 16 | use embassy_stm32::Config; |
| 17 | use embassy_time::Timer; | 17 | use embassy_time::Timer; |
| @@ -28,6 +28,7 @@ fn main() -> ! { | |||
| 28 | async fn task_1() { | 28 | async 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() { | |||
| 36 | async fn task_2() { | 37 | async 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 | ||
