OpenEdv-开源电子网

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

stm32f407zgt6 无法擦除flash导致写入程序失败

[复制链接]

10

主题

27

帖子

0

精华

中级会员

Rank: 3Rank: 3

积分
270
金钱
270
注册时间
2018-8-10
在线时间
29 小时
发表于 2023-5-13 15:24:00 | 显示全部楼层 |阅读模式
10金钱

全新未使用的stm32f407zgt6芯片能够连接但是无法擦除flash
使用STM32CubeProgrammer可以连接芯片,但是不能擦除
  1. 15:21:54 : STM32CubeProgrammer API v2.12.0 | Windows-64Bits
  2.   15:21:56 : ST-LINK SN  : 390A070A2416303030303032
  3.   15:21:56 : ST-LINK FW  : V2J41S7
  4.   15:21:56 : Board       : --
  5.   15:21:56 : Voltage     : 4.69V
  6.   15:21:56 : SWD freq    : 4000 KHz
  7.   15:21:56 : Connect mode: Under Reset
  8.   15:21:56 : Reset mode  : Hardware reset
  9.   15:21:56 : Device ID   : 0x413
  10.   15:21:56 : Revision ID : Rev Y
  11.   15:21:56 : Debug in Low Power mode is not supported for this device.
  12.   15:21:56 : UPLOADING OPTION BYTES DATA ...
  13.   15:21:56 :   Bank          : 0x00
  14.   15:21:56 :   Address       : 0x40023c14
  15.   15:21:56 :   Size          : 4 Bytes
  16.   15:21:56 : UPLOADING ...
  17.   15:21:56 :   Size          : 1024 Bytes
  18.   15:21:56 :   Address       : 0x8000000
  19.   15:21:56 : Read progress:
  20.   15:21:56 : Data read successfully
  21.   15:21:56 : Time elapsed during the read operation is: 00:00:00.007
  22.   15:22:03 : MASS ERASE ...
  23.   15:22:03 : Error: Mass erase operation failed.Please verify flash protection
复制代码



STM32cubeide最新版本调试STM32F407ZGT6芯片报错
  1. STMicroelectronics ST-LINK GDB server. Version 7.3.0
  2. Copyright (c) 2023, STMicroelectronics. All rights reserved.

  3. Starting server with the following options:
  4.         Persistent Mode            : Disabled
  5.         Logging Level              : 1
  6.         Listen Port Number         : 61234
  7.         Status Refresh Delay       : 15s
  8.         Verbose Mode               : Disabled
  9.         SWD Debug                  : Enabled

  10. STM32_SystemReset(), failure reset target.
  11. Waiting for debugger connection...
  12. Debugger connected
  13. Waiting for debugger connection...
  14. Debugger connected
  15. Waiting for debugger connection...
  16.       -------------------------------------------------------------------
  17.                        STM32CubeProgrammer v2.13.0                  
  18.       -------------------------------------------------------------------



  19. Log output file:   C:\Users\John9\AppData\Local\Temp\STM32CubeProgrammer_a12424.log
  20. ST-LINK SN  : 390A070A2416303030303032
  21. ST-LINK FW  : V2J41S7
  22. Board       : --
  23. Voltage     : 3.14V
  24. SWD freq    : 4000 KHz
  25. Connect mode: Under Reset
  26. Reset mode  : Hardware reset
  27. Device ID   : 0x413
  28. Revision ID : Rev Y
  29. Device name : STM32F405xx/F407xx/F415xx/F417xx
  30. Flash size  : 1 MBytes (default)
  31. Device type : MCU
  32. Device CPU  : Cortex-M4
  33. BL Version  : 0x91



  34. Memory Programming ...
  35. Opening and parsing file: ST-LINK_GDB_server_a12424.srec
  36.   File          : ST-LINK_GDB_server_a12424.srec
  37.   Size          : 39.39 KB
  38.   Address       : 0x08000000


  39. Erasing memory corresponding to segment 0:
  40. Erasing internal memory sectors [0 2]
  41. Error: failed to erase memory


  42. Error: failed to erase memory
  43. Encountered Error when opening P:\Program\STMicroelectronics\STM32CubeIDE\STM32CubeIDE\plugins\com.st.stm32cube.ide.mcu.externaltools.cubeprogrammer.win32_2.0.600.202301161003\tools\bin\STM32_Programmer_CLI.exe
  44. Error in STM32CubeProgrammer
  45. Shutting down...
  46. Exit.
复制代码


最佳答案

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

找到原因了,就是因为VBAT这个管脚没有连接到3.3V
正点原子逻辑分析仪DL16劲爆上市
回复

使用道具 举报

10

主题

27

帖子

0

精华

中级会员

Rank: 3Rank: 3

积分
270
金钱
270
注册时间
2018-8-10
在线时间
29 小时
 楼主| 发表于 2023-5-13 15:24:01 | 显示全部楼层
找到原因了,就是因为VBAT这个管脚没有连接到3.3V
回复

使用道具 举报

11

主题

2130

帖子

0

精华

论坛元老

Rank: 8Rank: 8

积分
4724
金钱
4724
注册时间
2015-1-10
在线时间
590 小时
发表于 2023-5-15 10:16:00 | 显示全部楼层
单独用stlink擦除呢
回复

使用道具 举报

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

本版积分规则



关闭

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

正点原子公众号

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

GMT+8, 2025-2-24 14:39

Powered by OpenEdv-开源电子网

© 2001-2030 OpenEdv-开源电子网

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