cancel
Showing results for 
Search instead for 
Did you mean: 

Where is the right way to undersand NAND HAL configuring

cqdx
Associate
Posted on April 11, 2016 at 11:00

Hello, dears!

I'm stucking around interfacing the NAND to STM32F746

The nand is (NAND512W3A2CN6)

Thus we have 512 bytes (0.5 kBytes) per Page

but in the HAL drivers description we can see:

PageSize  - NAND memory page (without spare area) size measured in K. bytes

And more:

SpareAreaSize - NAND memory spare area size measured in K. bytes

but accordind the datasheet we have only 16 bytes (0.016 ?? of kilobyte?)

Where am I wrong? My configuration is below.

  hnand1.Init.NandBank = FMC_NAND_BANK3;

 

  hnand1.Init.Waitfeature = FMC_NAND_WAIT_FEATURE_ENABLE;

 

  hnand1.Init.MemoryDataWidth = FMC_NAND_MEM_BUS_WIDTH_8;

 

  hnand1.Init.EccComputation = FMC_NAND_ECC_ENABLE;

 

  hnand1.Init.ECCPageSize = FMC_NAND_ECC_PAGE_SIZE_512BYTE;

 

  hnand1.Init.TCLRSetupTime = 8;

 

  hnand1.Init.TARSetupTime = 8;

 

  /* hnand1.Info */

 

  hnand1.Info.PageSize = 512;

 

  hnand1.Info.SpareAreaSize = 16;

 

  hnand1.Info.BlockSize = 32;

 

  hnand1.Info.BlockNbr = 4096;

 

  hnand1.Info.ZoneSize = 4096;

 

  /* ComSpaceTiming */

 

  ComSpaceTiming.SetupTime = 8;

 

  ComSpaceTiming.WaitSetupTime = 12;

 

  ComSpaceTiming.HoldSetupTime = 8;

 

  ComSpaceTiming.HiZSetupTime = 8;

 

  /* AttSpaceTiming */

 

  AttSpaceTiming.SetupTime = 8;

 

  AttSpaceTiming.WaitSetupTime = 12;

 

  AttSpaceTiming.HoldSetupTime = 8;

 

  AttSpaceTiming.HiZSetupTime = 8;

The Vendor ID and Product ID is reading proper by  0x20 and 0x76 following twice

HAL_NAND_Read_ID(&hnand1, &NAND_ID);

Thanks!

#stm32f7-nand
0 REPLIES 0