From 145c2e37b2e9a21f6652ae63ac6c82f758f4d008 Mon Sep 17 00:00:00 2001 From: bunnie Date: Tue, 18 Nov 2025 23:19:28 +0800 Subject: [PATCH] raise visibility of the erase value --- libs/bao1x-hal/src/sigcheck.rs | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/libs/bao1x-hal/src/sigcheck.rs b/libs/bao1x-hal/src/sigcheck.rs index 73cef9444..11921ce40 100644 --- a/libs/bao1x-hal/src/sigcheck.rs +++ b/libs/bao1x-hal/src/sigcheck.rs @@ -14,6 +14,11 @@ use crate::acram::OneWayCounter; use crate::acram::{AccessSettings, SlotManager}; use crate::udma::Spim; +// An erase value of 0 can be conflated with access permissions being incorrect. Choose a non-0 value +// for the erase value, but also, don't pick a 0-1-0-1 dense pattern because that can assist with +// calibrating microscopy techniques. +pub const ERASE_VALUE: u8 = 0x03; + /// Current draw @ 200MHz CPU ACLK (400MHz FCLK), VDD85 = 0.80V nom (measured @0.797V): ~71mA peak @ 27C, /// measured on VDD33 (LDO path places strict upper bounds on IDD85). Target: < 100mA under all PVT. /// @@ -208,11 +213,6 @@ pub fn erase_secrets() { #[cfg(not(feature = "std"))] pub fn erase_secrets() { - // An erase value of 0 is conflateable with access permissions being incorrect. Choose a non-0 value - // for the erase value, but also, don't pick a 0-1-0-1 dense pattern because that can assist with - // calibrating microscopy techniques. - const ERASE_VALUE: u8 = 0x03; - // ensure coreuser settings, as we could enter from a variety of loader stages let mut cu = crate::coreuser::Coreuser::new(); cu.set();