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.

C6678 bootloader problem-cannot boot from NAND

Hi ,all

    I am testing bootloader of my PCB which has two c6678 PG1.0. My PCB has the same EEPROM and NAND flash  asTMDXEVM6678LE and the CORE_CLK is 100MHz , DDR_CLK is 66.667Mhz

I wrote a UART test program and I'm trying using IBL  boot from NAND flash. The bootmode of the DSPs is controlled by FPGA.

The steps are as follows:

1.Set the bootmode as Noboot

in the fpga I wrote verilog as follows:

assign DSP_GPIO_00 = 1 ; //Little Endian
assign DSP_GPIO_01 = 0 ; //BootMode00 1
assign DSP_GPIO_02 = 0 ; //BootMode01
assign DSP_GPIO_03 = 0 ; //BootMode02 
assign DSP_GPIO_04 = 0 ; //BootMode03
assign DSP_GPIO_05 = 0 ; //BootMode04 
assign DSP_GPIO_06 = 0 ; //BootMode05
assign DSP_GPIO_07 = 0 ; //BootMode06
assign DSP_GPIO_08 = 0 ; //BootMode07
assign DSP_GPIO_09 = 0 ; //BootMode08
assign DSP_GPIO_10 = 0 ; //BootMode09
assign DSP_GPIO_11 = 0 ; //BootMode10 
assign DSP_GPIO_12 = 0 ; //BootMode11
assign DSP_GPIO_13 = 0 ; //BootMode12
assign DSP_GPIO_14 = 0 ;
assign DSP_GPIO_15 = 0 ;

I just assign the pin to the 1 or 0 to set the bootmode and use little endian.

2.use eeprom and nand writer program from" mcsdk_2_01_02_06\tools\writer"

follow the steps in the documents:

1st:write the i2crom_0x51_c6678_le.bin to EEPROM 

2nd:modify language in i2cConfig.gel :

in section hotmenu setConfig_c6678_main():

modify ibl.bootModes[1].u.nandBoot.bootFormat        = ibl_BOOT_FORMAT_BBLOB;

as ibl.bootModes[1].u.nandBoot.bootFormat        = ibl_BOOT_FORMAT_ELF;

and write parameter table to the EEPROM.

3rd:use NAND writer write my test program to the NAND flash.

the logs are as follow:

[C66xx_0] EEPROM Writer Utility Version 01.00.00.05

Writing 52072 bytes from DSP memory address 0x0c000000 to EEPROM bus address 0x0051 starting from device address 0x0000 ...
Reading 52072 bytes from EEPROM bus address 0x0051 to DSP memory address 0x0c010000 starting from device address 0x0000 ...
Verifying data read ...
EEPROM programming completed successfully

&

Run the GEL for for the device to be configured, press return to program the I2C

I2c table write complete

&

[C66xx_0] NAND Writer Utility Version 01.00.00.01

Flashing block 1 (0 bytes of 219356)
Flashing block 2 (16384 bytes of 219356)
Flashing block 3 (32768 bytes of 219356)
Flashing block 4 (49152 bytes of 219356)
Flashing block 5 (65536 bytes of 219356)
Flashing block 6 (81920 bytes of 219356)
Flashing block 7 (98304 bytes of 219356)
Flashing block 8 (114688 bytes of 219356)
Flashing block 9 (131072 bytes of 219356)
Flashing block 10 (147456 bytes of 219356)
Flashing block 11 (163840 bytes of 219356)
Flashing block 12 (180224 bytes of 219356)
Flashing block 13 (196608 bytes of 219356)
Flashing block 14 (212992 bytes of 219356)
Reading and verifying block 1 (0 bytes of 219356)
Reading and verifying block 2 (16384 bytes of 219356)
Reading and verifying block 3 (32768 bytes of 219356)
Reading and verifying block 4 (49152 bytes of 219356)
Reading and verifying block 5 (65536 bytes of 219356)
Reading and verifying block 6 (81920 bytes of 219356)
Reading and verifying block 7 (98304 bytes of 219356)
Reading and verifying block 8 (114688 bytes of 219356)
Reading and verifying block 9 (131072 bytes of 219356)
Reading and verifying block 10 (147456 bytes of 219356)
Reading and verifying block 11 (163840 bytes of 219356)
Reading and verifying block 12 (180224 bytes of 219356)
Reading and verifying block 13 (196608 bytes of 219356)
Reading and verifying block 14 (212992 bytes of 219356)

NAND programming completed successfully

It displays all are OK

But when I set the bootmode as I2C mode:

assign DSP_GPIO_00 = 1 ; //Little Endian
assign DSP_GPIO_01 = 1 ; //BootMode00 1
assign DSP_GPIO_02 = 0 ; //BootMode01
assign DSP_GPIO_03 = 1 ; //BootMode02 1
assign DSP_GPIO_04 = 0 ; //BootMode03
assign DSP_GPIO_05 = 1 ; //BootMode04 1
assign DSP_GPIO_06 = 0 ; //BootMode05
assign DSP_GPIO_07 = 0 ; //BootMode06
assign DSP_GPIO_08 = 0 ; //BootMode07
assign DSP_GPIO_09 = 0 ; //BootMode08
assign DSP_GPIO_10 = 0 ; //BootMode09
assign DSP_GPIO_11 = 1 ; //BootMode10 1
assign DSP_GPIO_12 = 0 ; //BootMode11
assign DSP_GPIO_13 = 0 ; //BootMode12
assign DSP_GPIO_14 = 0 ;
assign DSP_GPIO_15 = 0 ;

