OpenEdv-开源电子网

 找回密码
 立即注册
正点原子全套STM32/Linux/FPGA开发资料,上千讲STM32视频教程免费下载...
查看: 4136|回复: 2

关于STM32L0低功耗调试的问题

[复制链接]

5

主题

18

帖子

0

精华

初级会员

Rank: 2

积分
92
金钱
92
注册时间
2016-1-8
在线时间
16 小时
发表于 2017-5-3 17:55:02 | 显示全部楼层 |阅读模式
5金钱
在做一个项目,运行流程就是RTC唤醒之后进行一些操作及数据传输,全部做完之后再进入standby模式等着RTC唤醒
整体已经完成进入测试环节,
但在测试过程中测试很长时间之后就会出现卡死的情况,jlink无法调试

内部有循环的地方都有实现软件看门狗,
窗口看门狗不方便因为需要重启之后才能关闭
IWDG时间又太短

现在出现偶尔死机的情况,如何发现程序中的问题点? 怎么进行调试?

最佳答案

查看完整内容[请看2#楼]

>>但在测试过程中测试很长时间之后就会出现卡死的情况,jlink无法调试 说明低功耗生效了。 量产的固件记得去掉调试位,不然功耗下不去。
正点原子逻辑分析仪DL16劲爆上市
回复

使用道具 举报

11

主题

1044

帖子

0

精华

论坛元老

Rank: 8Rank: 8

积分
3725
金钱
3725
注册时间
2011-5-23
在线时间
2013 小时
发表于 2017-5-3 17:55:03 | 显示全部楼层
>>但在测试过程中测试很长时间之后就会出现卡死的情况,jlink无法调试
说明低功耗生效了。

27.9.1 Debug support for low-power modes
To enter low-power mode, the instruction WFI or WFE must be executed.
The MCU implements several low-power modes which can either deactivate the CPU clock
or reduce the power of the CPU.
The core does not allow FCLK or HCLK to be turned off during a debug session. As these
are required for the debugger connection, during a debug, they must remain active. The
MCU integrates special means to allow the user to debug software in low-power modes.
For this, the debugger host must first set some debug configuration registers to change the
low-power mode behavior:
• In Sleep mode: FCLK and HCLK are still active. Consequently, this mode does not
impose any restrictions on the standard debug features.
• In Stop/Standby mode, the DBG_STOP bit must be previously set by the debugger.
This enables the internal RC oscillator clock to feed FCLK and HCLK in Stop mode.
When one of the DBG_STANDBY, DBG_STOP and DBG_SLEEP bit is set and the internal
reference voltage is stopped in low-power mode (ULP bit set in PWR_CR register), then the
Fast wakeup must be enabled (FWU bit set in PWR_CR).
For code example, refer to A.18.2: DBG debug in LPM code example.
量产的固件记得去掉调试位,不然功耗下不去。
RT-Thread RTOS 音频,WIFI,蓝牙
回复

使用道具 举报

5

主题

18

帖子

0

精华

初级会员

Rank: 2

积分
92
金钱
92
注册时间
2016-1-8
在线时间
16 小时
 楼主| 发表于 2017-5-3 18:17:12 | 显示全部楼层
aozima 发表于 2017-5-3 18:02
>>但在测试过程中测试很长时间之后就会出现卡死的情况,jlink无法调试
说明低功耗生效了。

THX!!!
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则



关闭

原子哥极力推荐上一条 /2 下一条

正点原子公众号

QQ|手机版|OpenEdv-开源电子网 ( 粤ICP备12000418号-1 )

GMT+8, 2025-8-21 19:22

Powered by OpenEdv-开源电子网

© 2001-2030 OpenEdv-开源电子网

快速回复 返回顶部 返回列表