From e76473ae95b24d9772711ab4ece464e44e9558f6 Mon Sep 17 00:00:00 2001 From: Christian Enderle Date: Mon, 18 Nov 2024 12:20:15 +0100 Subject: [PATCH] fixed hanging when lse_sysen disabled --- embassy-stm32/src/rcc/bd.rs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/embassy-stm32/src/rcc/bd.rs b/embassy-stm32/src/rcc/bd.rs index 78ecbfb94..4aec3756f 100644 --- a/embassy-stm32/src/rcc/bd.rs +++ b/embassy-stm32/src/rcc/bd.rs @@ -257,7 +257,9 @@ impl LsConfig { w.set_lsesysen(lse_sysen); }); - while !bdcr().read().lsesysrdy() {} + if lse_sysen { + while !bdcr().read().lsesysrdy() {} + } } }