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.

AM4379: Problems about Loading Program into Nand Flash by Uniflash Tools

Part Number: AM4379
Other Parts Discussed in Thread: UNIFLASH

Hi,

 

I am struggling with loading program into NAND flash. The board I used for my experiments are EVMAM437x and idkAM437x. The software are starterware, CCS9.3 and Uniflash 8.4.0/5.2.0/4.6.0.

 

I follow the guide on the website 3.1. Board Support — Processor SDK RTOS Documentation:  I did the following steps:

When I use the following command to load the program into the RAM through JTAG, everything works well as expected.

dslite.bat --mode load --config=C:\Users\a1771\workspace_v9\DMTimer_test_1ms_modified_CAN\DMTimer.ccxml -f C:\Users\a1771\workspace_v9\DMTimer_test_1ms_modified_CAN\Debug\DMTimer_test_1ms_modified_CAN.out -n 1

 

However, when I try to load the program into NAND Flash or SPI Flash, Uniflash did not run as expected.

Here were the results when I load program into NAND Flash through Uart.:

Command:(Try to erase flash)

Dslite.bat --mode processors -c COM3 -d 0 -e 0x1000 -o 0

Result: (Error: Transmit of header failed or stuck at transferring header files)

Command:(Try to load file to NAND flash offset is 0x80000)

dslite.bat --mode processors -c COM3 -f I:\bootloader_summary\SPI_Flash_test\Baremetal_Led_bin\Led.bin -d 0 -i 0 -o 0x80000

Result: (Error: Sometimes shows 'file transfer complete' but no further print, sometimes stuck at Downloading Flash Programmer)

Command:(Try to load file to NAND flash offset is 0x0)

dslite.bat --mode processors -c COM3 -f I:\bootloader_summary\SPI_Flash_test\Baremetal_Led_bin\app.bin -d 0 -i 0 -o 0x0

Result: (Error: It always stuck at Downloading Flash Programmer or Transferring the Image to Flash Programmer)

Can anyone help me with downloading binary files into NAND flash?

Thanks for your help in advance.

Best Regards,

