From 1806422763be4e9e47201f741a03e5968fc8dedb Mon Sep 17 00:00:00 2001 From: Dario Nieuwenhuis Date: Mon, 1 May 2023 18:16:29 +0200 Subject: stm32/test: add real defmt timestamp --- tests/stm32/src/example_common.rs | 11 ----------- 1 file changed, 11 deletions(-) (limited to 'tests/stm32/src/example_common.rs') diff --git a/tests/stm32/src/example_common.rs b/tests/stm32/src/example_common.rs index c47ed75c4..a4f8668c7 100644 --- a/tests/stm32/src/example_common.rs +++ b/tests/stm32/src/example_common.rs @@ -1,22 +1,11 @@ #![macro_use] -use core::sync::atomic::{AtomicUsize, Ordering}; - pub use defmt::*; #[allow(unused)] use embassy_stm32::time::Hertz; use embassy_stm32::Config; use {defmt_rtt as _, panic_probe as _}; -defmt::timestamp! {"{=u64}", { - static COUNT: AtomicUsize = AtomicUsize::new(0); - // NOTE(no-CAS) `timestamps` runs with interrupts disabled - let n = COUNT.load(Ordering::Relaxed); - COUNT.store(n + 1, Ordering::Relaxed); - n as u64 - } -} - pub fn config() -> Config { #[allow(unused_mut)] let mut config = Config::default(); -- cgit From 2bb6e93e86af02af97b4fb39197a1d1e87e635b9 Mon Sep 17 00:00:00 2001 From: Dario Nieuwenhuis Date: Tue, 2 May 2023 02:52:37 +0200 Subject: stm32/usart: add baudrate calc test. --- tests/stm32/src/example_common.rs | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'tests/stm32/src/example_common.rs') diff --git a/tests/stm32/src/example_common.rs b/tests/stm32/src/example_common.rs index a4f8668c7..3d150da60 100644 --- a/tests/stm32/src/example_common.rs +++ b/tests/stm32/src/example_common.rs @@ -16,5 +16,10 @@ pub fn config() -> Config { config.rcc.pll1.q_ck = Some(Hertz(100_000_000)); } + #[cfg(feature = "stm32u585ai")] + { + config.rcc.mux = embassy_stm32::rcc::ClockSrc::MSI(embassy_stm32::rcc::MSIRange::Range48mhz); + } + config } -- cgit From 020e956f1ba5c0b3baf75b02f286218f661e1c02 Mon Sep 17 00:00:00 2001 From: Dario Nieuwenhuis Date: Tue, 30 May 2023 00:10:36 +0200 Subject: ci: run HIL tests in parallel. --- tests/stm32/src/example_common.rs | 25 ------------------------- 1 file changed, 25 deletions(-) delete mode 100644 tests/stm32/src/example_common.rs (limited to 'tests/stm32/src/example_common.rs') diff --git a/tests/stm32/src/example_common.rs b/tests/stm32/src/example_common.rs deleted file mode 100644 index 3d150da60..000000000 --- a/tests/stm32/src/example_common.rs +++ /dev/null @@ -1,25 +0,0 @@ -#![macro_use] - -pub use defmt::*; -#[allow(unused)] -use embassy_stm32::time::Hertz; -use embassy_stm32::Config; -use {defmt_rtt as _, panic_probe as _}; - -pub fn config() -> Config { - #[allow(unused_mut)] - let mut config = Config::default(); - - #[cfg(feature = "stm32h755zi")] - { - config.rcc.sys_ck = Some(Hertz(400_000_000)); - config.rcc.pll1.q_ck = Some(Hertz(100_000_000)); - } - - #[cfg(feature = "stm32u585ai")] - { - config.rcc.mux = embassy_stm32::rcc::ClockSrc::MSI(embassy_stm32::rcc::MSIRange::Range48mhz); - } - - config -} -- cgit