This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

Can DWT units of cortex-m4 (on any board) simulated using kile uVision 5 simulator??

Hi, I am trying to use the functionality of Data watchPoints and trace (DWT) to detect stack overflow. you can find more about in the following blogs.

-http://m0agx.eu/2018/08/25/cortex-m-debugging-runtime-memory-corruption/

https://interrupt.memfault.com/blog/cortex-m-watchpoints#dwt-cortex-m-examples

Basically ,Cortex-M3 and M4 cores have a DWT unit. It can be used to set up breakpoints and watchpoints. Watchpoint (also called a data or memory breakpoint) is triggered when a particular address is read or written by the CPU. The DWT has 3 address comparators that allow to set up to 3 watchpoints total. When a value is matched the DWT simply triggers a DebugMon interrupt. Due to its simplicity it is the ideal tool to catch memory corruption at a late stage of firmware development.

I am trying to run the code form this blog (http://m0agx.eu/2018/08/25/cortex-m-debugging-runtime-memory-corruption/).but DebugMon  interrupt is not triggerd .

I posted about same issue on stack overflow (https://stackoverflow.com/questions/72122224/data-watchpoints-dwt-on-cortex-m4-to-detect-memory-corruption)

my question are DWT units simulated on kile simulator and are they accessible in c program??if yes how do i use them??