SAMA5D3 Corrupted NAND ECC data when using NFC SRAM

Discussion around products based on ARM Cortex-A5 core.

Moderator: nferre

Heribert Eilmsteiner
Posts: 1
Joined: Thu Feb 04, 2016 1:57 pm

SAMA5D3 Corrupted NAND ECC data when using NFC SRAM

Thu Feb 04, 2016 2:12 pm

We developed an Board using an SAMA5D35 with a AMD/Spansion S34ML16G2 NAND Flash memory.

Using the default configuration in the device-Tree (LINUX 3.18.14 -mainline) most boards report MANY times (30-80 until reaching the login prompt, further messages when reading data from nand)

[ 273.670000] atmel_nand 60000000.nand: PMECC: Too many errors [ 273.670000]
UBI warning: ubi_io_read: error -74 (ECC error) while reading xx bytes from PEB yyyy:zzzz, read only xx bytes, retry

But only once for every read, so the reported retry seems to go ok.

After removing the SRAM Address of the NFC configuration in the Devicetree (as mentioned in the Atmel_nand.txt in the Kernel Source) these errors have gone.

(btw. The UBI Filesystem was created from Linux, not through sam-ba, so the suggestion with using TRIMMFFS as found on various places Cannot be applied.)

We double-checked the NAND-Header in the Flash, the AT91bootstrap/UBOOT/Linux-Configuration of ECC-Bits / Blocksize and Position on ECC in OOB, all seems to match.

The HW-development told me the Flashes are slower than the Micron Flashes used on the Evaluation Boards, But the default timing should be ok.
http://www.spansion.com/Support/Datashe ... ML16G2.pdf

Logging the OOB/ECC-data of the affected reads showed invalid data in the buffer read ( zeros, also text as "program" or "printf"), (I doubt that this data is also contained in the OOB, as a NAND-erase (in sam-ba) was used to clear the Flash + ECC)

My questions:

Does someone know of this error (and a possible solution)
- can I (reconfigure) nfc access timings in the device tree
- the application note: "NAND Flash Support in SAMA5D3 Microcontrollers" mentions using two modes "HSMC" or "NFC+SRAM". How can I switch between these modes
- what are the consequences of switching off SRAM
- Any Ideas for further tests on our side ?

Thanks
Heribert
blue_z
Location: USA
Posts: 1785
Joined: Thu Apr 19, 2007 10:15 pm

Re: SAMA5D3 Corrupted NAND ECC data when using NFC SRAM

Mon Feb 08, 2016 9:11 pm

Heribert Eilmsteiner wrote:The UBI Filesystem was created from Linux, not through sam-ba, ...
That's a rather vague description of what you've done.
Heribert Eilmsteiner wrote:... so the suggestion with using TRIMMFFS as found on various places Cannot be applied.
You could try installing a proper ubinized image of the rootfs with U-Boot.

What is the U-Boot command for programming the UBI rootfs?
How to program the rootfs into nandflash through U-Boot for SAM9x5 or SAMA5D3x?

You'll probably have add the following:

Code: Select all

#define    CONFIG_CMD_NAND_TRIMFFS
to your board's configuration file and rebuild U-Boot, since this `nand write.trimffs` command variant is not enabled by default.

Regards

Return to “SAMA5D Cortex-A5 MPU”

Who is online

Users browsing this forum: No registered users and 4 guests