Other Parts Discussed in Thread: AM3358
Hi everyone,
I am experiencing problems with my company's custom AM3358 board with MT29F2G16ABBEAHC, 16 bit NAND device (2048 + 64)
Currently, i am using XDS100v2 device, Code Composer Studio 5.4.0 and AM335X_StarterWare_02_00_01_01 source code.
Problem appears when i try to write SPL/MLO image (address 0x0, BHC-8), using NAND Flasing Tool, as it outputs "Verify failed. Attempting to clear page" for each writing attempt.
Tracing down function calls, i found out it fails at the following location:
@AM335X_ecc.c
DEVICE_NAND_ECC_BCH_correct
ELM_CheckErrors, call returns E_FAIL
Some important facts regarding this issue:
- I have carefully read many TI forum topics related to NAND booting problems
- GPMC_WAIT0 is connected to NAND signal R/B, GPMC_CS0 is used
- NAND Flash Tool can sucessfully detect ONFI support and read NAND info parameters
- Analyzing source code for NAND Flashing Tool i have noticed it uses 8-bit mode by default, and i had to put a few changes for 16 bit GPMC init.
- Added AD[8]..AD[15] pin mux initialization @AM335X_device.c, struct PAD_Conf_NANDFlash[] ( also AM335X_device.h )
{ GPMC_AD8_OFF, MODE(0) | RXACTIVE | PULLUP_EN},
{ GPMC_AD9_OFF, MODE(0) | RXACTIVE | PULLUP_EN},
{ GPMC_AD10_OFF, MODE(0) | RXACTIVE | PULLUP_EN},
{ GPMC_AD11_OFF, MODE(0) | RXACTIVE | PULLUP_EN},
{ GPMC_AD12_OFF, MODE(0) | RXACTIVE | PULLUP_EN},
{ GPMC_AD13_OFF, MODE(0) | RXACTIVE | PULLUP_EN},
{ GPMC_AD14_OFF, MODE(0) | RXACTIVE | PULLUP_EN},
{ GPMC_AD15_OFF, MODE(0) | RXACTIVE | PULLUP_EN},
b. changed default GPMC regs init @AM335X_device.c, to set 16-bit mode for
// Rom Code Defaults.
// 0x00000810,
0x00001810, // set 16 bit mode NAND, bits 13,12 to 1h
0x001e1e00,
0x001e1e00,
0x16051807,
0x00151e1e,
0x16000f80,
0x00000048,
5. I am not an expert with NAND devices, and have not profound knowledge on ECC schemes (i suspect the problem is there)
Thank you in advance for any help or advice regarding this issue.