From bb8a1b7f1f8728e09435a8ee89b393533f813e85 Mon Sep 17 00:00:00 2001
From: xoviat <xoviat@users.noreply.github.com>
Date: Tue, 3 Oct 2023 15:53:22 -0500
Subject: [PATCH] wpan: re-enable HIL tests

---
 ci.sh                       | 2 --
 embassy-stm32/src/rcc/bd.rs | 4 ++++
 2 files changed, 4 insertions(+), 2 deletions(-)

diff --git a/ci.sh b/ci.sh
index f2a686c7c..714056f15 100755
--- a/ci.sh
+++ b/ci.sh
@@ -201,8 +201,6 @@ cargo batch  \
     $BUILD_EXTRA
 
 
-rm out/tests/stm32wb55rg/wpan_mac
-rm out/tests/stm32wb55rg/wpan_ble
 
 if [[ -z "${TELEPROBE_TOKEN-}" ]]; then
     echo No teleprobe token found, skipping running HIL tests
diff --git a/embassy-stm32/src/rcc/bd.rs b/embassy-stm32/src/rcc/bd.rs
index 026c89d6a..cec2ea010 100644
--- a/embassy-stm32/src/rcc/bd.rs
+++ b/embassy-stm32/src/rcc/bd.rs
@@ -88,6 +88,8 @@ impl BackupDomain {
     ))]
     #[allow(dead_code, unused_variables)]
     pub fn configure_ls(clock_source: RtcClockSource, lsi: bool, lse: Option<LseDrive>) {
+        use atomic_polyfill::{compiler_fence, Ordering};
+
         match clock_source {
             RtcClockSource::LSI => assert!(lsi),
             RtcClockSource::LSE => assert!(&lse.is_some()),
@@ -173,5 +175,7 @@ impl BackupDomain {
         }
 
         trace!("BDCR configured: {:08x}", Self::read().0);
+
+        compiler_fence(Ordering::SeqCst);
     }
 }