Struct Seccfgr
#[repr(transparent)]pub struct Seccfgr(pub u32);Expand description
TAMP secure mode register.
Tuple Fields§
§0: u32Implementations§
§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 BKP0R to BKPxR (x = BKPRWSEC-1). BKPRWSEC value must be from 0 to 32. If TZEN=1, these backup registers can be read and written only with secure access. If TZEN=0, 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 can be written only in privileged mode.
pub const fn set_bkprwsec(&mut self, val: u8)
pub const fn set_bkprwsec(&mut self, val: u8)
Backup registers read/write protection offset. Protection zone 1 is defined for backup registers from BKP0R to BKPxR (x = BKPRWSEC-1). BKPRWSEC value must be from 0 to 32. If TZEN=1, these backup registers can be read and written only with secure access. If TZEN=0, 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 can be written only in privileged mode.
pub const fn set_cnt1sec(&mut self, val: bool)
pub const 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 BKPyR (y = BKPRWSEC) to BKPzR (z = BKPWSEC-1, BKPWSEC >= BKPRWSEC). BKPWSEC value must be from 0 to 32. 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 is defined for backup registers from BKPtR (t = BKPWSEC); they can be read or written with secure or non-secure access. If TZEN=0, protection zone 2 can be read and written with non-secure access. If BKPWSEC = 0 or BKPWSEC <= BKPRWSEC, there is no protection zone 2. If BKPWPRIV is set, BKPWSEC can be written only in privileged mode.
pub const fn set_bkpwsec(&mut self, val: u8)
pub const fn set_bkpwsec(&mut self, val: u8)
Backup registers write protection offset. Protection zone 2 is defined for backup registers from BKPyR (y = BKPRWSEC) to BKPzR (z = BKPWSEC-1, BKPWSEC >= BKPRWSEC). BKPWSEC value must be from 0 to 32. 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 is defined for backup registers from BKPtR (t = BKPWSEC); they can be read or written with secure or non-secure access. If TZEN=0, protection zone 2 can be read and written with non-secure access. If BKPWSEC = 0 or BKPWSEC <= BKPRWSEC, there is no protection zone 2. If BKPWPRIV is set, BKPWSEC 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 product state is opened (or the readout protection is disabled).
pub const fn set_bhklock(&mut self, val: bool)
pub const 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 product state is opened (or the readout protection is disabled).
pub const fn tampsec(&self) -> bool
pub const fn tampsec(&self) -> bool
Tamper protection (excluding monotonic counters and backup registers).
pub const fn set_tampsec(&mut self, val: bool)
pub const fn set_tampsec(&mut self, val: bool)
Tamper protection (excluding monotonic counters and backup registers).