Showing results for 
Search instead for 
Did you mean: 

How to read the Nand Flash in memory map mode?

Senior II

Hi there,

I wrote some data to the Nand Flash which is extended by FMC.

The address of Nand Flash is 0x70000000 in STM32F429BIT6.

I can read the Nand Flash data by HAL_NAND_Read_Page_8b() correctly.

But when I access the data by memory map mode, the data is an error.

I test by this code sniped:

uint8_t rBuf[2048] = {0};
NAND_AddressTypeDef nand_addr = {.Page = 0, .Block = 0, .Plane = 0};
HAL_NAND_Read_Page_8b(&hnand1, &nand_addr, rBuf, 1);
LOG_DBG("read Nand %02x\n", rBuf[5]);
LOG_DBG("read Nand 0x70000005 = %02x\n", *(uint8_t*)0x70000005);

the result as below:

read Nand 05
read Nand 0x70000005 = FF

I config the FMC to FMC_NAND_BANK2, whose address is 0x70000000.

Why this happened?

Do I need to enable the memory map mode for the Nand Flash?

Thanks for your help!

Senior II

I try this code in my STM32H743II MCU, the result is the same.

Does the Nand Flash NOT support the memory map access mode?