硬汉嵌入式论坛

 找回密码
 立即注册
查看: 348|回复: 1
收起左侧

[脱机烧录] H7-TOOL脱机烧录STM32L431各种低功耗模式测试效果(2024-04-09,已发布)

[复制链接]

1万

主题

6万

回帖

10万

积分

管理员

Rank: 9Rank: 9Rank: 9

积分
106757
QQ
发表于 2024-4-7 07:30:15 | 显示全部楼层 |阅读模式
【前言】
STM32Lxx脱机烧录之前很早就支持了,这次是测试下低功耗方式各种表现。

假期客户提出的需求,不接硬件复位引脚的测试。

28.jpg

【测试内容】


1、未设置低功耗模式,3线,4线和5线均正常,软件复位或者硬件复位,各种校验模式均正常

129.jpg


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依然可以正常下载

289.jpg

3、还有一种是通过DBGMCU寄存器,设置低功耗下继续为SWD接口提供时钟,从而SWD调试烧录接口可以继续使用。

H7-TOOL高速DAPLINK调试带看门狗的程序会出现打断点后,无法正常暂停,解决办法比较简单,在Option选项冻结看门狗即可
https://www.armbbs.cn/forum.php?mod=viewthread&tid=111266

25678.jpg




回复

使用道具 举报

1万

主题

6万

回帖

10万

积分

管理员

Rank: 9Rank: 9Rank: 9

积分
106757
QQ
 楼主| 发表于 2024-4-9 00:38:22 | 显示全部楼层
更新完毕,备份下测试例子:

STM32L431.7z (461.79 KB, 下载次数: 0)
回复

使用道具 举报

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

本版积分规则

QQ|小黑屋|Archiver|手机版|硬汉嵌入式论坛

GMT+8, 2024-5-4 19:29 , Processed in 0.155119 second(s), 28 queries .

Powered by Discuz! X3.4 Licensed

Copyright © 2001-2023, Tencent Cloud.

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