AnsweredAssumed Answered

FlexSPI NAND FLASH - Set Page for Read

Question asked by variable_andrew on Sep 4, 2019
Latest reply on Sep 18, 2019 by Kerry Zhou

How is it possible to provide the i.MX device (I'm on an RT1015) a way to set the current NAND FLASH page?

 

The root of my problem is that it appears to be necessary to set the NAND read page before reading the buffer.

 

 

The current sequence I have programmed into the FLSHA1CR2 is: 

.ARDSeqIndex = NAND_CMD_LUT_SEQ_IDX_READ_FROM_CACHE,
.ARDSeqNumber = 1,

where that LUT index goes to:

    [4 * NAND_CMD_LUT_SEQ_IDX_READ_FROM_CACHE] = FLEXSPI_LUT_SEQ(kFLEXSPI_Command_SDR, kFLEXSPI_1PAD, 0x0B, kFLEXSPI_Command_DUMMY_SDR, kFLEXSPI_1PAD, 3),
    [4 * NAND_CMD_LUT_SEQ_IDX_READ_FROM_CACHE + 1] = FLEXSPI_LUT_SEQ(kFLEXSPI_Command_CADDR_SDR, kFLEXSPI_1PAD, 13, kFLEXSPI_Command_DUMMY_SDR, kFLEXSPI_1PAD, 8),
    [4 * NAND_CMD_LUT_SEQ_IDX_READ_FROM_CACHE + 2] = FLEXSPI_LUT_SEQ(kFLEXSPI_Command_READ_SDR, kFLEXSPI_1PAD, 0x80, kFLEXSPI_Command_STOP, kFLEXSPI_1PAD, 0),

 

ie - for programming the AHB system with the ReadSequence - the sequence provided only reads the current NAND FLASH Buffer (without updating it if you want to read a different page). 

 

If I do an ERASE on some given page (testing on page 0 address 0), and then do a read using the AHB (ie - a memcpy from 0x60000000) w/o explicitly setting the current NAND page to 0, I don't get 0xFF's back. 

 

If I manually set the read page and then read - I get the expected data back. 

 

I need to somehow create a sequence that will set the NAND page, wait until set page finishes, and then read the NAND buffer. 


I can do that via my own API read commands, but how do I tell the ARM AHB system how to do this? (my testing has shown set page takes about 100 us - checked by polling the NAND status register. 

 

Heads up to Kerry Zhou - this was the actual erase issue I was having - unrelated to the other thread about frequency / voltage / etc.

Outcomes