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 sd卡启动uboot,程序跑飞

Other Parts Discussed in Thread: AM3352

在使用am3352 sd卡引导uboot(使用的是v2016.01版本)的时候,有时候会出现程序跑飞的情况,有时候正常。经过反复测试,发现有如下的规律:

(1): 上电之前插入装有MLO和u-boot.img镜像的SD卡,此时程序跑飞。最后打印如下:

U-Boot 2016.01-g489ff5b-dirty (Dec 05 2016 - 15:04:34 +0800)
                                                            
AM335X-GP rev 2.1
       Watchdog enabled
I2C:   ready           
DRAM:  128 MiB
NAND:  128 MiB
MMC:   OMAP SD/MMC: 0
reg_base: 47401000, wrp->revision: 0

查看uboot的代码,发现跑飞的地方是 board.c, 182行。

arch_misc_init -> musb_register -> musb_init_controller -> musb_platform_init -> dsps_musb_init -> dsps_musb_init ->

    /* Returns zero if e.g. not clocked */
    printf("reg_base: %p, wrp->revision: %d\n", reg_base, wrp->revision);
    rev = dsps_readl(reg_base, wrp->revision);

其中printf是我自己添加的打印信息。

(2) 在选择sd卡启动模式, 打开电源,此时am3352会一直打印C字符。在出现C字符之后插入sd卡,此时能够正常启动uboot。如下:

CCCCCCCC
U-Boot SPL 2011.09 (Dec 14 2015 - 08:18:34)
Texas Instruments Revision detection unimplemented
OMAP SD/MMC: 0
reading u-boot.img
reading u-boot.img


U-Boot 2016.01-g489ff5b-dirty (Dec 05 2016 - 15:04:34 +0800)
                                                            
AM335X-GP rev 2.1
       Watchdog enabled
I2C:   ready           
DRAM:  128 MiB
NAND:  128 MiB
MMC:   OMAP SD/MMC: 0
reg_base: 47401000, wrp->revision: 0
reg_base: 47401800, wrp->revision: 0
Net:   cpsw                   

=>

不知程序跑飞的具体原因,还请各位指导。