pub struct DWT { /* private fields */ }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
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.
pub 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.
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
pub fn lsu_count() -> u8
pub fn lsu_count() -> u8
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
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
sourceimpl<T> CheckedAs for T
impl<T> CheckedAs for T
sourcefn checked_as<Dst>(self) -> Option<Dst> where
T: CheckedCast<Dst>,
fn checked_as<Dst>(self) -> Option<Dst> where
T: CheckedCast<Dst>,
Casts the value.
sourceimpl<Src, Dst> CheckedCastFrom<Src> for Dst where
Src: CheckedCast<Dst>,
impl<Src, Dst> CheckedCastFrom<Src> for Dst where
Src: CheckedCast<Dst>,
sourcefn checked_cast_from(src: Src) -> Option<Dst>
fn checked_cast_from(src: Src) -> Option<Dst>
Casts the value.
sourceimpl<Src, Dst> LosslessTryInto<Dst> for Src where
Dst: LosslessTryFrom<Src>,
impl<Src, Dst> LosslessTryInto<Dst> for Src where
Dst: LosslessTryFrom<Src>,
sourcefn lossless_try_into(self) -> Option<Dst>
fn lossless_try_into(self) -> Option<Dst>
Performs the conversion.
sourceimpl<Src, Dst> LossyInto<Dst> for Src where
Dst: LossyFrom<Src>,
impl<Src, Dst> LossyInto<Dst> for Src where
Dst: LossyFrom<Src>,
sourcefn lossy_into(self) -> Dst
fn lossy_into(self) -> Dst
Performs the conversion.
sourceimpl<T> OverflowingAs for T
impl<T> OverflowingAs for T
sourcefn overflowing_as<Dst>(self) -> (Dst, bool) where
T: OverflowingCast<Dst>,
fn overflowing_as<Dst>(self) -> (Dst, bool) where
T: OverflowingCast<Dst>,
Casts the value.
sourceimpl<Src, Dst> OverflowingCastFrom<Src> for Dst where
Src: OverflowingCast<Dst>,
impl<Src, Dst> OverflowingCastFrom<Src> for Dst where
Src: OverflowingCast<Dst>,
sourcefn overflowing_cast_from(src: Src) -> (Dst, bool)
fn overflowing_cast_from(src: Src) -> (Dst, bool)
OverflowingCasts the value.
sourceimpl<T> SaturatingAs for T
impl<T> SaturatingAs for T
sourcefn saturating_as<Dst>(self) -> Dst where
T: SaturatingCast<Dst>,
fn saturating_as<Dst>(self) -> Dst where
T: SaturatingCast<Dst>,
Casts the value.
sourceimpl<Src, Dst> SaturatingCastFrom<Src> for Dst where
Src: SaturatingCast<Dst>,
impl<Src, Dst> SaturatingCastFrom<Src> for Dst where
Src: SaturatingCast<Dst>,
sourcefn saturating_cast_from(src: Src) -> Dst
fn saturating_cast_from(src: Src) -> Dst
Casts the value.
sourceimpl<T> UnwrappedAs for T
impl<T> UnwrappedAs for T
sourcefn unwrapped_as<Dst>(self) -> Dst where
T: UnwrappedCast<Dst>,
fn unwrapped_as<Dst>(self) -> Dst where
T: UnwrappedCast<Dst>,
Casts the value.
sourceimpl<Src, Dst> UnwrappedCastFrom<Src> for Dst where
Src: UnwrappedCast<Dst>,
impl<Src, Dst> UnwrappedCastFrom<Src> for Dst where
Src: UnwrappedCast<Dst>,
sourcefn unwrapped_cast_from(src: Src) -> Dst
fn unwrapped_cast_from(src: Src) -> Dst
UnwrappedCasts the value.
sourceimpl<T> WrappingAs for T
impl<T> WrappingAs for T
sourcefn wrapping_as<Dst>(self) -> Dst where
T: WrappingCast<Dst>,
fn wrapping_as<Dst>(self) -> Dst where
T: WrappingCast<Dst>,
Casts the value.
sourceimpl<Src, Dst> WrappingCastFrom<Src> for Dst where
Src: WrappingCast<Dst>,
impl<Src, Dst> WrappingCastFrom<Src> for Dst where
Src: WrappingCast<Dst>,
sourcefn wrapping_cast_from(src: Src) -> Dst
fn wrapping_cast_from(src: Src) -> Dst
WrappingCasts the value.