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.

EVM not booting in SPI mode after programming NAND flash

Other Parts Discussed in Thread: TCI6638K2K

Hi,

I am using the latest TCIEVMK2X Rev2.0 board. The default factory programmed SPI flash based u-boot was working fine. I programmed my compiled u-boot to the Nand flash on the board. After programming, I couldnot able to boot the board from Nand flash. I am getting -

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

U-Boot 2013.01 (Nov 26 2013 - 17:44:18)

I2C: ready
DRAM: 1 GiB
NAND: 512 MiB
NAND read from offset 100000 failed -74
*** Warning - readenv() failed, using default environment

Net: TCI6638_EMAC
Warning: TCI6638_EMAC using MAC address from net device
, TCI6638_EMAC1


TCI6638_EVM POST Version 01.00.02.01
------------------------------------------
SOC Information
EFUSE MAC ID is: 08 00 28 32 98 4b
------------------------------------------

Power On Self Test
POST I2C eeprom read ... PASSED
POST EMIF NAND read ... NAND read from offset 100000 failed -74
FAILED

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

After failing to boot from Nand flash, I tried running u-boot by loading on to the RAM from CCsv5.5. The program is loading fine but every time after Resume, the board is stuck and I am getting the above message. 

Your help/suggestions appreciated.

Thanks 

