请选择 进入手机版 | 继续访问电脑版

你的浏览器版本过低,可能导致网站不能正常访问!
为了你能正常使用网站功能,请使用这些浏览器。

STM32G071怎样通过DWT实现us精准定时?

[复制链接]
gingerjyz 提问时间:2023-3-18 11:40 / 未解决
[md]STM32G071怎样通过DWT实现us精准定时?,各位大佬有实现的吗?
收藏 评论4 发布时间:2023-3-18 11:40

举报

4个回答
butterflyspring 回答时间:2023-3-23 11:35:50
通过研究CM0+ 手册可以看到,这个DWT在CM0+内核上是个最基本的数据观察点单元。它没有 DWT_CYCCNT这个PC采样周期计数器,所以没有计数功能,同样比较器也只有地址比较功能。所以它仅仅能实现PC地址匹配功能,无法实现计数(计时)功能。 这个功能在更高级的内核上都有(CM3.CM4.......)

STM32G0 M0  DWT1.png STM32G0 M0  DWT2.png

yklstudent 回答时间:2023-3-18 22:12:02

M0,M0+内核确定支持DWT吗?

一个脑子不够用 回答时间:2023-3-19 09:23:30

先看看M0的手册

gingerjyz 回答时间:2023-3-19 09:47:09

yklstudent 发表于 2023-3-18 22:12
M0,M0+内核确定支持DWT吗?

M0+手册

37.8 DWT (Data Watchpoint) The Cortex**®**-M0+ DWT implementation provides two watchpoint register sets.

37.8.1 DWT functionality The processor watchpoints implement both data address and PC based watchpoint functionality, a PC sampling register, and support comparator address masking, as described in the **ARMv6-M Arm**.

37.8.2 DWT Program Counter Sample Register A processor that implements the data watchpoint unit also implements the ARMv6-M optional **DWT Program Counter Sample Register **(DWT_PCSR). This register permits a debugger to periodically sample the PC without halting the processor. This provides coarse grained profiling. See the **ARMv6-M Arm **for more information. The Cortex**®**-M0+ DWT_PCSR records both instructions that pass their condition codes and those that fail

关于意法半导体
我们是谁
投资者关系
意法半导体可持续发展举措
创新和工艺
招聘信息
联系我们
联系ST分支机构
寻找销售人员和分销渠道
社区
媒体中心
活动与培训
隐私策略
隐私策略
Cookies管理
行使您的权利
关注我们
st-img 微信公众号
st-img 手机版