This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

关于am3352 nan flash启动的问题

Other Parts Discussed in Thread: AM3352

Hardware: AM3352+NAND Flash(MT29F16G08ABACA)

Software:ti-sdk-am335x-evm-08.00.00.00

sysboot pins[0:15] = 0010 0000 0000 0000 0010, 设置启动顺序:uart,mmc,nand

1. 编译后使用/bin/create-sdcard.sh制作SD卡,可以正常启动.

2. reset后进入u-boot模式,使用以下命令烧写MLO和u-boot.img到nand flash.

U-boot#mmc rescan

U-boot#nand erase 0x0 0x80000

U-boot#fatload mmc 0 0x82000000 mlo

U-boot#nand write 0x82000000 0x0 0x80000

U-boot#nand erase 0x80000 0x100000

U-boot#fatload mmc 0 0x82000000 u-boot.img

U-boot#nand write 0x82000000 0x8000 0x100000

断电,拔出SD卡重新上电,串口一直输出CCCC,nand启动失败。

请问1:可以从SD卡启动的MLO,是否可以直接烧录到nand?

 根据手册,从SD卡启动的MLO可以是raw模式,也可以fat模式,查看MLO内容,发现其头部有TOC结构体,应该是raw模式。

请问2:如果要烧录到nand,MLO必须去掉头部的TOC结构体吗?如果是这样的,编译u-boot的时候如何设置呢?

U-boot#fatload mmc 0 0x82000000 u-boot.img

U-boot#md 0x82000000 600

U-Boot# md 0x82000000 600
82000000: 00000040 0000000c 00000000 00000000    @...............
82000010: 00000000 45534843 4e495454 00005347    ....CHSETTINGS..
82000020: ffffffff ffffffff ffffffff ffffffff    ................
82000030: ffffffff ffffffff ffffffff ffffffff    ................
82000040: c0c0c0c1 00000100 00000000 00000000    ................
82000050: 00000000 00000000 00000000 00000000    ................
82000060: 00000000 00000000 00000000 00000000    ................
82000070: 00000000 00000000 00000000 00000000    ................
82000080: 00000000 00000000 00000000 00000000    ................
82000090: 00000000 00000000 00000000 00000000    ................
820000a0: 00000000 00000000 00000000 00000000    ................
820000b0: 00000000 00000000 00000000 00000000    ................
820000c0: 00000000 00000000 00000000 00000000    ................
820000d0: 00000000 00000000 00000000 00000000    ................
820000e0: 00000000 00000000 00000000 00000000    ................
820000f0: 00000000 00000000 00000000 00000000    ................
82000100: 00000000 00000000 00000000 00000000    ................
82000110: 00000000 00000000 00000000 00000000    ................
82000120: 00000000 00000000 00000000 00000000    ................
82000130: 00000000 00000000 00000000 00000000    ................
82000140: 00000000 00000000 00000000 00000000    ................
82000150: 00000000 00000000 00000000 00000000    ................
82000160: 00000000 00000000 00000000 00000000    ................
82000170: 00000000 00000000 00000000 00000000    ................
82000180: 00000000 00000000 00000000 00000000    ................
82000190: 00000000 00000000 00000000 00000000    ................
820001a0: 00000000 00000000 00000000 00000000    ................
820001b0: 00000000 00000000 00000000 00000000    ................
820001c0: 00000000 00000000 00000000 00000000    ................
820001d0: 00000000 00000000 00000000 00000000    ................
820001e0: 00000000 00000000 00000000 00000000    ................
820001f0: 00000000 00000000 00000000 00000000    ................
82000200: 00011b9c 402f0400 eb000075 e10f0000    ....../@u.......
82000210: e200101f e331001a 13c0001f 13800013    ......1.........
82000220: e38000c0 e129f000 ee110f10 e3c00a02    ......).........
82000230: ee010f10 e59f0064 ee0c0f10 eb000008    ....d.........

U-Boot# mtdparts

device nand0 <nand.0>, # parts = 8
 #: name                size            offset          mask_flags
 0: SPL                 0x00080000      0x00000000      0
 1: u-boot              0x00100000      0x00080000      0
 2: u-boot-env          0x00080000      0x00180000      0
 3: dtb                 0x00080000      0x00200000      0
 4: kernel              0x00a00000      0x00280000      0
 5: rootfs              0x04000000      0x00c80000      0
 6: rootfs.backup       0x04000000      0x04c80000      0
 7: NAND.file-system    0x77380000      0x08c80000      0

active partition: nand0,0 - (SPL) 0x00080000 @ 0x00000000

defaults:
mtdids  : nand0=nand.0
mtdparts: mtdparts=nand.0:512k(SPL),1m(u-boot),512k(u-boot-env),512k(dtb),10m(ke
rnel),64m(rootfs),64m(rootfs.backup),-(NAND.file-system)

另外:根据下面这个帖子,我用的nand flash 的device ID不在支持的列表里,

https://e2echina.ti.com/question_answer/dsp_arm/sitara_arm/f/25/t/80766

但我查了nand flash的手册,其支持ONFI接口,根据335x技术手册,ROM CODE首先使用ONFI接口读取nand 信息,如果失败才会通过device ID匹配。

所以可以排除nand flash兼容性的问题。

谢谢