kg.

  • Hi Kgirmaji Kumar,

    Please provide below information to help you.

    Please provide the part number of the EVM and DSP?

    Thanks.

  • Hi Rajasekaran,

    Thanks for repying to my post.

    I am using XTCIEVMK2X EVM from Advantech(http://www.advantech.com/Support/TI-EVM/EVMK2HX_sd2.aspx) based on Keystone 2 SOC (TCI6638K2K). The DSP used on the board is TMS320C66x. 

    Please let me know if you need any other information.

    Thanks

    girmaji.

       

  • Hi Girmaji,

    I just want to share my experience with XTCIEVMK2X 2.0 though Ti Gurus will be able to give appropriate guidance.  I also have problems with NAND flash with XTCIEVMK2X 2.0.  Please refer known issues http://wfcache.advantech.com/www/support/TI-EVM/download/EVMK2HX_Rev2_0_Known_Issues.pdf 

    EMIF and NAND Test cannot be synchronized.  You would have observed rework on NAND flash. 

    I am using the NAND flash after a small workaround in u-boot as we could not find any other issues in the hardware fix which advantech had done.  I disabled the POST and listed the bad sectors.  I prepared a custom layout and partitioned the flash excluding the bad sector. 

    Maybe, TI Gurus have some other ideas...

    Regards

    Rams

  • Hi, Girmaji,

    Try to format the NAND before you program it and see if it helps. Instruction on formatting NAND is in program_evm_userguide.pdf (located in the mcsdk_bios_#_##_##_##\tools\program_evm\ directory).

    Rex

  • Hi Rex,

    I have formatted the NAND flash on board as per the user guide. The format was successful but I COULDNOT able to load default images from the MCSDK folder(C:\ti\mcsdk_bios_3_00_02_14\tools\program_evm\binaries\evmk2h) to either NAND or NOR flash. I wanted to restore factory default images on the board using DSS script. Below is the error I get everytime -

    ##################################################################################

    C:\ti\mcsdk_bios_3_00_02_14\tools\program_evm>%DSS_SCRIPT_DIR%\dss.bat program_evm.js evmk2h format-nand
    board: evmk2h
    endian: Little
    emulation: XDS2xx emulator
    binaries: C:\ti\mcsdk_bios_3_00_02_14\tools\program_evm/binaries/evmk2h/
    ccxml: C:\Users\kgirmaji\ti\CCSTargetConfigurations\nand_testevm2.0.ccxml
    Writer:C:\ti\mcsdk_bios_3_00_02_14\tools\program_evm/binaries/evmk2h/nandwriter_evmk2h.out

    Formatting NAND device ... Initiated
    NAND Writer Utility Version 01.00.00.03

    ................................................................................................................................................................
    ................................................................................................
    Formatted 4096 nand blocks
    Formatting all nand blocks - Successful
    Formatting NAND device ...Completed

    C:\ti\mcsdk_bios_3_00_02_14\tools\program_evm>
    C:\ti\mcsdk_bios_3_00_02_14\tools\program_evm>%DSS_SCRIPT_DIR%\dss.bat program_evm.js evmk2h-le nand
    board: evmk2h
    endian: Little
    emulation: XDS2xx emulator
    binaries: C:\ti\mcsdk_bios_3_00_02_14\tools\program_evm/binaries/evmk2h/
    ccxml: C:\Users\kgirmaji\ti\CCSTargetConfigurations\nand_testevm2.0.ccxml
    Writer:C:\ti\mcsdk_bios_3_00_02_14\tools\program_evm/binaries/evmk2h/nandwriter_evmk2h.out

    NAND:C:\ti\mcsdk_bios_3_00_02_14\tools\program_evm/binaries/evmk2h/nand.bin

    Start loading nand.bin
    SEVERE: C66xx_0: Trouble Reading Memory Block at 0x80000000 on Page 0 of Length 0x4: (Error -1202 @ 0x80000000) Device core is hung. The debugger will attempt to force the device to a ready state to recover debug control. Your application's state will be corrupt. You should have limited access to memory and registers,
    but you may need to reset the device to debug further. (Emulation package 5.1.232.0)

    Terminate batch job (Y/N)? y

    C:\ti\mcsdk_bios_3_00_02_14\tools\program_evm>
    C:\ti\mcsdk_bios_3_00_02_14\tools\program_evm>%DSS_SCRIPT_DIR%\dss.bat program_evm.js evmk2h-le nor
    board: evmk2h
    endian: Little
    emulation: XDS2xx emulator
    binaries: C:\ti\mcsdk_bios_3_00_02_14\tools\program_evm/binaries/evmk2h/
    ccxml: C:\Users\kgirmaji\ti\CCSTargetConfigurations\nand_testevm2.0.ccxml
    Writer:C:\ti\mcsdk_bios_3_00_02_14\tools\program_evm/binaries/evmk2h/norwriter_e
    vmk2h.out

    NOR:C:\ti\mcsdk_bios_3_00_02_14\tools\program_evm/binaries/evmk2h/nor.bin

    Start loading nor.bin
    SEVERE: C66xx_0: Trouble Reading Memory Block at 0x80000000 on Page 0 of Length 0x4: (Error -1202 @ 0x80000000) Device core is hung. The debugger will attempt to force the device to a ready state to recover debug control. Your application's state will be corrupt. You should have limited access to memory and registers,
    but you may need to reset the device to debug further. (Emulation package 5.1.232.0)

    Terminate batch job (Y/N)? y
    C:\ti\mcsdk_bios_3_00_02_14\tools\program_evm>
    ####################################################################################

    Thanks

    Kg


  • Hi, Kg,

    That's bad. Could you set the dip switch to No Boot Mode and follow the steps in "Loading and Running U-Boot on EVM through CCS" from Exploring Chapter of the User's Guide? Once the you are in u-boot prompt, you should be able to restore the NOR and NAND using the following commands. Once it is done, reset the dip switch back and see how it goes.

    u-boot# dhcp 0x0c300000 <uboot_spi.gph>
    u-boot# sf probe
    u-boot# sf erase 0 0x60000
    u-boot# sf write 0x0c300000 0 0x<hex length of gph file from dhcp>

    NAND

    u-boot# setenv addr_file 0x82000000
    u-boot# nand erase.part ubifs
    u-boot# dhcp ${addr_file} ${tftp_root}/keystone-evm-ubifs.ubi
    u-boot# nand write ${addr_file} ubifs ${filesize}
  • Hi Rex,

    Thanks for the reply.

    Could you please send me the correct mtdparts env parameters to set. I am trying to burn the default MCSDK 'keystone-evm-boot.ubifs'of size 5456KB to NAND flash.

    Thanks

    kg

     

  • Hi Rex,

    1. I followed your steps to burn the 'keystone-evm-ubifs.ubi' image to the NAND flash. Burn was successful but      after the changing the bootmode to 0000 on the DIP switch, I couldnot get anything on the console.

    2. Similarly, I followed the procedure to burn the 'u-boot-nand.gph' image to the NAND flash as per the MCSDK user     guide. Burn was successful but again booting from NAND didnot showup anything on the console.

    Attached are the logs.

    FYI, my goal would compile u-boot, build correct u-boot image to burn on to the NAND flash and then boot from NAND flash. 

    Thanks

    kg.