Yuzhi

  • Hello Yuzhi,

    We can no longer support starterware or TI-RTOS based SW development for AM437x. Please refer to this announcement and find resources there. Specifically, the following FAQ may be helpful to you: 

    Regards,

    Jianzhong

  • Hello Jianzhong,

    Thanks for your reply.

    I think my problem is all about how to download program to NAND flash. It is not related to TI-RTOS. 

    I have tried the mothed in the link. Unfortunately, it still stuck at Downloading Flash Programmer as shown in the following picture.

    I would be appreciated if TI engineers could help me solve this problem. However, t's fine if TI no longer support loading program to AM437x by Uniflash. 

    Best wished,

    Yuzhi

  • Hello Jianzhong,

    I can erase flash successfully now.

    But there are still some issues when transferring the image to Flash Programmer. It always shows flash programming failed.

  • Hello,

    Were you able to download the flash programmer according to software-dl.ti.com/.../index_board.html

  • Hello Jianzhong,

    Thanks for reply, I can load the flash programmer successfully through JTAG lane. By using the following command:

    dslite.bat --mode load --config=C:\Users\a1771\workspace_v9\DMTimer_test_1ms_modified_CAN\DMTimer.ccxml -f C:\ti\uniflash_8.4.0\processors\FlashWriter\idkAM437x\uart_idkAM437x_flash_programmer.out -n 1

    Result:

    C:\ti\uniflash_8.4.0>dslite.bat --mode load --config=C:\Users\a1771\workspace_v9\DMTimer_test_1ms_modified_CAN\DMTimer.ccxml -f C:\ti\uniflash_8.4.0\processors\FlashWriter\idkAM437x\uart_idkAM437x_flash_programmer.out -n 1
    Executing the following command:
    > "C:\ti\uniflash_8.4.0\deskdb\content\TICloudAgent\win\ccs_base\DebugServer\bin\DSLite" load --config=C:\Users\a1771\workspace_v9\DMTimer_test_1ms_modified_CAN\DMTimer.ccxml -f C:\ti\uniflash_8.4.0\processors\FlashWriter\idkAM437x\uart_idkAM437x_flash_programmer.out -n 1
    
    For more details and examples, please refer to the UniFlash Quick Start guide.
    
    DSLite version 12.5.0.3154
    Configuring Debugger (may take a few minutes on first launch)...
            Initializing Register Database...
            Initializing: IcePick_D_0
            Executing Startup Scripts: IcePick_D_0
            Initializing: CS_DAP_M3
            Executing Startup Scripts: CS_DAP_M3
            Initializing: M3_wakeupSS_1
            Executing Startup Scripts: M3_wakeupSS_1
            Initializing: CS_DAP_DebugSS
            Executing Startup Scripts: CS_DAP_DebugSS
            Initializing: CortexA9
            Executing Startup Scripts: CortexA9
            Initializing: CSSTM_0
            Executing Startup Scripts: CSSTM_0
            Initializing: CSETB_0
            Executing Startup Scripts: CSETB_0
            Initializing: PRU_ICSS1_PRU0
            Executing Startup Scripts: PRU_ICSS1_PRU0
            Initializing: PRU_ICSS1_PRU1
            Executing Startup Scripts: PRU_ICSS1_PRU1
            Initializing: PRU_ICSS0_PRU0
            Executing Startup Scripts: PRU_ICSS0_PRU0
            Initializing: PRU_ICSS0_PRU1
            Executing Startup Scripts: PRU_ICSS0_PRU1
    Connecting...
    GEL: CortexA9: Output: ****  AM437x GP EVM Initialization is in progress ..........
    GEL: CortexA9: Output:  **** Device Type: GP
    GEL: CortexA9: GEL Output: System input clock is 24MHz
    GEL: CortexA9: GEL Output: ****  AM43xx OPP100 with CLKIN=24MHz is in progress .........
    GEL: CortexA9: GEL Output:       ****  Going to Bypass...
    GEL: CortexA9: GEL Output:       ****  Bypassed, changing values...
    GEL: CortexA9: Output:   ****  Locking PLL
    GEL: CortexA9: GEL Output:       ****  MPU PLL locked
    GEL: CortexA9: GEL Output:       ****  Core Bypassed
    GEL: CortexA9: GEL Output:       ****  Now locking Core...
    GEL: CortexA9: GEL Output:       ****  Core locked
    GEL: CortexA9: GEL Output:       ****  Calculated PER SD Divisor=4
    GEL: CortexA9: GEL Output:       ****  PER DPLL Bypassed
    GEL: CortexA9: GEL Output:       ****  PER DPLL Locked
    GEL: CortexA9: GEL Output:       ****  Calculated EXTDEV SD Divisor=4
    GEL: CortexA9: GEL Output:       ****  EXTDEV DPLL Bypassed
    GEL: CortexA9: GEL Output:       ****  EXTDEV DPLL Locked
    GEL: CortexA9: GEL Output:       ****  DISP PLL Config is in progress ..........
    GEL: CortexA9: GEL Output:       ****  DISP PLL Locked
    GEL: CortexA9: GEL Output:       ****  DDR DPLL Bypassed
    GEL: CortexA9: GEL Output:       ****  DDR DPLL Locked
    GEL: CortexA9: GEL Output: ****  Setting DDR3  = 400MHz
    GEL: CortexA9: GEL Output: ****  AM43xx OPP100 configuration is done .........
    GEL: CortexA9: GEL Output: Enabling VTT Regulator...
    GEL: CortexA9: GEL Output: VTT Regulator Enabled
    GEL: CortexA9: GEL Output: Starting DDR3 configuration...
    GEL: CortexA9: Output: EMIF PRCM is in progress .......
    GEL: CortexA9: Output: EMIF PRCM Done
    GEL: CortexA9: GEL Output: EMIF CLK enabled...
    GEL: CortexA9: GEL Output: Waiting for VTP Ready .......
    GEL: CortexA9: GEL Output: VTP is Ready!
    GEL: CortexA9: GEL Output: VTP controller enabled
    GEL: CortexA9: GEL Output: Checking if DLL is ready...
    GEL: CortexA9: GEL Output: DLL is ready
    GEL: CortexA9: GEL Output: Configuring DDR IOs and Control Module registers...
    GEL: CortexA9: GEL Output: Configuration of Control Module registers complete
    GEL: CortexA9: GEL Output: Setting up DDR3 H/W leveling configuration...
    GEL: CortexA9: GEL Output: Starting EMIF controller configuration...
    GEL: CortexA9: GEL Output:
    
    DDR3 Hardware leveling complete... Outputing all the leveling results !!!
    
    GEL: CortexA9: GEL Output: PHY_STATUS_12=0x070000BC
    GEL: CortexA9: GEL Output: PHY_STATUS_13=0x070000B9
    GEL: CortexA9: GEL Output: PHY_STATUS_14=0x070000CF
    GEL: CortexA9: GEL Output: PHY_STATUS_15=0x070000CF
    GEL Expression: OnTargetConnect()
    GEL: CortexA9: GEL Output: PHY_STATUS_16=0x00000000
    GEL: CortexA9: GEL Output: PHY_STATUS_7 =0x00000049
    GEL: CortexA9: GEL Output: PHY_STATUS_8 =0x00000048
    GEL: CortexA9: GEL Output: PHY_STATUS_9 =0x00000046
    GEL: CortexA9: GEL Output: PHY_STATUS_10=0x00000044
    GEL: CortexA9: GEL Output: PHY_STATUS_11=0x00000000
    GEL: CortexA9: GEL Output: PHY_STATUS_17=0x002E00CC
    GEL: CortexA9: GEL Output: PHY_STATUS_18=0x03C300D3
    GEL: CortexA9: GEL Output: PHY_STATUS_19=0x01F500EA
    GEL: CortexA9: GEL Output: PHY_STATUS_20=0x030C00DF
    GEL: CortexA9: GEL Output: PHY_STATUS_21=0x00000000
    GEL: CortexA9: GEL Output: PHY_STATUS_22=0x03EE008C
    GEL: CortexA9: GEL Output: PHY_STATUS_23=0x03830093
    GEL: CortexA9: GEL Output: PHY_STATUS_24=0x01B500AA
    GEL: CortexA9: GEL Output: PHY_STATUS_25=0x02CC009F
    GEL: CortexA9: GEL Output: PHY_STATUS_26=0x00000000
    GEL: CortexA9: GEL Output:
    
    DDR3 configuration is complete!!!
    
    GEL: CortexA9: GEL Output: Turning on EDMA...
    GEL: CortexA9: GEL Output: EDMA is turned on...
    GEL: CortexA9: Output: ****  AM437x GP EVM Initialization is Done ******************
    
    
    Loading Program: C:\ti\uniflash_8.4.0\processors\FlashWriter\idkAM437x\uart_idkAM437x_flash_programmer.out
            Preparing ...
            PT_LOAD[0]: 0 of 50404 at 0x40300000
            PT_LOAD[0]: 32752 of 50404 at 0x40300000: 64%
            Finished: 64%
            Setting PC to entry point.: 64%
    Running...
    Success

    Then I try to erase flash,

    Command:

    Dslite.bat --mode processors -c COM8 -d 2 -e 0x20000000 -o 0

    Result:

    Finally, I tried to transfer the image. However, it showed flash program failed.

    Command:

    dslite.bat --mode processors -c COM8 -f C:\Users\a1771\Desktop\bootloader_summary\SPI_Flash_test\Baremetal_Led_bin\Led_ti.bin -d 2 -o 0x80000

    Result:

    Best Wishes,

    Yuzhi

  • Hi Yuzhi,

    Your Led_ti.bin might have some problem. Please take a look at this FAQ as a reference. That FAQ was written for AM335x, but the principle applies to AM437x as well.

    Regards,

    Jianzhong

  • Hi Jianzhong,

    Thanks for your reply.

    If I rename Led_ti.bin to app I can transfer the image into spi-flash and boot from spi-flash.  I also tried to transfer other examples provided by TI, however I cannot transfer the images by Uniflash to flash as well.

    I cannot flash the boot image as well.

    Here is the code I use:

    dslite.bat --mode processors -c COM8 -f C:\ti\pdk_am437x_1_0_17\packages\ti\starterware\binary\bootloader\bin\am43xx-evm\gcc\bootloader_boot_qspi_a9host_release_ti.bin -d 2 -o 0x0

    Following are commands and files I used to flash spi-flash. I have attached files. 

    • Command: load flash programmer.

    dslite.bat --mode load --config=C:\Users\a1771\workspace_v9\DMTimer_test_1ms_modified_CAN\DMTimer.ccxml -f C:\ti\uniflash_8.4.0\processors\FlashWriter\idkAM437x\uart_idkAM437x_flash_programmer.out -n 1

    File used: DMTimer.ccxml, uart_idkAM437x_flash_programmer.out

    • Command: transfer boot image.

    dslite.bat --mode processors -c COM8 -f C:\ti\pdk_am437x_1_0_17\packages\ti\starterware\binary\bootloader\bin\am43xx-evm\gcc\bootloader_boot_qspi_a9host_release_ti.bin -d 2 -o 0x0

    File used: bootloader_boot_qspi_a9host_release_ti.bin, 

    • Command: transfer led image.
      dslite.bat --mode processors -c COM8 -f C:\Users\a1771\Desktop\bootloader_summary\SPI_Flash_test\Baremetal_Led_bin\Led_ti.bin -d 2 -o 0x80000

    File used: Led_ti.bin

    spi-flash_document.rar

    Best wishes,

    Yuzhi

  • Hello Yuzhi,

    Since TI has stopped supporting PDK (bare-metal or TI-RTOS) based SW development for AM437x, I'm not able to provide further help here. Please refer to this announcement and find resources there.

    Best regards,

    Jianzhong