Struct rp_pac::otp_data_raw::regs::BootFlags1
source · #[repr(transparent)]pub struct BootFlags1(pub u32);
Expand description
Disable/Enable boot paths/features in the RP2350 mask ROM. Disables always supersede enables. Enables are provided where there are other configurations in OTP that must be valid. (RBIT-3)
Tuple Fields§
§0: u32
Implementations§
source§impl BootFlags1
impl BootFlags1
sourcepub const fn key_valid(&self) -> u8
pub const fn key_valid(&self) -> u8
Mark each of the possible boot keys as valid. The bootrom will check signatures against all valid boot keys, and ignore invalid boot keys. Each bit in this field corresponds to one of the four 256-bit boot key hashes that may be stored in page 2 of the OTP. A KEY_VALID bit is ignored if the corresponding KEY_INVALID bit is set. Boot keys are considered valid only when KEY_VALID is set and KEY_INVALID is clear. Do not mark a boot key as KEY_VALID if it does not contain a valid SHA-256 hash of your secp256k1 public key. Verify keys after programming, before setting the KEY_VALID bits – a boot key with uncorrectable ECC faults will render your device unbootable if secure boot is enabled. Do not enable secure boot without first installing a valid key. This will render your device unbootable.
sourcepub fn set_key_valid(&mut self, val: u8)
pub fn set_key_valid(&mut self, val: u8)
Mark each of the possible boot keys as valid. The bootrom will check signatures against all valid boot keys, and ignore invalid boot keys. Each bit in this field corresponds to one of the four 256-bit boot key hashes that may be stored in page 2 of the OTP. A KEY_VALID bit is ignored if the corresponding KEY_INVALID bit is set. Boot keys are considered valid only when KEY_VALID is set and KEY_INVALID is clear. Do not mark a boot key as KEY_VALID if it does not contain a valid SHA-256 hash of your secp256k1 public key. Verify keys after programming, before setting the KEY_VALID bits – a boot key with uncorrectable ECC faults will render your device unbootable if secure boot is enabled. Do not enable secure boot without first installing a valid key. This will render your device unbootable.
sourcepub const fn key_invalid(&self) -> u8
pub const fn key_invalid(&self) -> u8
Mark a boot key as invalid, or prevent it from ever becoming valid. The bootrom will ignore any boot key marked as invalid during secure boot signature checks. Each bit in this field corresponds to one of the four 256-bit boot key hashes that may be stored in page 2 of the OTP. When provisioning boot keys, it’s recommended to mark any boot key slots you don’t intend to use as KEY_INVALID, so that spurious keys can not be installed at a later time.
sourcepub fn set_key_invalid(&mut self, val: u8)
pub fn set_key_invalid(&mut self, val: u8)
Mark a boot key as invalid, or prevent it from ever becoming valid. The bootrom will ignore any boot key marked as invalid during secure boot signature checks. Each bit in this field corresponds to one of the four 256-bit boot key hashes that may be stored in page 2 of the OTP. When provisioning boot keys, it’s recommended to mark any boot key slots you don’t intend to use as KEY_INVALID, so that spurious keys can not be installed at a later time.
sourcepub const fn double_tap_delay(&self) -> u8
pub const fn double_tap_delay(&self) -> u8
Adjust how long to wait for a second reset when double tap BOOTSEL mode is enabled via DOUBLE_TAP. The minimum is 50 milliseconds, and each unit of this field adds an additional 50 milliseconds. For example, settings this field to its maximum value of 7 will cause the chip to wait for 400 milliseconds at boot to check for a second reset which requests entry to BOOTSEL mode. 200 milliseconds (DOUBLE_TAP_DELAY=3) is a good intermediate value.
sourcepub fn set_double_tap_delay(&mut self, val: u8)
pub fn set_double_tap_delay(&mut self, val: u8)
Adjust how long to wait for a second reset when double tap BOOTSEL mode is enabled via DOUBLE_TAP. The minimum is 50 milliseconds, and each unit of this field adds an additional 50 milliseconds. For example, settings this field to its maximum value of 7 will cause the chip to wait for 400 milliseconds at boot to check for a second reset which requests entry to BOOTSEL mode. 200 milliseconds (DOUBLE_TAP_DELAY=3) is a good intermediate value.
sourcepub const fn double_tap(&self) -> bool
pub const fn double_tap(&self) -> bool
Enable entering BOOTSEL mode via double-tap of the RUN/RSTn pin. Adds a significant delay to boot time, as configured by DOUBLE_TAP_DELAY. This functions by waiting at startup (i.e. following a reset) to see if a second reset is applied soon afterward. The second reset is detected by the bootrom with help of the POWMAN_CHIP_RESET_DOUBLE_TAP flag, which is not reset by the external reset pin, and the bootrom enters BOOTSEL mode (NSBOOT) to await further instruction over USB or UART.
sourcepub fn set_double_tap(&mut self, val: bool)
pub fn set_double_tap(&mut self, val: bool)
Enable entering BOOTSEL mode via double-tap of the RUN/RSTn pin. Adds a significant delay to boot time, as configured by DOUBLE_TAP_DELAY. This functions by waiting at startup (i.e. following a reset) to see if a second reset is applied soon afterward. The second reset is detected by the bootrom with help of the POWMAN_CHIP_RESET_DOUBLE_TAP flag, which is not reset by the external reset pin, and the bootrom enters BOOTSEL mode (NSBOOT) to await further instruction over USB or UART.
Trait Implementations§
source§impl Clone for BootFlags1
impl Clone for BootFlags1
source§fn clone(&self) -> BootFlags1
fn clone(&self) -> BootFlags1
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moresource§impl Default for BootFlags1
impl Default for BootFlags1
source§fn default() -> BootFlags1
fn default() -> BootFlags1
source§impl PartialEq for BootFlags1
impl PartialEq for BootFlags1
impl Copy for BootFlags1
impl Eq for BootFlags1
impl StructuralPartialEq for BootFlags1
Auto Trait Implementations§
impl Freeze for BootFlags1
impl RefUnwindSafe for BootFlags1
impl Send for BootFlags1
impl Sync for BootFlags1
impl Unpin for BootFlags1
impl UnwindSafe for BootFlags1
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
clone_to_uninit
)