Struct nrf52832_hal::pac::DWT [−]
pub struct DWT { /* fields omitted */ }
Expand description
Data Watchpoint and Trace unit
Implementations
impl DWT
impl DWT
Number of comparators implemented
A value of zero indicates no comparator support.
pub fn has_exception_trace() -> bool
pub fn has_exception_trace() -> bool
Returns true
if the the implementation supports sampling and exception tracing
pub fn has_external_match() -> bool
pub fn has_external_match() -> bool
Returns true
if the implementation includes external match signals
pub fn has_cycle_counter() -> bool
pub fn has_cycle_counter() -> bool
Returns true
if the implementation supports a cycle counter
pub fn has_profiling_counter() -> bool
pub fn has_profiling_counter() -> bool
Returns true
if the implementation the profiling counters
pub 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).
pub fn disable_cycle_counter(&mut self)
pub fn disable_cycle_counter(&mut self)
Disables the cycle counter
pub fn cycle_counter_enabled() -> bool
pub fn cycle_counter_enabled() -> bool
Returns true
if the cycle counter is enabled
pub 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
pub fn cycle_count() -> u32
pub fn cycle_count() -> u32
Returns the current clock cycle count
pub fn set_cycle_count(&mut self, count: u32)
pub fn set_cycle_count(&mut self, count: u32)
Set the cycle count
pub 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.
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.
pub fn set_cpi_count(&mut self, count: u8)
pub fn set_cpi_count(&mut self, count: u8)
Set the CPI count
pub fn exception_count() -> u8
pub fn exception_count() -> u8
Get the total cycles spent in exception processing
pub fn set_exception_count(&mut self, count: u8)
pub fn set_exception_count(&mut self, count: u8)
Set the exception count
pub 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.
pub fn set_sleep_count(&mut self, count: u8)
pub fn set_sleep_count(&mut self, count: u8)
Set the sleep count
Get the additional cycles required to execute all load or store instructions
pub fn set_lsu_count(&mut self, count: u8)
pub fn set_lsu_count(&mut self, count: u8)
Set the lsu count
pub fn fold_count() -> u8
pub fn fold_count() -> u8
Get the folded instruction count
Increments on each instruction that takes 0 cycles.
pub fn set_fold_count(&mut self, count: u8)
pub fn set_fold_count(&mut self, count: u8)
Set the folded instruction count
impl DWT
impl DWT
Trait Implementations
Auto Trait Implementations
Blanket Implementations
Mutably borrows from an owned value. Read more
Casts the value.
Casts the value.
Performs the conversion.
Performs the conversion.
Casts the value.
OverflowingCasts the value.
Casts the value.
Casts the value.
Casts the value.
UnwrappedCasts the value.
Casts the value.
WrappingCasts the value.