File tree 1 file changed +5
-2
lines changed
1 file changed +5
-2
lines changed Original file line number Diff line number Diff line change @@ -34,13 +34,16 @@ impl DCB {
34
34
// unset bit 24 / TRCENA
35
35
unsafe { self . demcr . modify ( |w| w & !DCB_DEMCR_TRCENA ) ; }
36
36
37
- /// Is there a debugger attached? (see note )
37
+ /// Is there a debugger attached? (see notes )
38
38
///
39
- /// N.B. This function is [reported not to
39
+ /// Note 1: This function is [reported not to
40
40
/// work](http://web.archive.org/web/20180821191012/https://community.nxp.com/thread/424925#comment-782843)
41
41
/// on Cortex-M0 devices. Per the ARM v6-M Architecture Reference Manual, "Access to the DHCSR
42
42
/// from software running on the processor is IMPLEMENTATION DEFINED". Indeed, from the
43
43
/// [Cortex-M0+ r0p1 Technical Reference Manual](http://infocenter.arm.com/help/index.jsp?topic=/com.arm.doc.ddi0484c/BABJHEIG.html), "Note Software cannot access the debug registers."
44
+ ///
45
+ /// Note 2: This function reads the DHCSR register, and therefore clears S_RESET_ST and
46
+ /// S_RETIRE_ST.
44
47
pub fn is_debugger_attached ( ) -> bool {
45
48
unsafe { ( * Self :: ptr ( ) ) . dhcsr . read ( ) & 0x1 == 1 }
46
49
}
You can’t perform that action at this time.
0 commit comments