cancel
Showing results for 
Search instead for 
Did you mean: 

NAND Memory interfacing using FSMC protocol was not writing and Reading

Abin
Associate III

Hai Sir,

Here I attached the configuration which is done for NAND memory using FSMC.

static void MX_FSMC_Init(void)
{

/* USER CODE BEGIN FSMC_Init 0 */

/* USER CODE END FSMC_Init 0 */

FSMC_NAND_PCC_TimingTypeDef ComSpaceTiming = {0};
FSMC_NAND_PCC_TimingTypeDef AttSpaceTiming = {0};

/* USER CODE BEGIN FSMC_Init 1 */

/* USER CODE END FSMC_Init 1 */

/** Perform the NAND1 memory initialization sequence
*/
hnand1.Instance = FSMC_NAND_DEVICE;
/* hnand1.Init */
hnand1.Init.NandBank = FSMC_NAND_BANK2;
hnand1.Init.Waitfeature = FSMC_NAND_PCC_WAIT_FEATURE_ENABLE;
hnand1.Init.MemoryDataWidth = FSMC_NAND_PCC_MEM_BUS_WIDTH_16;
hnand1.Init.EccComputation = FSMC_NAND_ECC_DISABLE;
hnand1.Init.ECCPageSize = FSMC_NAND_ECC_PAGE_SIZE_2048BYTE;
hnand1.Init.TCLRSetupTime = 10;
hnand1.Init.TARSetupTime = 10;
/* hnand1.Config */
hnand1.Config.PageSize = 1024;
hnand1.Config.SpareAreaSize = 32;
hnand1.Config.BlockSize = 2048;
hnand1.Config.BlockNbr = 1024;
hnand1.Config.PlaneNbr =1;
hnand1.Config.PlaneSize = 1024;
hnand1.Config.ExtraCommandEnable = ENABLE;
/* ComSpaceTiming */
ComSpaceTiming.SetupTime = 2;
ComSpaceTiming.WaitSetupTime = 2;
ComSpaceTiming.HoldSetupTime = 2;
ComSpaceTiming.HiZSetupTime = 2;
/* AttSpaceTiming */
AttSpaceTiming.SetupTime = 2;
AttSpaceTiming.WaitSetupTime = 2;
AttSpaceTiming.HoldSetupTime = 2;
AttSpaceTiming.HiZSetupTime = 2;

if (HAL_NAND_Init(&hnand1, &ComSpaceTiming, &AttSpaceTiming) != HAL_OK)
{
Error_Handler( );
}

/* USER CODE BEGIN FSMC_Init 2 */

/* USER CODE END FSMC_Init 2 */
}

I am using NAND memory MT29F2G16ABAEAWP and controller STM32F205VET. But after Writing, I  read the data from the device. But getting null data.Could you please help me to solve this issue.

0 REPLIES 0