Struct msp432p401r::DWT
source · [−]pub struct DWT { /* private fields */ }
Expand description
Data Watchpoint and Trace unit
Implementations
sourceimpl DWT
impl DWT
sourcepub fn num_comp() -> u8
pub fn num_comp() -> u8
Number of comparators implemented
A value of zero indicates no comparator support.
sourcepub fn has_exception_trace() -> bool
pub fn has_exception_trace() -> bool
Returns true
if the the implementation supports sampling and exception tracing
sourcepub fn has_external_match() -> bool
pub fn has_external_match() -> bool
Returns true
if the implementation includes external match signals
sourcepub fn has_cycle_counter() -> bool
pub fn has_cycle_counter() -> bool
Returns true
if the implementation supports a cycle counter
sourcepub fn has_profiling_counter() -> bool
pub fn has_profiling_counter() -> bool
Returns true
if the implementation the profiling counters
sourcepub fn enable_cycle_counter(&mut self)
pub fn enable_cycle_counter(&mut self)
Enables the cycle counter
The global trace enable (DCB::enable_trace
) should be set before
enabling the cycle counter, the processor may ignore writes to the
cycle counter enable if the global trace is disabled
(implementation defined behaviour).
sourcepub fn disable_cycle_counter(&mut self)
pub fn disable_cycle_counter(&mut self)
Disables the cycle counter
sourcepub fn cycle_counter_enabled() -> bool
pub fn cycle_counter_enabled() -> bool
Returns true
if the cycle counter is enabled
sourcepub fn get_cycle_count() -> u32
👎 Deprecated since 0.7.4: Use cycle_count
which follows the C-GETTER convention
pub fn get_cycle_count() -> u32
Use cycle_count
which follows the C-GETTER convention
Returns the current clock cycle count
sourcepub fn cycle_count() -> u32
pub fn cycle_count() -> u32
Returns the current clock cycle count
sourcepub fn set_cycle_count(&mut self, count: u32)
pub fn set_cycle_count(&mut self, count: u32)
Set the cycle count
sourcepub fn unlock()
pub fn unlock()
Removes the software lock on the DWT
Some devices, like the STM32F7, software lock the DWT after a power cycle.
sourcepub fn cpi_count() -> u8
pub fn cpi_count() -> u8
Get the CPI count
Counts additional cycles required to execute multi-cycle instructions,
except those recorded by lsu_count
, and counts any instruction fetch
stalls.
sourcepub fn set_cpi_count(&mut self, count: u8)
pub fn set_cpi_count(&mut self, count: u8)
Set the CPI count
sourcepub fn exception_count() -> u8
pub fn exception_count() -> u8
Get the total cycles spent in exception processing
sourcepub fn set_exception_count(&mut self, count: u8)
pub fn set_exception_count(&mut self, count: u8)
Set the exception count
sourcepub fn sleep_count() -> u8
pub fn sleep_count() -> u8
Get the total number of cycles that the processor is sleeping
ARM recommends that this counter counts all cycles when the processor is sleeping, regardless of whether a WFI or WFE instruction, or the sleep-on-exit functionality, caused the entry to sleep mode. However, all sleep features are implementation defined and therefore when this counter counts is implementation defined.
sourcepub fn set_sleep_count(&mut self, count: u8)
pub fn set_sleep_count(&mut self, count: u8)
Set the sleep count
sourcepub fn lsu_count() -> u8
pub fn lsu_count() -> u8
Get the additional cycles required to execute all load or store instructions
sourcepub fn set_lsu_count(&mut self, count: u8)
pub fn set_lsu_count(&mut self, count: u8)
Set the lsu count
sourcepub fn fold_count() -> u8
pub fn fold_count() -> u8
Get the folded instruction count
Increments on each instruction that takes 0 cycles.
sourcepub fn set_fold_count(&mut self, count: u8)
pub fn set_fold_count(&mut self, count: u8)
Set the folded instruction count
sourceimpl DWT
impl DWT
sourcepub const PTR: *const RegisterBlock = {0xe0001000 as *const cortex_m::peripheral::dwt::RegisterBlock}
pub const PTR: *const RegisterBlock = {0xe0001000 as *const cortex_m::peripheral::dwt::RegisterBlock}
Pointer to the register block
sourcepub const fn ptr() -> *const RegisterBlock
👎 Deprecated since 0.7.5: Use the associated constant PTR
instead
pub const fn ptr() -> *const RegisterBlock
Use the associated constant PTR
instead
Returns a pointer to the register block
Trait Implementations
Auto Trait Implementations
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more