Project

General

Profile

MityARM - ECC: uncorrectable

Added by Angelos Spanos over 8 years ago

Hi,

I have a MityARM card.

I try to flash the NAND memory according to the guidelines that are given for the MitySOM, here. My write sequence is the following:

nand erase.chip                                                                                                     

setenv mmc_index 0
setenv mlo_file_name MLO
setenv u_boot_img_file_name u-boot.img
setenv kernel_file_name openwrt-omap-uImage
setenv fs_file_name ubi.img
setenv dtb_file_name am335x-mitysom.dtb

setenv kloadaddr 0x80007fc0
setenv mlo_size 0xeaec
setenv u_boot_img_size 0x714F0
setenv kernel_size 0x221758
setenv fs_size 0xA00000
setenv dtb_size 0x7d31

setenv spl_partition_size     0x020000
setenv u_boot_partition_size  0x200000
setenv kernel_partition_size  0x500000
setenv fs_partition_size      0xF00000
setenv dtb_partition_size     0x080000

setenv spl_partition_address          0x00000000
setenv spl_backup_1_partition_address 0x00020000
setenv spl_backup_2_partition_address 0x00040000
setenv spl_backup_3_partition_address 0x00060000
setenv u_boot_partition_address       0x00080000
setenv kernel_partition_address       0x00280000
setenv fs_partition_address           0x00740000
setenv dtb_partition_address          0x0FF80000

setenv dtb_ram_adress 0x80F80000
setenv bootargs 'console=ttyO0,115200n8 root=/ rw ubi.mtd=7,4096 noinitrd rootfstype=ubifs rootwait=1 ip=none
setenv bootcmd  'nandecc hw 1; nand read.i ${dtb_ram_adress} ${dtb_partition_address} ${dtb_size}; nand read.i ${kloadaddr} ${kernel_partition_address} ${kernel_partition_size}; bootm ${kloadaddr} - ${dtb_ram_adress}'
saveenv

# Flash MLO to NAND
mw.b ${kloadaddr} ff ${spl_partition_size}
fatload mmc ${mmc_index} ${kloadaddr} ${mlo_file_name}
nand write.i ${kloadaddr} ${spl_partition_address} ${mlo_size}
nand write.i ${kloadaddr} ${spl_backup_1_partition_address} ${mlo_size}
nand write.i ${kloadaddr} ${spl_backup_2_partition_address} ${mlo_size}
nand write.i ${kloadaddr} ${spl_backup_3_partition_address} ${mlo_size}

# Flash U-boot to NAND
mw.b ${kloadaddr} ff ${u_boot_partition_size}
fatload mmc ${mmc_index} ${kloadaddr} ${u_boot_img_file_name}
nand write.i ${kloadaddr} ${u_boot_partition_address} ${u_boot_img_size}

# Flash Kernel to NAND
mw.b ${kloadaddr} ff ${kernel_partition_size}
fatload mmc ${mmc_index} ${kloadaddr} ${kernel_file_name}
nand write.i ${kloadaddr} ${kernel_partition_address} ${kernel_size}

# Flash Filesystem to NAND
mw.b ${kloadaddr} 0xFF ${fs_partition_size}
ext2load mmc ${mmc_index}:2 ${kloadaddr} ${fs_file_name}
nand write.i ${kloadaddr} ${fs_partition_address} ${fs_size}

# Flash Device Tree Binary to NAND
mw.b ${kloadaddr} ff 0x80000 
fatload mmc ${mmc_index} ${kloadaddr} ${dtb_file_name}
nand write.i ${kloadaddr} ${dtb_partition_address} ${dtb_size}
reset

However during read, the following errros appear:

nand read.i ${dtb_ram_adress} ${dtb_partition_address} ${dtb_size}
NAND read: device 0 offset 0xff80000, size 0x7d31
ECC: uncorrectable.
ECC: uncorrectable.
ECC: uncorrectable.
...
ECC: uncorrectable.
NAND read from offset ff80000 failed -74
 0 bytes read: ERROR

My questions are the folloowing:

  1. Is MityARM still supported?
  2. Is my write sequence correct?
  3. Can you spot why the ECC errors occur based on the pre-described write-read sequence?

Replies (4)

RE: MityARM - ECC: uncorrectable - Added by Jonathan Cormier over 8 years ago

Which module do you have?
What u-boot version are you using? Can you provide the bootlog from power on till you get into u-boot?

RE: MityARM - ECC: uncorrectable - Added by Angelos Spanos over 8 years ago

The bootlog is this:

U-Boot SPL 2013.10-ged374e1 (Jul 15 2015 - 10:17:27)
MitySOM335x profile 1 - Model No: 3352-HX-X27-RC Serial No: 14008177
Critical Link: Error u-boot compiled for large page nand support. Nand may not function correctly.
Configuring for 256 MB DDR3 @ 400MHz
Critical Link AM335X Dev Kit -- NAND Page size = 4096k booting from dev 8
reading u-boot.img
reading u-boot.img

U-Boot 2013.10-ged374e1 (Jul 15 2015 - 10:17:27)

AM335X-GP rev 2
I2C:   ready
DRAM:  256 MiB
WARNING: Caches not enabled
Critical Link: Error u-boot compiled for large page nand support. Nand may not function correctly.
NAND:  Using 4k bch16 layout

The tag writes:

14008177
3352-HX-X27-RC
80-000597RC-2

RE: MityARM - ECC: uncorrectable - Added by Jonathan Cormier over 8 years ago

I tried to be as explicit as possible but the following error "Critical Link: Error u-boot compiled for large page nand support. Nand may not function correctly." indicates that the u-boot your using is configured for the 512MB nand bch16 ECC. You need a u-boot built for the 256MB nand.

If you would like a prebuilt u-boot check here on how to download and flash the correct image: https://support.criticallink.com/redmine/projects/armc8-platforms/wiki/Creating_an_SD_Card#TI-SDK-Release

To build it yourself and to get the latest code see here: https://support.criticallink.com/redmine/projects/armc8-platforms/wiki/Das_U-Boot_Port#Building-u-Boot

RE: MityARM - ECC: uncorrectable - Added by Angelos Spanos over 8 years ago

Thanks. This has fixed this problem.

    (1-4/4)
    Go to top
    Add picture from clipboard (Maximum size: 1 GB)