By Mcuzone
dwt简介Data Watchpoint and Trace (DWT)
Data Watchpoint and Trace (DWT) for real-time variable monitoring and PC-sampling, which can in turn be used to periodically output the PC or various CPU-internal counters, which can be used to obtain profiling information from the target.
使用J-LinkV8
IAR版本6.6
调试串口波特率:115200
基于MDKK70-EK_T43硬件平台
串口输出:
//在没有仿真的情况下进入Debug中断
External Pin Reset
K70-256pin Silicon rev 1.0
Flash parameter version 0.0.8.0
Flash version ID 1.0.18.0
DWT watchpoint demo!!
Hit any key to start
set dwt watchpoint
//此时程序发生仿真中断,LED_D31灯亮起
****default_isr entered on vector 12*****
comparator match
//进行仿真时
Software Reset
K70-256pin Silicon rev 1.0
Flash parameter version 0.0.8.0
Flash version ID 1.0.18.0
DWT watchpoint demo!!
Hit any key to start
set dwt watchpoint
//此时程序仿真发生中断,LED_D31灯亮起,按IAR下按F5继续运行程序
comparator match
简单的说就是设置好触发源,在希望输出调试信息的地方操作触发源触发该中断。
Data Watchpoint and Trace (DWT) for real-time variable monitoring and PC-sampling, which can in turn be used to periodically output the PC or various CPU-internal counters, which can be used to obtain profiling information from the target.
使用J-LinkV8
IAR版本6.6
调试串口波特率:115200
基于MDKK70-EK_T43硬件平台
串口输出:
//在没有仿真的情况下进入Debug中断
External Pin Reset
K70-256pin Silicon rev 1.0
Flash parameter version 0.0.8.0
Flash version ID 1.0.18.0
DWT watchpoint demo!!
Hit any key to start
set dwt watchpoint
//此时程序发生仿真中断,LED_D31灯亮起
****default_isr entered on vector 12*****
comparator match
//进行仿真时
Software Reset
K70-256pin Silicon rev 1.0
Flash parameter version 0.0.8.0
Flash version ID 1.0.18.0
DWT watchpoint demo!!
Hit any key to start
set dwt watchpoint
//此时程序仿真发生中断,LED_D31灯亮起,按IAR下按F5继续运行程序
comparator match
简单的说就是设置好触发源,在希望输出调试信息的地方操作触发源触发该中断。
![](https://i-blog.csdnimg.cn/blog_migrate/2733a0487f4524bc6a5c02f48a640708.jpeg)
![](https://i-blog.csdnimg.cn/blog_migrate/306401c8027614a54aa6050955997d8e.jpeg)
![](https://i-blog.csdnimg.cn/blog_migrate/d18ba5a39099e8ff20c1cd141c22f43f.jpeg)
![](https://i-blog.csdnimg.cn/blog_migrate/1df554ef8affb3aae54b6d24101b4c12.jpeg)
源码及示例:
链接: http://pan.baidu.com/s/1o659hns 密码: 7vgo