flexspi driver resetting address space to start after 0x60FF_FFFF

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 
已解决

flexspi driver resetting address space to start after 0x60FF_FFFF

跳至解决方案
966 次查看
VJ2
Contributor II

Hi,

we are using our own custom board with IMXRT1062 and Macronix MX25L2564G (256Mb) flash. We used Freertos_hello_flash operation to erase and write to last sectors of flash. We did not get any error, but it was not erasing and writing to the correct sector. After investigating further, we discovered that we can successfully erase and write only half of the sectors (4095 in our case, total 8191 sectors in flash). At 4096th sector, it resets address to start i.e. when we set sector start address as 0x6100_0000, it actually does operation at 0x6000_0000. In case of last sector, instead of performing operation at 0x61FF_F0000, it executes it at 0x60FF_F0000. As per reference manual Sec 27.3.5, IPCR0 register determines Flash Access Start address. We confirmed that its loading correct address. In case of 8191th sector, it is 0x01FF_F000. I have attached code and snapshot for reference. Can someone suggest what is wrong here?

标签 (1)
0 项奖励
回复
1 解答
947 次查看
VJ2
Contributor II

I found out root cause. Flash chip has been divided into top and bottom regions of 128Mb. Extended Address register bit decides which bank to use. Default value is 0, so it is always using lower bank. I will now need to identify way to set EAR bit to 1 so that we can use upper bank.

在原帖中查看解决方案

0 项奖励
回复
1 回复
948 次查看
VJ2
Contributor II

I found out root cause. Flash chip has been divided into top and bottom regions of 128Mb. Extended Address register bit decides which bank to use. Default value is 0, so it is always using lower bank. I will now need to identify way to set EAR bit to 1 so that we can use upper bank.

0 项奖励
回复