Struct stm32wlxx_hal::pac::DWT
pub struct DWT { /* private fields */ }
stm32wl5x_cm4
only.Expand description
Data Watchpoint and Trace unit
Implementations§
§impl DWT
impl DWT
pub fn num_comp() -> u8
pub fn num_comp() -> u8
Number of comparators implemented
A value of zero indicates no comparator support.
pub fn has_exception_trace() -> bool
Available on non-armv6m
only.
pub fn has_exception_trace() -> bool
armv6m
only.Returns true
if the the implementation supports sampling and exception tracing
pub fn has_external_match() -> bool
Available on non-armv6m
only.
pub fn has_external_match() -> bool
armv6m
only.Returns true
if the implementation includes external match signals
pub fn has_cycle_counter() -> bool
Available on non-armv6m
only.
pub fn has_cycle_counter() -> bool
armv6m
only.Returns true
if the implementation supports a cycle counter
pub fn has_profiling_counter() -> bool
Available on non-armv6m
only.
pub fn has_profiling_counter() -> bool
armv6m
only.Returns true
if the implementation the profiling counters
pub fn enable_cycle_counter(&mut self)
Available on non-armv6m
only.
pub fn enable_cycle_counter(&mut self)
armv6m
only.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)
Available on non-armv6m
only.
pub fn disable_cycle_counter(&mut self)
armv6m
only.Disables the cycle counter
pub fn cycle_counter_enabled() -> bool
Available on non-armv6m
only.
pub fn cycle_counter_enabled() -> bool
armv6m
only.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 conventionAvailable on non-armv6m
only.
pub fn get_cycle_count() -> u32
cycle_count
which follows the C-GETTER conventionarmv6m
only.Returns the current clock cycle count
pub fn cycle_count() -> u32
Available on non-armv6m
only.
pub fn cycle_count() -> u32
armv6m
only.Returns the current clock cycle count
pub fn set_cycle_count(&mut self, count: u32)
Available on non-armv6m
only.
pub fn set_cycle_count(&mut self, count: u32)
armv6m
only.Set the cycle count
pub fn unlock()
Available on non-armv6m
only.
pub fn unlock()
armv6m
only.Removes the software lock on the DWT
Some devices, like the STM32F7, software lock the DWT after a power cycle.
pub fn cpi_count() -> u8
Available on non-armv6m
only.
pub fn cpi_count() -> u8
armv6m
only.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)
Available on non-armv6m
only.
pub fn set_cpi_count(&mut self, count: u8)
armv6m
only.Set the CPI count
pub fn exception_count() -> u8
Available on non-armv6m
only.
pub fn exception_count() -> u8
armv6m
only.Get the total cycles spent in exception processing
pub fn set_exception_count(&mut self, count: u8)
Available on non-armv6m
only.
pub fn set_exception_count(&mut self, count: u8)
armv6m
only.Set the exception count
pub fn sleep_count() -> u8
Available on non-armv6m
only.
pub fn sleep_count() -> u8
armv6m
only.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)
Available on non-armv6m
only.
pub fn set_sleep_count(&mut self, count: u8)
armv6m
only.Set the sleep count
pub fn lsu_count() -> u8
Available on non-armv6m
only.
pub fn lsu_count() -> u8
armv6m
only.Get the additional cycles required to execute all load or store instructions
pub fn set_lsu_count(&mut self, count: u8)
Available on non-armv6m
only.
pub fn set_lsu_count(&mut self, count: u8)
armv6m
only.Set the lsu count
pub fn fold_count() -> u8
Available on non-armv6m
only.
pub fn fold_count() -> u8
armv6m
only.Get the folded instruction count
Increments on each instruction that takes 0 cycles.
pub fn set_fold_count(&mut self, count: u8)
Available on non-armv6m
only.
pub fn set_fold_count(&mut self, count: u8)
armv6m
only.Set the folded instruction count