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.

8148 NAND uboot 烧写完成1st uboot但没运行起来



板子bootmode[0:4]设置为11001,16bit_nand,所以bootmode[12]设置为1,在CCS下运行nand-flash-writer.out,擦除之后写入u-boot.min.nand,编译之前ddr寄存器都已经修改好了。烧写过程也没有错误,但是重启上电uart0并没有打印。后来在processors.wiki.ti.com/.../TI81XX_PSP_UBOOT_User_Guide

  • When using memory boot (NAND/SPI) a header needs to be attached to the U-Boot binary indicating the the load address and the size of the image. SPI boot also requires endian conversion before flashing the image.

似乎往nand烧写要加偏移吗?但是偏移要加多大呢?

下面是CCS运行nand烧写信息

[CortexA8] Welcome to CCS Nand Flash Utility

 

 

Choose your operation

Enter 1 ---> To Flash an Image

Enter 2 ---> To ERASE the whole NAND

Enter 3 ---> To EXIT

1

Enter image file path

D:\work\u-boot.min.nand

Enter offset (in hex):

0

Choose the ECC scheme from given options :

Enter 1 ---> BCH 8 bit

Enter 2 ---> HAM  

Enter 3 ---> T0 EXIT

Please enter ECC scheme type :

1

Starting NETRA NAND writer

 

The NAND Flash is ONFI compatible

 

 

----------------------

  NAND FLASH DETAILS

----------------------

 Device ID : 0xca

 Manufacture ID : 0x2c

 Page Size : 2048 Bytes

 Spare Size : 64 Bytes

 Pages_Per_Block : 64

 Number_of_Blocks : 2048

 Device_width : 2 Byte

 DeviceSize : 256 MB

 

 Setting the ECC scheme

  Set the BCH 8 bit ECC scheme  .... done

Preparing to Flash image ....

Opening image ... done.

Erasing Required Blocks [start = 0, count = 1]...Done

Flashing image ...

Number of blocks needed for header and data: 0x1

Attempting to start write in block number 0x0.

Writing image data to Block 0 Page0x0

Writing image data to Block 0 Page0x1

Writing image data to Block 0 Page0x2

Writing image data to Block 0 Page0x3

Writing image data to Block 0 Page0x4

Writing image data to Block 0 Page0x5

Writing image data to Block 0 Page0x6

Writing image data to Block 0 Page0x7

Writing image data to Block 0 Page0x8

Writing image data to Block 0 Page0x9

Writing image data to Block 0 Page0xa

Writing image data to Block 0 Page0xb

Writing image data to Block 0 Page0xc

Writing image data to Block 0 Page0xd

Writing image data to Block 0 Page0xe

Writing image data to Block 0 Page0xf

Writing image data to Block 0 Page0x10

Writing image data to Block 0 Page0x11

Writing image data to Block 0 Page0x12

Writing image data to Block 0 Page0x13

Writing image data to Block 0 Page0x14

Writing image data to Block 0 Page0x15

Writing image data to Block 0 Page0x16

Writing image data to Block 0 Page0x17

Writing image data to Block 0 Page0x18

Writing image data to Block 0 Page0x19

Writing image data to Block 0 Page0x1a

Writing image data to Block 0 Page0x1b

Writing image data to Block 0 Page0x1c

Writing image data to Block 0 Page0x1d

Writing image data to Block 0 Page0x1e

Writing image data to Block 0 Page0x1f

Writing image data to Block 0 Page0x20

Writing image data to Block 0 Page0x21

Writing image data to Block 0 Page0x22

Writing image data to Block 0 Page0x23

Writing image data to Block 0 Page0x24

Writing image data to Block 0 Page0x25

Writing image data to Block 0 Page0x26

Writing image data to Block 0 Page0x27

Writing image data to Block 0 Page0x28

Writing image data to Block 0 Page0x29

Writing image data to Block 0 Page0x2a

Writing image data to Block 0 Page0x2b

Writing image data to Block 0 Page0x2c

Writing image data to Block 0 Page0x2d

Application is successfully flashed

 

 

