OpenEdv-开源电子网

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

STM32F767 NUCLEO 自带的双bank实验失败,求助

[复制链接]

7

主题

105

帖子

0

精华

金牌会员

Rank: 6Rank: 6

积分
1026
金钱
1026
注册时间
2016-1-28
在线时间
134 小时
发表于 2020-8-26 15:13:41 | 显示全部楼层 |阅读模式
1金钱
最近在做STM32F767的双bank实验,可是怎么弄也不成功,哪位大佬,弄过,请帮小弟看下:
例子是F7HAL SDK包里面STM32F767 NUCLEO对应的例子:
STM32Cube_FW_F7_V1.6.0\Projects\STM32F767ZI-Nucleo\Examples\FLASH\FLASH_SwapBank
我先定义了FLASH_BANK2,然后修改了FLASH位置和大小

原来作为一个整体FLASH时,起始地址和大小是0x8000000 0x200000

编译,生成了FLASH_BANK2.hex文件。
在修改上面这两项。定义FLASH_BANK1:


编译,生成了FLASH_BANK1.hex文件。
然后打开STM32 ST-LINK Utility
菜单:Target-->Option Byte.
去掉nDBANK的选择

然后用STM32 ST-LINK Utility 先下载FLASH_BANK2.hex
在下载FLASH_BANK1.hex,
然后复位BANK1运行对应的LED1闪烁,
按下用户按键:理论上会切换到BANK2运行,LED2会闪烁
但实际效果还是LED1闪烁,重复了几次还是这样
感觉就是按照程序里面说明做的了:
Below are the steps to run this example:
1- Choose the FLASH_SwapBank_Bank2 project and generate its binary (ie: FLASH_SwapBank.bin)

2- Configure the FLASH memory at Dual Bank mode using STM32 ST-LINK Utilities (Target -> Options Bytes:
   "nDBANK" should be unchecked, "nDBOOT" should be checked).
   Then, Load FLASH_SwapBank.bin binary at the bank2 of the flash (at the address 0x08100000) using STM32
   ST-LINK Utilities(www.st.com) or any similar tool.   

@note:
- You can avoid step 1 by directly loading the binary file provided with the example
- You have to configure your preferred toolchain in order to generate the binary
   file after compiling the project.

3- Choose the FLASH_SwapBank_Bank1 project and run it, this project will be loaded
   in the bank1 of the flash: at the address 0x08000000

4- Click the BUTTON_USER button to swap between the two banks,

- If program is executing from bank1 is selected, LED1 toggles,

- If program is executing from bank2 is selected, LED2 toggles,

- If error occurs, LED3 is turn on.

也用了提供的BIN文件试了,也是不行。
不知道哪里出错,求大佬解答~

[url=]使用特权[/url]
[url=]更多操作[/url]





正点原子逻辑分析仪DL16劲爆上市
回复

使用道具 举报

530

主题

11万

帖子

34

精华

管理员

Rank: 12Rank: 12Rank: 12

积分
165475
金钱
165475
注册时间
2010-12-1
在线时间
2115 小时
发表于 2020-8-27 02:26:46 | 显示全部楼层
回复

使用道具 举报

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

本版积分规则



关闭

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

正点原子公众号

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

GMT+8, 2025-4-30 13:50

Powered by OpenEdv-开源电子网

© 2001-2030 OpenEdv-开源电子网

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