We're having trouble configuring the right PMECC header value for our NAND flash component and I found your name in the AT91 Wiki page on PMECC configuration for SAM-BA/AT91bootstrap so I hope U guys can help me.
Our board design is based on the KSZ9477 board (EVB-KSZ9477) which in turn seems to be based on the sama5d3 Xplained board. We had to change the NAND flash though, as the availability of the used component is limited.
For the new NAND flash we stuck to the same Micron NAND flash family but chose a component that has the internal PMECC enabled by default. (could be changed if really needed)
But since both sam-ba as at91 seem to disable the internal PMECC that should not be a problem.
I followed the guide on the Wiki page with the following parameters:
So a PMECC header value of 0xC1304805 seems to be the correct value.
Code: Select all
(1) usePmecc 1 (2) nbSectorPerPage 2 (4 sectors/page) (3) spareSize 0x80 (128 according to the datasheet) (4) eccBitReq 2 (8 bit error correcting) (5) sectorSize 0 (512 sector size) (6) eccOffset 0x04C (128 - (4 sectors * 13 bytes) = 76) (7) reserved (8) key 0xC c 1 3 0 4 8 0 5 1 1 0 0 0 0 0 1 0 0 1 1 0 0 0 0 0 1 0 0 1 0 0 0 0 0 0 0 0 1 0 1
However, if I use this value in sam-ba, and perform the sendbootfile command, the board falls back into ROMBoot after a power cycle.
So I take it the configured PMECC value is incorrect, and ROMBoot get read errors. (too bad there is no feedback/output on that)
I also tried to ignore the PMECC, and only use the internal On-DIE PMECC, and in that case I get a booting at91bootstrap(also configured for on-die PMECC), can also boot into uboot, but uboot refuses to read anything else because of too many PMECC read errors. (even though it is supposed to use the ONFI detection for PMECC configuration)
(Does anyone know if I can dump the OOB through sam-ba by any chance?)
So I hope you can help me out and point out my error or at least set me off in the right direction to solve this issue.
Best regards and thanks in advance