CoreDebug->DEMCR default value
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2023-12-11 6:31 AM - edited ‎2023-12-11 2:17 PM
Hi,
MCU - STM32H7
I have noticed that the CoreDebug_DEMCR_TRCENA bit in the DEMCR register is set by default if a debugger is connected. But, I need to enable it explicitly (as shown below) if the debugger is not connected.
- Labels:
-
STM32H7 Series
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2023-12-11 5:48 PM
> Can I please ask why do we need to enable this explicitly if the debugger is not connected ?
Because it's disabled by default.
> Also, Is the debugger enabling CoreDebug_DEMCR_TRCENA bit implicitly ?
Yes.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2023-12-12 2:01 AM
Thank you for your reply.
Can I please also ask if there are any disadvantages by keeping this DWT and ITM units enabled on a device on the field ?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2023-12-12 2:08 AM
Consumes some more power keeping the unit clocking, and having a 32-bit counter clock continously at CPU frequency.
Debugger initialization turns on things it needs, settings it wants. ie DWT, FPB units etc, GPIO banks for PA and PB pins.
Up vote any posts that you find helpful, it shows what's working..
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2023-12-12 8:15 AM
No disadvantages other than additional modest power consumption. Might interfere with putting it into sleep modes.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2023-12-12 10:25 AM
Thank you @TDK and @Tesla DeLorean for your answers
