Hi All,
We are using Micron Serial NOR MT25QL256ABA (32MB)flash and not able to use 'flexspi_nor_flash_page_program' API to program beyond 16MB. Upto 16MB all good.
Now I have enabled 4 byte addressing mode to test this. My relevant LUT entries are :
/* Enter 4 byte addressing mode */
[4 * NOR_CMD_LUT_SEQ_IDX_ENTER_4BYTE_ADDR_MODE] =
FLEXSPI_LUT_SEQ(kFLEXSPI_Command_SDR, kFLEXSPI_1PAD, 0xB7, kFLEXSPI_Command_STOP, kFLEXSPI_1PAD, 0),
/* Page Program - quad mode */
[4 * NOR_CMD_LUT_SEQ_IDX_PAGEPROGRAM_QUAD] =
FLEXSPI_LUT_SEQ(kFLEXSPI_Command_SDR, kFLEXSPI_1PAD, 0x34, kFLEXSPI_Command_RADDR_SDR, kFLEXSPI_1PAD, 0x20),
[4 * NOR_CMD_LUT_SEQ_IDX_PAGEPROGRAM_QUAD + 1] =
FLEXSPI_LUT_SEQ(kFLEXSPI_Command_WRITE_SDR, kFLEXSPI_4PAD, 0x04, kFLEXSPI_Command_STOP, kFLEXSPI_1PAD, 0),
I have called enter 4 byte addressing mode API before the write.
I can see that it writes some data to the flash (when I dump it using BLHost), but it is not the data I have written.
I would like to know whether I am missing something here.
Thank you in advance.
Note 1: I am modifying the NXP SDK example 'flexspi_nor_polling_transfer' project
Note2 : I am able to program beyond 16MB if I use BLHost and MCUXpresso
iMXRT1170
Hi @lucas_cao ,
Thank you for your response. Do you mean referring 'evkmimxrt1170_flexspi_nor_polling_transfer_cm7'. I was using that already , but by default they use 3 byte addressing.
Hi @jingpan ,
My apologies. I was working on some other issues and was not able to look at this. I am back to this now.
I am able to access up to 24MB now (But last 8MB still not accessible) . I am using 'evkmimxrt1170_flexspi_nor_polling_transfer_cm7' based project. My issue was I was not erasing with a 4 byte addressing (4-BYTE SECTOR ERASE) . Now Up to 24 MB, I can erase, write and read.
It is very strange that even after using 4 byte addressing page program commands (34h), it is not able to access full 32MB. Did you hear about such an issue earlier?
Regards,
Jimmy
Hi @jimmyam ,
4-BYTE QUAD INPUT FAST PROGRAM(34) needn't enable 4-byte address mode. It seems the LUT command is fine. You're able to program beyond 16MB if I use BLHost and MCUXpresso. If the data is correct, you can export the flash configure structure from chip. You can refer to this post.
https://community.nxp.com/t5/i-MX-RT-Knowledge-Base/i-MX-RT-FLEXSPI-booting-guide/ta-p/1669262
Regards,
jing