【前言】
STM32Lxx脱机烧录之前很早就支持了,这次是测试下低功耗方式各种表现。
假期客户提出的需求,不接硬件复位引脚的测试。
【测试内容】
1、未设置低功耗模式,3线,4线和5线均正常,软件复位或者硬件复位,各种校验模式均正常
2、对于低功耗,接上硬件复位是一定可以烧录的,同时这个帖子也提出一种不接硬件复位的测试
H7-TOOL脱机烧录解除读写保护和各种遇到情况解决办法汇总,含SWD接口锁,低功耗和看门狗(2023-08-01)
https://www.armbbs.cn/forum.php?mod=viewthread&tid=118986
我们这里TOOL为板子供电,且不接硬件复位引脚
通过下面函数HAL_PWR_EnterSTANDBYMode()设置进入待机模式
[C] 纯文本查看 复制代码
[..]
The Standby mode offers two options:
(+) option a) all clocks off except LSI and LSE, RRS bit set (keeps voltage regulator in low power mode).
SRAM and registers contents are lost except for the SRAM2 content, the RTC registers, RTC backup registers
and Standby circuitry.
(+) option b) all clocks off except LSI and LSE, RRS bit cleared (voltage regulator then disabled).
SRAM and register contents are lost except for the RTC registers, RTC backup registers
and Standby circuitry.
(++) Entry:
(+++) The Standby mode is entered thru HAL_PWR_EnterSTANDBYMode() API.
SRAM1 and register contents are lost except for registers in the Backup domain and
Standby circuitry. SRAM2 content can be preserved if the bit RRS is set in PWR_CR3 register.
To enable this feature, the user can resort to HAL_PWREx_EnableSRAM2ContentRetention() API
to set RRS bit.
(++) Exit:
(+++) WKUP pin rising edge, RTC alarm or wakeup, tamper event, time-stamp event,
external reset in NRST pin, IWDG reset.
[..] After waking up from Standby mode, program execution restarts in the same way as after a Reset.
H7-TOOL依然可以正常下载
3、还有一种是通过DBGMCU寄存器,设置低功耗下继续为SWD接口提供时钟,从而SWD调试烧录接口可以继续使用。
H7-TOOL高速DAPLINK调试带看门狗的程序会出现打断点后,无法正常暂停,解决办法比较简单,在Option选项冻结看门狗即可
https://www.armbbs.cn/forum.php?mod=viewthread&tid=111266
|