使用外部Flash作为程序代码的IAR下载算法支持。
由于7B0没有了QSpI模块,使用OSPI模块代替。这个模块与750系列的QSPI在底层上有一些差异,现将从QSPI改写的OSPI接口FlashLoader代码分享给大家。
本代码移植自ST早期版本的QSPI纯寄存器操作,不使用HAL库。
代码运行在RAM区内,支持在线debug,初次使用可以使用FlashInit函数内屏蔽掉的测试代码进行Flash的读写测试。
使用到的几个LED用作工作指示,可根据实际使用进行调整。
使用 IAR Assembler for ARM 9.10.1.308 (9.10.1.308) 编译。输出文件STM32H7B0_QSPI_wankle.out
应用工程使用中需配置一下向量地址:
打开用户向量表选项,添加OCTSPI1
/*!< Uncomment the following line if you need to relocate the vector table
anywhere in FLASH BANK1 or AXI SRAM, else the vector table is kept at the automatic
remap of boot address selected */
#define USER_VECT_TAB_ADDRESS
#define VECT_TAB_OCTOSPI1
增加OCTSPAI1地址:
/*!< Uncomment the following line if you need to relocate your vector Table
in D1 AXI SRAM else user remap will be done in FLASH BANK1. */
/* #define VECT_TAB_SRAM */
#if de