Struct embedded_profiling::dwt_systick::DwtSystick [−][src]
pub struct DwtSystick<const FREQ: u32> { /* fields omitted */ }Expand description
DWT and Systick combination implementing embedded_time::Clock and rtic_monotonic::Monotonic
The frequency of the DWT and SysTick is encoded using the parameter FREQ.
Implementations
Enable the DWT and provide a new Monotonic based on DWT and SysTick.
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 reset the clock to zero. This function will be called at the beginning of
start_snapshot. Read more
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
computes the duration of the snapshot given the start time