Skip to content

Commit 7042622

Browse files
committed
Add pre-requisites for enabling the cycle counter to docs
1 parent 45e7ab7 commit 7042622

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

src/peripheral/dwt.rs

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,13 @@ pub struct Comparator {
6464

6565
impl DWT {
6666
/// Enables the cycle counter
67+
///
68+
/// The global trace enable ([`DCB::enable_trace`]) should be set before
69+
/// enabling the cycle counter, the processor may ignore writes to the
70+
/// cycle counter enable if the global trace is disabled
71+
/// (implementation defined behaviour).
72+
///
73+
/// [`DCB::enable_trace`]: crate::peripheral::DCB::enable_trace
6774
#[cfg(not(armv6m))]
6875
#[inline]
6976
pub fn enable_cycle_counter(&mut self) {

0 commit comments

Comments
 (0)