From 8528455a75aa33cf774d72ba6b35a4298bca511e Mon Sep 17 00:00:00 2001 From: Rasmus Melchior Jacobsen Date: Thu, 25 May 2023 22:20:05 +0200 Subject: [PATCH] Errata if _not_ pa12 out low --- embassy-stm32/src/flash/f4.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/embassy-stm32/src/flash/f4.rs b/embassy-stm32/src/flash/f4.rs index 5e0e9620..8c9c9369 100644 --- a/embassy-stm32/src/flash/f4.rs +++ b/embassy-stm32/src/flash/f4.rs @@ -463,7 +463,7 @@ pub(crate) fn assert_not_corrupted_read() { feature = "stm32f439vi", feature = "stm32f439zi", ))] - if unsafe { pac::DBGMCU.idcode().read().rev_id() < REVISION_3 && pa12_is_output_pull_low() } { + if unsafe { pac::DBGMCU.idcode().read().rev_id() < REVISION_3 && !pa12_is_output_pull_low() } { panic!("Read corruption for stm32f42xxI and stm32f43xxI when PA12 is in use for chips below revision 3, see errata 2.2.11"); } @@ -490,7 +490,7 @@ pub(crate) fn assert_not_corrupted_read() { if unsafe { pac::FLASH.optcr().read().db1m() && pac::DBGMCU.idcode().read().rev_id() < REVISION_3 - && pa12_is_output_pull_low() + && !pa12_is_output_pull_low() } { panic!("Read corruption for stm32f42xxG and stm32f43xxG in dual bank mode when PA12 is in use for chips below revision 3, see errata 2.2.11"); }