NAND flashing successful!

  • Chi,

    uboot min编译的时候如果选择是nand,会加上这个header,用户是不需要加的。

    你使用串口启动,uboot min可正常起来么?

  • 之前我尝试串口也没启动起来,因为在XMODE 1K下传到百分之2就停了

  • Chi Xiaoyan,

    请先等待CCC打印完毕后再通过XMODEM点击下载uboot min,然后复位芯片,看看能否全部下载到芯片上?

  • 如图,打印完CCC之后复位会卡在这

  • Chi Xiaoyan,

    我建议你检查一下芯片的上电复位时序。

  • ddr我之前在CCS下运行了测试程序,通过了,我在http://processors.wiki.ti.com/index.php/TI814x-DDR3-Init-U-Boot下修改了下面的数据

    /* TI814X DDR3 PHY CFG parameters <emif0 : emif 1> */
    #define DDR3_PHY_RD_DQS_CS0_DEFINE ((emif == 0) ? 0x37 : 0x39)
    #define DDR3_PHY_WR_DQS_CS0_DEFINE ((emif == 0) ? 0x3f : 0x3f)
    #define DDR3_PHY_RD_DQS_GATE_CS0_DEFINE ((emif == 0) ? 0xa8 : 0xa7)
    #define DDR3_PHY_WR_DATA_CS0_DEFINE ((emif == 0) ? 0x79 : 0x77)

    /* TI814X DDR3 EMIF CFG Registers values 400MHz */
    #define DDR3_EMIF_READ_LATENCY 0x00170209
    #define DDR3_EMIF_TIM1 0x0AAAE50B
    #define DDR3_EMIF_TIM2 0x20437FDA
    #define DDR3_EMIF_TIM3 0x507F83FF
    #define DDR3_EMIF_REF_CTRL 0x00000C30
    #define DDR3_EMIF_SDRAM_CONFIG 0x61C11A32

    其中DDR3_EMIF_READ_LATENCY我没有找到对应的,我是用gel中DDR3_EMIF_DDRPHYCR_DEFINE的值,填进去的

    uboot文件的ddr_defs_ti814x.h有DDR3_EMIF_READ_LATENCY这个定义,而下面没有它的定义

  • xiaoyan Chi 说:
    /* TI814X DDR3 PHY CFG parameters <emif0 : emif 1> */
    #define DDR3_PHY_RD_DQS_CS0_DEFINE ((emif == 0) ? 0x37 : 0x39)
    #define DDR3_PHY_WR_DQS_CS0_DEFINE ((emif == 0) ? 0x3f : 0x3f)
    #define DDR3_PHY_RD_DQS_GATE_CS0_DEFINE ((emif == 0) ? 0xa8 : 0xa7)
    #define DDR3_PHY_WR_DATA_CS0_DEFINE ((emif == 0) ? 0x79 : 0x77)

    不同byte的值应该是不同的。

    xiaoyan Chi 说:
    其中DDR3_EMIF_READ_LATENCY我没有找到对应的,我是用gel中DDR3_EMIF_DDRPHYCR_DEFINE的值,填进去的

    就是这样。

  • 我要按照这个样子改吗?
    /* TI814X DDR3 PHY CFG parameters   <emif0 : emif 1> */
    #define DDR3_PHY_RD_DQS_CS0_BYTE0              ((emif == 0) ? 0x38 : 0x3A)
    #define DDR3_PHY_RD_DQS_CS0_BYTE1              ((emif == 0) ? 0x37 : 0x36)
    #define DDR3_PHY_RD_DQS_CS0_BYTE2              ((emif == 0) ? 0x32 : 0x37)
    #define DDR3_PHY_RD_DQS_CS0_BYTE3              ((emif == 0) ? 0x31 : 0x33)
    
    #define DDR3_PHY_WR_DQS_CS0_BYTE0              ((emif == 0) ? 0x43 : 0x49)
    #define DDR3_PHY_WR_DQS_CS0_BYTE1              ((emif == 0) ? 0x44 : 0x4E)
    #define DDR3_PHY_WR_DQS_CS0_BYTE2              ((emif == 0) ? 0x53 : 0x54)
    #define DDR3_PHY_WR_DQS_CS0_BYTE3              ((emif == 0) ? 0x50 : 0x50)
    
    #define DDR3_PHY_RD_DQS_GATE_CS0_BYTE0         ((emif == 0) ? 0xE4 : 0xD3)
    #define DDR3_PHY_RD_DQS_GATE_CS0_BYTE1         ((emif == 0) ? 0x111 : 0xF7)
    #define DDR3_PHY_RD_DQS_GATE_CS0_BYTE2         ((emif == 0) ? 0x112 : 0x109)
    #define DDR3_PHY_RD_DQS_GATE_CS0_BYTE3         ((emif == 0) ? 0x13D : 0x135)
    
    #define DDR3_PHY_WR_DATA_CS0_BYTE0             ((emif == 0) ? 0x85 : 0x8A)
    #define DDR3_PHY_WR_DATA_CS0_BYTE1             ((emif == 0) ? 0x83 : 0x80)
    #define DDR3_PHY_WR_DATA_CS0_BYTE2             ((emif == 0) ? 0x85 : 0x7F)
    #define DDR3_PHY_WR_DATA_CS0_BYTE3             ((emif == 0) ? 0x7F : 0x85)
  • Chi Xiaoyan,

    类似。这些值应该是SW leveling得到的。

  • Chris Meng

    运行了CCS的程序之后,

    *********************************************************
    Byte level Slave Ratio Search Program Values
    *********************************************************
    BYTE3 BYTE2 BYTE1 BYTE0
    *********************************************************
    Read DQS MAX 69 69 6c 6b
    Read DQS MIN 5 9 a 0
    Read DQS OPT 37 39 3b 35
    *********************************************************
    Read DQS GATE MAX 14a 14b 140 143
    Read DQS GATE MIN 11 11 0 0
    Read DQS GATE OPT ad ae a0 a1
    *********************************************************
    Write DQS MAX 8a 8c 7d 7f
    Write DQS MIN 0 0 0 0
    Write DQS OPT 45 46 3e 3f
    *********************************************************
    Write DATA MAX b3 ac af b0
    Write DATA MIN 47 47 4a 46
    Write DATA OPT 7d 79 7c 7b
    *********************************************************

    ===== END OF TEST =====

    我的改动如下

    #define DDR3_PHY_RD_DQS_CS0_BYTE0 ((emif == 0) ? 0x39 : 0x35)
    #define DDR3_PHY_RD_DQS_CS0_BYTE1 ((emif == 0) ? 0x37 : 0x3b)
    #define DDR3_PHY_RD_DQS_CS0_BYTE2 ((emif == 0) ? 0x38 : 0x39)
    #define DDR3_PHY_RD_DQS_CS0_BYTE3 ((emif == 0) ? 0x36 : 0x37)

    #define DDR3_PHY_WR_DQS_CS0_BYTE0 ((emif == 0) ? 0x3f : 0x3f)
    #define DDR3_PHY_WR_DQS_CS0_BYTE1 ((emif == 0) ? 0x40 : 0x3e)
    #define DDR3_PHY_WR_DQS_CS0_BYTE2 ((emif == 0) ? 0x43 : 0x46)
    #define DDR3_PHY_WR_DQS_CS0_BYTE3 ((emif == 0) ? 0x46 : 0x45)

    #define DDR3_PHY_RD_DQS_GATE_CS0_BYTE0 ((emif == 0) ? 0x9f : 0xa1)
    #define DDR3_PHY_RD_DQS_GATE_CS0_BYTE1 ((emif == 0) ? 0xa2 : 0xa0)
    #define DDR3_PHY_RD_DQS_GATE_CS0_BYTE2 ((emif == 0) ? 0xb0 : 0xae)
    #define DDR3_PHY_RD_DQS_GATE_CS0_BYTE3 ((emif == 0) ? 0xab : 0xad)

    #define DDR3_PHY_WR_DATA_CS0_BYTE0 ((emif == 0) ? 0x7e : 0x7b)
    #define DDR3_PHY_WR_DATA_CS0_BYTE1 ((emif == 0) ? 0x7f : 0x7c)
    #define DDR3_PHY_WR_DATA_CS0_BYTE2 ((emif == 0) ? 0x80 : 0x79)
    #define DDR3_PHY_WR_DATA_CS0_BYTE3 ((emif == 0) ? 0x7d : 0x7d)

    在编译uboot时出错了,错误提示

    #define DDR3_PHY_RD_DQS_CS0_DEFINE 
    #define DDR3_PHY_WR_DQS_CS0_DEFINE 
    #define DDR3_PHY_RD_DQS_GATE_CS0_DEFINE
    #define DDR3_PHY_WR_DATA_CS0_DEFINE 

    之前的这几个宏没有了,也就是我的uboot源码没有用到BYTE0.1.2....

    如果这样的话是我ezsdk问题吗,版本是ezsdk_dm814x-evm_5_05_02_00_setuplinux

  • Chi Xiaoyan,

    请更新git上最新的uboot:

    http://arago-project.org/git/projects/?p=u-boot-omap3.git;a=shortlog;h=refs/heads/ti81xx-master

  • 更新uboot之后按照wiki的步骤弄一遍就ok了,非常感谢

  • 请问一下 朋友可以发一份 您下的新版uboot么。。。我不会用git。。。也出现了 类似的问题 想要一份新版的uboot 试一下。。要是方便发邮箱bsyw8984@qq.com 万分感谢

  • 我的uboot是下载ti的ezsdk里面得到的,http://software-dl.ti.com/dsps/dsps_public_sw/ezsdk/latest/index_FDS.html

    你可以去下一个安装之后就有uboot的源码了,但是你要根据你的板子更改里面ddr的SWleveling,即使我把我的uboot给你你也跑不起来的,因为物理硬件的布线长度不一样。

  • 好的 谢谢 我看一下