Struct ep_dwt::DwtProfiler [−][src]
pub struct DwtProfiler<const FREQ: u32> { /* fields omitted */ }Expand description
DWT trace unit implementing EmbeddedProfiler.
The frequency of the DWT is encoded using the parameter FREQ.
Implementations
Enable the DWT and provide a new EmbeddedProfiler.
Note that the sysclk parameter should come from e.g. the HAL’s clock generation function
so the real speed and the declared speed can be compared.
Panics
asserts that the compile time constant FREQ matches the runtime provided sysclk
Trait Implementations
Takes a reading from the clock
Optionally log the snapshot to some output, like a serial port
Optional function that gets called at the start of the snapshot recording.
If one would want to very simple profiling, they could use at_start and at_end
to simply toggle a GPIO. Read more
takes the starting snapshot of a specific trace
fn end_snapshot(
&self,
start: Instant<u64, 1_u32, 1000000_u32>,
name: &'static str
) -> Option<EPSnapshot>
fn end_snapshot(
&self,
start: Instant<u64, 1_u32, 1000000_u32>,
name: &'static str
) -> Option<EPSnapshot>
computes the duration of the snapshot given the start time, if there hasn’t been overflow Read more
