CN / EN
CN / EN

提问

获得支持

您的项目私密技术问题如需获得一对一支持,请点击下方联系我们。

GR5515I0ND如何支持256Mbit外置Flash方法分享 GR551x

已解决

Ping

汇顶员工
2022-06-18 17:18

GR551X SDK中的XQSPI最大可以支持16MBytes(128Mbit) Flash访问,前8MBytes支持XIP访问,后8MBytes空间需要使用QSPI方式访问,主要原因为XIP CTRL只支持24bit直接寻址。

扩展支持32MBytes Flash访问的Patch见附件,访问地址访问超过16MBytes时,需要配置Status寄存器,该寄存器生效需要ms级别的时间(由Flash Page Program时间决定),因此>16MBytes地址访问效率会变低。Patch使用方法如下:

1.拷贝附件文件到components\libraries\hal_flash目录并加入项目工程;

2.该套接口只支持地址0x01000000以上的读、擦、写访问;低于0x01000000地址请使用以前的接口,主要API接口如下:

uint32_t hal_flash_read_expand_high_address(uint32_t addr, uint8_t *p_data, uint32_t size);

uint32_t hal_flash_write_expand_high_address(uint32_t addr, uint8_t *p_data, uint32_t size);

bool hal_flash_erase_expand_high_address(uint32_t addr, uint32_t size);

3. 附件提供的Flash操作命令可能不同的Flash型号有差异,以实际Flash规格书定义为准,注意以下几个点:

(1) 读写状态寄存器方法,例如exflash_wait_busy & exflash_wait_addr_mode用到的指令可能有差异,

例如GD25B256D,wait busy用的0x05, addr mode用0x35;

The Read Status Register (RDSR) command is for reading the Status Register. The Status Register may be read atany time, even while a Program, Erase or Write Status Register cycle is in progress. When one of these cycles is in progress,it is recommended to check the Write in Progress (WIP) bit before sending a new command to the device. It is also possibleto read the Status Register continuously. For command code “05H” / “35H” / “15H”, the SO will output Status Register bitsS7~S0 / S15-S8 / S23-S16


(2) Enable/Disable 4Byte地址的指令和流程


hal_flash_expand.7z

0收藏

0赞成

最佳答案

Ping

汇顶员工
2022-06-18 17:19

有任何问题可再本帖下直接回复~

7条评论

0赞成

0收藏

您的评论

登录后可回答问题,请 注册

我们时刻倾听您的声音
联系销售

扫描关注公众号

打开微信,使用“扫一扫”即可关注