Skip to content

Commit f6c508f

Browse files
committed
assert cycle counter presence
1 parent 2303279 commit f6c508f

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

src/lib.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@ impl<const TIMER_HZ: u32> DwtSystick<TIMER_HZ> {
3636
#[inline(always)]
3737
pub fn new(dcb: &mut DCB, dwt: DWT, systick: SYST, sysclk: u32) -> Self {
3838
assert!(TIMER_HZ == sysclk);
39+
assert!(DWT::has_cycle_counter());
3940

4041
dcb.enable_trace();
4142
DWT::unlock();

0 commit comments

Comments
 (0)