When configuring the HAL_NAND driver you need to set the PageSize and SpareAreaSizes values;
/* hnand1.Config */
hnand1.Config.PageSize = 2048;
hnand1.Config.SpareAreaSize = 64;
hnand1.Config.BlockSize = 64;
hnand1.Config.BlockNbr = 1024;
hnand1.Config.PlaneNbr = 1;
hnand1.Config.PlaneSize = 1024;
hnand1.Config.ExtraCommandEnable = ENABLE;
HAL_NAND_Init(&hnand1, &ComSpaceTiming, &AttSpaceTiming);
Does anyone know if these values are for the whole device or just the page?
The typedefs in the HAL NAND driver suggest these are large values as they are in kB, so suggesting these are for the whole device. For my device the SpareAreaSize for a page is 64 bytes, so you can't set 0.0625 !!