flexspi driver resetting address space to start after 0x60FF_FFFF

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

flexspi driver resetting address space to start after 0x60FF_FFFF

Jump to solution
961 Views
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?

Labels (1)
0 Kudos
Reply
1 Solution
942 Views
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.

View solution in original post

0 Kudos
Reply
1 Reply
943 Views
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 Kudos
Reply