Skip to content

Commit 189c3e4

Browse files
committed
dcb: improve enable_trace documentation
1 parent 2c99e80 commit 189c3e4

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

src/peripheral/dcb.rs

+3-4
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,8 @@
33
use volatile_register::{RW, WO};
44

55
use crate::peripheral::DCB;
6+
#[allow(unused_imports)]
7+
use crate::peripheral::{DWT, ITM};
68
use core::ptr;
79

810
const DCB_DEMCR_TRCENA: u32 = 1 << 24;
@@ -22,10 +24,7 @@ pub struct RegisterBlock {
2224
}
2325

2426
impl DCB {
25-
/// Enables TRACE. This is for example required by the
26-
/// `peripheral::DWT` cycle counter to work properly.
27-
/// As by STM documentation, this flag is not reset on
28-
/// soft-reset, only on power reset.
27+
/// Global enable for all [`DWT`] and [`ITM`] features.
2928
///
3029
/// Note: vendor-specific registers may have to be set to completely
3130
/// enable tracing. For example, on the STM32F401RE, `TRACE_MODE`

0 commit comments

Comments
 (0)