SAMA5D3 NAND issue

Discussion around products based on ARM Cortex-A5 core.

Moderator: nferre

will_intelli
Posts: 5
Joined: Mon Sep 09, 2013 7:56 am

SAMA5D3 NAND issue

Tue Jan 27, 2015 1:23 am

Hello,

I'm using a SAMA5D3 connected to a MT29F2G08 MLC NAND part on a custom board booting Linux 3.10.36. I'm storing the kernel in a separate NAND partition and am having an issue where a bit flip is occurring corrupting the partition. The bit flip isn't detected/corrected in either u-boot or Linux, I have a feeling its an issue with the way I have ECC configured, as I can read the partition back in SAM-BA and it doesn't show the bit flip. The ECC configuration in u-boot and Linux is working in some respect though, as it will pick up bit flips in other cases.

For u-boot I have selected these settings:

#define CONFIG_SYS_NAND_ONFI_DETECTION
#define CONFIG_ATMEL_NAND_HWECC
#define CONFIG_ATMEL_NAND_HW_PMECC
#define CONFIG_PMECC_CAP 4
#define CONFIG_PMECC_SECTOR_SIZE 512
#define CONFIG_CMD_NAND_TRIMFFS

In Linux I'm using these settings in the device tree:

nand-bus-width = <8>;
nand-ecc-mode = "hw";
atmel,has-pmecc;
atmel,pmecc-cap = <4>;
atmel,pmecc-sector-size = <512>;
atmel,has-nfc;
atmel,use-nfc-sram;
nand-on-flash-bbt;
status = "okay";

In SAM-BA I'm using these settings:

ECC type: PMECC
sectors per page: 4
spare size: 64
ECC bits: 4
ECC sector size: 512
ECC offset: 2

I've tried compiling in the latest atmel_nand code from the at91 Linux and u-boot repositories (here https://github.com/linux4sam/linux-at91, and here https://github.com/linux4sam/u-boot-at91) without seeing any differences.

Has anyone had any experience with this sort of issue, or know what might be causing it?

Will.
will_intelli
Posts: 5
Joined: Mon Sep 09, 2013 7:56 am

Re: SAMA5D3 NAND issue

Tue Jan 27, 2015 2:06 am

Something I've just realised, when I'm writing NAND initially using SAM-BA to load the kernel and rootfs, the ECC settings are set to the default:

ECC type: PMECC
sectors per page: 4
spare size: 64
ECC bits: 2
ECC sector size: 512
ECC offset: 2

U-boot and Linux both have 4 ECC bits configured. Could this be a cause of the issue?

Return to “SAMA5D Cortex-A5 MPU”

Who is online

Users browsing this forum: No registered users and 3 guests