DSP does not boot from NAND properly and I enter DEBUG mode see the Device Status Register(0x02620020) is always 0x00000021

and the BOOTCOMPLETE(0x0262013C) reg is 0x00000001

but the same operation on my TMDXEVM6678LE board  all OK, and the Device Status Register is 0x0000082B, this is right.

then I use Oscilloscope see the SDA pin of the eeprom when power on , and from comparison I found the data from the EEPROM of my board is less than that from the TMDXEVM6678LE.

I dont know where the problem is ???

please help me !

Thanks very much!!!

  • Eric,

    Are you using the IBL as such or you ported it to your board. The IBL has some platform specific initialization, like PLL, DDR cfg, etc.,

    Thanks,

    Arun.

  • Hi, ArunMani

    Thank you for your reply,

    I using the IBL file"i2crom_0x51_c6678_le.bin" from "C:\ti\mcsdk_2_01_02_06\tools\boot_loader\ibl\src\make\bin"folder and I didn't change it ,

    I modified two sections int the  i2cConfig.gel file:

    1. ibl.bootModes[1].u.nandBoot.bootFormat        = ibl_BOOT_FORMAT_ELF;

    2.

    ibl.ddrConfig.uEmif.emif4p0.sdRamConfig = 0x63062A32; /*0x63C452B2;*/
    ibl.ddrConfig.uEmif.emif4p0.sdRamConfig2 = 0;
    ibl.ddrConfig.uEmif.emif4p0.sdRamRefreshCtl = 0x00001450; /*0x000030D4;*/
    ibl.ddrConfig.uEmif.emif4p0.sdRamTiming1 = 0x1113783C; /*0x0AAAE51B;*/
    ibl.ddrConfig.uEmif.emif4p0.sdRamTiming2 = 0x30717FE3; /*0x2A2F7FDA;*/
    ibl.ddrConfig.uEmif.emif4p0.sdRamTiming3 = 0x559F86AF; /*0x057F82B8;*/
    ibl.ddrConfig.uEmif.emif4p0.lpDdrNvmTiming = 0;
    ibl.ddrConfig.uEmif.emif4p0.powerManageCtl = 0;
    ibl.ddrConfig.uEmif.emif4p0.iODFTTestLogic = 0;
    ibl.ddrConfig.uEmif.emif4p0.performCountCfg = 0;
    ibl.ddrConfig.uEmif.emif4p0.performCountMstRegSel = 0;
    ibl.ddrConfig.uEmif.emif4p0.readIdleCtl = 0;
    ibl.ddrConfig.uEmif.emif4p0.sysVbusmIntEnSet = 0;
    ibl.ddrConfig.uEmif.emif4p0.sdRamOutImpdedCalCfg = 0x70073214; /*0*/
    ibl.ddrConfig.uEmif.emif4p0.tempAlterCfg = 0;
    ibl.ddrConfig.uEmif.emif4p0.ddrPhyCtl1 = 0x0010010F; /*0x0010010d;*/
    ibl.ddrConfig.uEmif.emif4p0.ddrPhyCtl2 = 0;
    ibl.ddrConfig.uEmif.emif4p0.priClassSvceMap = 0;
    ibl.ddrConfig.uEmif.emif4p0.mstId2ClsSvce1Map = 0;
    ibl.ddrConfig.uEmif.emif4p0.mstId2ClsSvce2Map = 0;
    ibl.ddrConfig.uEmif.emif4p0.eccCtl = 0;
    ibl.ddrConfig.uEmif.emif4p0.eccRange1 = 0;
    ibl.ddrConfig.uEmif.emif4p0.eccRange2 = 0;
    ibl.ddrConfig.uEmif.emif4p0.rdWrtExcThresh = 0;

    the parameters of  ddr initialization part were copied from the "evmc6678l.gel" file in folder "C:\ti\mcsdk_2_01_02_06\tools\program_evm\gel"

    because the evmc6678l.gel can run on my board and initialize the PLL and DDR all right.

    1.if  the IBL "i2crom_0x51_c6678_le.bin" need to be modified , and how to modify it ?

    2. I use the i2c master mode, what does the Parameter Index (bootmode[7:3])mean? In the C6678 data manual, it only describes 

    Parameter Index Identifies the index of the  configuration table initially read from the I2C EEPROM This value can range from 0 to 31.

    Thanks!

  • Hi Eric,

    You need to go through the IBL userguide to understand the portions that are EVM dependant. If you have any specific issues, please send an update to this post, I will try to help you

    THnaks,

    Arun.

  • Hi, ArunMani,

        where can I download the IBL user guide , is that 

    Bootloader for KeyStone Devices User's Guide

    if not ,can you give me a link? 

    Thank you!

  • Hello,

    Although this post is over a year old but as it was never closed so I’m posting here. I have come across the same issue when trying to boot a c6678 custom board (based on the evm). It boots fine in no boot mode or I2C slave mode for POST, however in I2C master mode for NAND, it does not. The DEVSTAT register shows 00010021 instead of 0001082B expected from boot-mode GPIO pins status. Using a modified ibl.bin (for reduced DDR speed) for eeprom , which works well on the evm.  Linux kernel from linux-c6x.org (nand.bin) is flashed into the nand device (NAND512R3A2SZA6E same as evm but later version) also works fine on evm. Mcsdk version: mcsdk_2_01_02_06.

    My question is what can cause the device not to register the boot mode pins status into the DevStat register in I2C Master boot mode?

    Many thanks,

    Tahir