How to setup SAM-BA to use software BCH ecc correction when accessing NANDFLASH

Microchip in-system programming solution: SAM-BA

Moderators: nferre, fab

karel@ryston.cz
Posts: 8
Joined: Tue Dec 06, 2011 5:24 pm

How to setup SAM-BA to use software BCH ecc correction when accessing NANDFLASH

Mon Dec 04, 2017 4:52 pm

Hi,
I'm using board similar to AT91SAM9G20-EK. Populated NAND is K9F1G08U0E (or K9F1G08U0D on few boards).
I'm able to send/verify binary data to/from NANDFLASH using SAM-BA 2.16 using "software ecc correction" - in devicetree refered as nand-ecc-mode = "soft"; ,in Barebox refered as NAND_ECC_SOFT (nand_chip->ecc.mode == 1), in Linux refered as MTD_NAND_ECC (traditional Hamming ECC 1-bit of error correction).

When I configure NANDFLASH to use more powerfull ecc correction "soft-bch" - in devicetree refered as nand-ecc-mode = "soft_bch"; ,in Barebox refered as NAND_ECC_BCH (nand_chip->ecc.mode == 5), in Linux refered as MTD_NAND_ECC_BCH - I'm able to read/write NANDFLASH in Linux and in Barebox but unable to read/write NANDFLASH using SAM-BA 2.16. Operation ends immediately with message "unrecoverable ecc error".

What to do to provide SAM-BA with fuctionality allowing reading and writing of such NANDFLASH pages (containing data that was written using soft_bch error correction) ?
Playing with ::NANDFLASH::NandHeaderValue has no effect in my scenario.
SAM-BA is only able to read/write pages that has been written/initialised using "soft" error correction (SAM-BA, Barebox and Linux with NANDFLASH initialised to nand_chip->ecc.mode == 1).

Thanks for advice

Karel
blue_z
Location: USA
Posts: 1560
Joined: Thu Apr 19, 2007 10:15 pm

Re: How to setup SAM-BA to use software BCH ecc correction when accessing NANDFLASH

Tue Dec 05, 2017 3:18 am

karel@ryston.cz wrote:Operation ends immediately with message "unrecoverable ecc error".
Really? I can find no such text string in the SAM-BA source.

karel@ryston.cz wrote:What to do to provide SAM-BA with fuctionality allowing reading and writing of such NANDFLASH pages (containing data that was written using soft_bch error correction) ?
The software ECC In SAM-BA only supports a Hamming code, so you would have to add that BCH ECC functionality to SAM-BA yourself.
Review applets/legacy/at91lib/memories/nandflash/EccNandFlash.c in your SAM-BA directory.

Regards
karel@ryston.cz
Posts: 8
Joined: Tue Dec 06, 2011 5:24 pm

Re: How to setup SAM-BA to use software BCH ecc correction when accessing NANDFLASH

Tue Dec 05, 2017 10:53 am

blue_z wrote:
Tue Dec 05, 2017 3:18 am
karel@ryston.cz wrote:Operation ends immediately with message "unrecoverable ecc error".
Really? I can find no such text string in the SAM-BA source.

Regards
ok, literally:
-E- EccNandFlash_ReadPage: at B128.P0 Unrecoverable data
-E- SkipBlockNandFlash_ReadBlock: Cannot read page 0 of block 128.
-----------------------------------------------
1) Someone solved this already?
2) Someone willing to share with others?

Return to “SAM-BA”

Who is online

Users browsing this forum: No registered users and 1 guest