2019-02-22 06:52 AM
I'm using an STM32F765 and a toshiba NAND chip via FMC. I want to use the hardware ECC, but the ECCR register is always empty. My fmc init looks like this:
/** Perform the NAND1 memory initialization sequence
*/
hnand1.Instance = FMC_NAND_DEVICE;
/* hnand1.Init */
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_256BYTE;
hnand1.Init.TCLRSetupTime = 2;
hnand1.Init.TARSetupTime = 2;
I do the following in a loop:
HAL_NAND_ECC_Enable(&hnand1);
write 256 bytes
HAL_NAND_GetECC
HAL_NAND_ECC_Disable(&hnand1);
This results in the ECCR register always being 0. The ECC computation is enabled in cube. I'm using bank 3 which should be supported. What to do?
2019-02-22 07:39 AM
Hello,
You can try to use this example in the firmware package STM32Cube_FW_F7 under :
This example shows how to configure the FMC controller to access the NOR memory.
Best Regards,
Mohamed Aymen.
2019-02-22 07:45 AM
Hi,
I have no problems with using the NAND flash. Reading and writing is both working. My only problem is the hardware ECC which seems to not be doing anything.
2019-02-22 07:57 AM
This seems like an answer to a different question.
Need examples of ECC syndrome generation and/or checking for NAND devices.
2019-02-22 08:03 AM
Back in the day I think there where SPL NAND examples for the F2 and F4 series parts, however as I recall it used obsolete algorithms for different architectures, and at a time where the NAND parts themselves could auto generate the required syndrome bytes as part of the write process, ie you wrote the sectors, and then wrote the computed ECC from buffers. Worked well if you have integrity at a bus level.
2019-02-24 10:40 PM
How is this supposed to help me? I'm looking for someone who has used the hardware ECC from the FMC to maybe show me an example or point me to the right direction.
2020-01-26 01:49 PM
I have the same problem on my side.
Reading and writing works but cannot use hardware ECC.
I'm testing using the Open407 board.
2020-01-26 02:27 PM
And what NAND device is that using? Does the sector format and ECC byte scheme match that supported by the F4 generator?
Given the lack you useful responses from ST, you might want to file an "Online Support Request" ticket, or find a local FAE (support engineer) with specific NAND usage experience.
I seem to recall the SPL or EVAL series examples having some NAND support, but these would have been for antiquated NAND devices. The actual correction would need to be done in software.
2020-01-26 02:33 PM
Might have been some licensable materials related to this, not sure it was "open" software
https://www.st.com/en/evaluation-tools/steval-ccm007v2.html
2020-01-26 10:51 PM
The NAND device is K9F1G08U0E.