Struct stm32wlxx_hal::pac::DWT

pub struct DWT { /* private fields */ }
Available on crate feature stm32wl5x_cm4 only.
Expand description

Data Watchpoint and Trace unit

Implementations§

§

impl DWT

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.

Returns true if the the implementation supports sampling and exception tracing

pub fn has_external_match() -> bool

Available on non-armv6m only.

Returns true if the implementation includes external match signals

pub fn has_cycle_counter() -> bool

Available on non-armv6m only.

Returns true if the implementation supports a cycle counter

pub fn has_profiling_counter() -> bool

Available on non-armv6m only.

Returns true if the implementation the profiling counters

pub fn enable_cycle_counter(&mut self)

Available on non-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.

Disables the cycle counter

pub fn cycle_counter_enabled() -> bool

Available on non-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 convention
Available on non-armv6m only.

Returns the current clock cycle count

pub fn cycle_count() -> u32

Available on non-armv6m only.

Returns the current clock cycle count

pub fn set_cycle_count(&mut self, count: u32)

Available on non-armv6m only.

Set the cycle count

pub fn unlock()

Available on non-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.

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.

Set the CPI count

pub fn exception_count() -> u8

Available on non-armv6m only.

Get the total cycles spent in exception processing

pub fn set_exception_count(&mut self, count: u8)

Available on non-armv6m only.

Set the exception count

pub fn sleep_count() -> u8

Available on non-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.

Set the sleep count

pub fn lsu_count() -> u8

Available on non-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.

Set the lsu count

pub fn fold_count() -> u8

Available on non-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.

Set the folded instruction count

§

impl DWT

pub const PTR: *const RegisterBlock = {0xe0001000 as *const cortex_m::peripheral::dwt::RegisterBlock}

Pointer to the register block

pub const fn ptr() -> *const RegisterBlock

👎Deprecated since 0.7.5: Use the associated constant PTR instead

Returns a pointer to the register block

Trait Implementations§

§

impl Deref for DWT

§

type Target = RegisterBlock

The resulting type after dereferencing.
§

fn deref(&self) -> &<DWT as Deref>::Target

Dereferences the value.
§

impl Send for DWT

Auto Trait Implementations§

§

impl RefUnwindSafe for DWT

§

impl !Sync for DWT

§

impl Unpin for DWT

§

impl UnwindSafe for DWT

Blanket Implementations§

source§

impl<T> Any for Twhere T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for Twhere T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for Twhere T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T, U> Into<U> for Twhere U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<T, U> TryFrom<U> for Twhere U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for Twhere U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.