STM32 解锁芯片的方法
文章目录
- Erase Full Chip 全片擦除(推荐)
- 原理
- 使用 ST-Link Utility 工具(推荐)
- 操作
- 适用场景
- 使用 Keil 的 Option Bytes 功能(推荐)
- 操作:
- 优势
Erase Full Chip 全片擦除(推荐)
- 打开 MDK Keil,打开项目
- 点击魔术棒图标(Options for Target)
- 切换到 “Debug” 选项卡
- 点击 “Settings” 按钮
- 切换到 “Flash Download” 选项卡
- 在 “Download Function” 功能栏勾选 “Erase Full Chip”
- 点击 “OK” 保存设置
- 点击 “Download” 烧录任意程序
原理
Erase Full Chip 会擦除芯片 Flash 中的全部内容,包括用于读写保护的配置信息,从而解除锁定状态,恢复正常烧录功能。
使用 ST-Link Utility 工具(推荐)
操作
- 安装 ST-Link Utility
- 连接 ST-Link 和目标板
- 打开 ST-Link Utility,点击 “Connect”
- 选择 “Target → Option Bytes”
- 将 “Read Out Protection” 设为 “Disable”,点击 “Apply”
- 断开连接,返回 Keil 正常烧录
适用场景
当 Keil 中无法正常解锁时使用
使用 Keil 的 Option Bytes 功能(推荐)
操作:
- 在 Keil 中选择 “Target → Option Bytes”
- 在 “Read Out Protection” 下拉菜单中选择 “Disable”
- 点击 “Apply” 和 “OK” 保存
- 重新烧录程序
优势
只清除保护位,不删除用户程序(仅适用于读保护)

