Struct stm32_metapac::tamp::regs::Seccfgr
#[repr(transparent)]pub struct Seccfgr(pub u32);
Expand description
TAMP secure mode register.
Tuple Fields§
§0: u32
Implementations§
§impl Seccfgr
impl Seccfgr
pub const fn bkprwsec(&self) -> u8
pub const fn bkprwsec(&self) -> u8
Backup registers read/write protection offset Protection zone 1 is defined for backup registers from TAMP_BKP0R to TAMP_BKPxR (x = BKPRWSEC-1, from 0 to 128). if TZEN=1, these backup registers can be read and written only with secure access. If TZEN=0: the protection zone 1 can be read and written with non-secure access. If BKPRWSEC = 0: there is no protection zone 1. If BKPRWPRIV is set, BKPRWSEC[7:0] can be written only in privileged mode.
pub fn set_bkprwsec(&mut self, val: u8)
pub fn set_bkprwsec(&mut self, val: u8)
Backup registers read/write protection offset Protection zone 1 is defined for backup registers from TAMP_BKP0R to TAMP_BKPxR (x = BKPRWSEC-1, from 0 to 128). if TZEN=1, these backup registers can be read and written only with secure access. If TZEN=0: the protection zone 1 can be read and written with non-secure access. If BKPRWSEC = 0: there is no protection zone 1. If BKPRWPRIV is set, BKPRWSEC[7:0] can be written only in privileged mode.
pub fn set_cnt1sec(&mut self, val: bool)
pub fn set_cnt1sec(&mut self, val: bool)
Monotonic counter 1 secure protection.
pub const fn bkpwsec(&self) -> u8
pub const fn bkpwsec(&self) -> u8
Backup registers write protection offset Protection zone 2 is defined for backup registers from TAMP_BKPyR (y = BKPRWSEC, from 0 to 128) to TAMP_BKPzR (z = BKPWSEC-1, from 0 to 128, BKPWSEC ≥ BKPRWSEC): if TZEN=1, these backup registers can be written only with secure access. They can be read with secure or non-secure access. Protection zone 3 defined for backup registers from TAMP_BKPtR (t = BKPWSEC, from 0 to 127). They can be read or written with secure or non-secure access. If TZEN=0: the protection zone 2 can be read and written with non-secure access. If BKPWSEC = 0 or if BKPWSEC ≤ BKPRWSEC: there is no protection zone 2. If BKPWPRIV is set, BKPRWSEC[7:0] can be written only in privileged mode.
pub fn set_bkpwsec(&mut self, val: u8)
pub fn set_bkpwsec(&mut self, val: u8)
Backup registers write protection offset Protection zone 2 is defined for backup registers from TAMP_BKPyR (y = BKPRWSEC, from 0 to 128) to TAMP_BKPzR (z = BKPWSEC-1, from 0 to 128, BKPWSEC ≥ BKPRWSEC): if TZEN=1, these backup registers can be written only with secure access. They can be read with secure or non-secure access. Protection zone 3 defined for backup registers from TAMP_BKPtR (t = BKPWSEC, from 0 to 127). They can be read or written with secure or non-secure access. If TZEN=0: the protection zone 2 can be read and written with non-secure access. If BKPWSEC = 0 or if BKPWSEC ≤ BKPRWSEC: there is no protection zone 2. If BKPWPRIV is set, BKPRWSEC[7:0] can be written only in privileged mode.
pub const fn bhklock(&self) -> bool
pub const fn bhklock(&self) -> bool
Boot hardware key lock This bit can be read and can only be written to 1 by software. It is cleared by hardware together with the backup registers following a tamper detection event or when the readout protection (RDP) is disabled.
pub fn set_bhklock(&mut self, val: bool)
pub fn set_bhklock(&mut self, val: bool)
Boot hardware key lock This bit can be read and can only be written to 1 by software. It is cleared by hardware together with the backup registers following a tamper detection event or when the readout protection (RDP) is disabled.
pub const fn tampsec(&self) -> bool
pub const fn tampsec(&self) -> bool
Tamper protection (excluding monotonic counters and backup registers) Note: Refer to for details on the read protection.
pub fn set_tampsec(&mut self, val: bool)
pub fn set_tampsec(&mut self, val: bool)
Tamper protection (excluding monotonic counters and backup registers) Note: Refer to for details on the read protection.