cancel
Showing results for 
Search instead for 
Did you mean: 

Regarding NAND Programming with HAL Library

AGond.2
Associate III

Hello Community 

we are using MT29F256G08AUCAB NAND Flash Memory in Our Custom Board and that we Connected with FMC Signal.

Also am using HAL NAND Library to Program NAND Flash but there are Several doubts what HCLK Represent and What Value we have to Configure for these below timing and what Basis ?

 ComSpaceTiming.SetupTime = 
ComSpaceTiming.WaitSetupTime =
ComSpaceTiming.HoldSetupTime = ;
ComSpaceTiming.HiZSetupTime = ;
/* AttSpaceTiming */
AttSpaceTiming.SetupTime = ;
AttSpaceTiming.WaitSetupTime = ;
AttSpaceTiming.HoldSetupTime = ;
AttSpaceTiming.HiZSetupTime = ;

PLL Clock is 180 Mhz

Oscillator Clock 24MHz

As there was no Example for NAND Flash Device in STm32Cube. so we can't Decide what Value we have to Give.

Kindly Advised Accordingly for it.

Am Attaching NAND Flash DataSheet

Thank You

Aman Kumar Gond

 

2 REPLIES 2
Texram
Associate III

Hi,

I'm using Micron NAND Flash (32Gb) with the default settings in CubeMX. it works.

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 = 0;
hnand1.Init.TARSetupTime = 0;
/* hnand1.Config */
hnand1.Config.PageSize = 8192;
hnand1.Config.SpareAreaSize = 448;
hnand1.Config.BlockSize = 128;
hnand1.Config.BlockNbr = 4096;
hnand1.Config.PlaneNbr = 2;
hnand1.Config.PlaneSize = 4096;
hnand1.Config.ExtraCommandEnable = DISABLE;
/* ComSpaceTiming */
ComSpaceTiming.SetupTime = 252;
ComSpaceTiming.WaitSetupTime = 252;
ComSpaceTiming.HoldSetupTime = 252;
ComSpaceTiming.HiZSetupTime = 252;
/* AttSpaceTiming */
AttSpaceTiming.SetupTime = 252;
AttSpaceTiming.WaitSetupTime = 252;
AttSpaceTiming.HoldSetupTime = 252;
AttSpaceTiming.HiZSetupTime = 252;

Hello Texram

Thank You for you Suggestion 

Can i know one more thing, how much Crystal Clock you Given to Micro Controller and which STm library used in Code?

Also on which Basis you decided 252 for Setup time?

or Just used hit and Trial Method ?