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.

TMDSIDK437X: Flash programming of the QSPI-Flash for the board

Part Number: TMDSIDK437X
Other Parts Discussed in Thread: UNIFLASH, AM4379

Hi everyone,

I am trying to flash my AM437x Industrial EVM through XDS100V2 USB to QSPI. 

Software and tools are used:

- CCS Ver 11.2

- uniflash_8.0.0

- Command line

Hardware:

AM437x IDK Evaluation Hardware

Below is my steps taken:

1.  Prepare Bootloader file: bootloader_boot_qspi_a9host_debug.bin

C:\ti\pdk_am437x_1_0_17\packages\ti\starterware\binary\bootloader\bin\am43xx-evm\gcc\bootloader_boot_qspi_a9host_debug.bin

2. Application image:

a. To convert from .out -> .bin
C:\ti\gcc-arm-none-eabi-7-2018-q2-update\bin>arm-none-eabi-objcopy -O binary C:\Users\minh.vo\workspace_v11\Test_Sitara_2\ethercat_slave_full_AM437x_arm\AM437x_debug\ethercat_slave_full_AM437x_arm.out C:\Users\minh.vo\workspace_v11\Test_Sitara_2\ethercat_slave_full_AM437x_arm\AM437x_debug\app.bin

b. To convert from .bin -> _ti.bin. tiimage.exe is provided as prebuilt binary in starterware/tools/ti_image.
C:\ti\pdk_am437x_1_0_17\packages\ti\starterware\tools\ti_image>tiimage.exe 0x80000000 NONE C:\Users\minh.vo\workspace_v11\Test_Sitara_2\ethercat_slave_full_AM437x_arm\AM437x_debug\app.bin C:\Users\minh.vo\workspace_v11\Test_Sitara_2\ethercat_slave_full_AM437x_arm\AM437x_debug\app_ti.bin

3. Run Flash Programmer:

c:\ti\uniflash_8.0.0>dslite.bat --mode load -c C:\Users\minh.vo\workspace_v11\Test_Sitara_2\ethercat_slave_full_AM437x_arm\targetConfigs\AM4379.ccxml -f C:\ti\uniflash_8.0.0\processors\FlashWriter\idkAM437x\uart_idkAM437x_flash_programmer.out -n 1

Executing the following command:
> "c:\ti\uniflash_8.0.0\deskdb\content\TICloudAgent\win\ccs_base\DebugServer\bin\DSLite" load -c C:\Users\minh.vo\workspace_v11\Test_Sitara_2\ethercat_slave_full_AM437x_arm\targetConfigs\AM4379.ccxml -f C:\ti\uniflash_8.0.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.0.0.2808
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 IDK 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: 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=0x070000BD
GEL: CortexA9: GEL Output: PHY_STATUS_13=0x070000BD
GEL: CortexA9: GEL Output: PHY_STATUS_14=0x070000D1
GEL: CortexA9: GEL Output: PHY_STATUS_15=0x070000D1
GEL: CortexA9: GEL Output: PHY_STATUS_16=0x00000000
GEL: CortexA9: GEL Output: PHY_STATUS_7 =0x00000048
GEL: CortexA9: GEL Output: PHY_STATUS_8 =0x00000045
GEL: CortexA9: GEL Output: PHY_STATUS_9 =0x00000045
GEL: CortexA9: GEL Output: PHY_STATUS_10=0x00000044
GEL: CortexA9: GEL Output: PHY_STATUS_11=0x00000000
GEL: CortexA9: GEL Output: PHY_STATUS_17=0x001700CB
GEL: CortexA9: GEL Output: PHY_STATUS_18=0x020100D2
GEL: CortexA9: GEL Output: PHY_STATUS_19=0x006E00E1
GEL: CortexA9: GEL Output: PHY_STATUS_20=0x01D400DD
GEL: CortexA9: GEL Output: PHY_STATUS_21=0x00000000
GEL: CortexA9: GEL Output: PHY_STATUS_22=0x03D7008B
GEL: CortexA9: GEL Output: PHY_STATUS_23=0x01C10092
GEL: CortexA9: GEL Output: PHY_STATUS_24=0x002E00A1
GEL: CortexA9: GEL Output: PHY_STATUS_25=0x0194009D
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 IDK EVM Initialization is Done ******************


Loading Program: C:\ti\uniflash_8.0.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

Notice in this step: The terminal keeps prints out character 'C'

4. Flash Bootloader file with offset of 0x0

c:\ti\uniflash_8.0.0>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_debug.bin -d 2 -o 0x0

Executing the following command:
> c:\ti\uniflash_8.0.0\processors\ProcessorSDKSerialFlash.exe -c COM8 -f C:\ti\pdk_am437x_1_0_17\packages\ti\starterware\binary\bootloader\bin\am43xx-evm\gcc\bootloader_boot_qspi_a9host_debug.bin -d 2 -o 0x0

For more details and examples, please refer to the UniFlash Quick Start guide.

The file extension is .bin

----------------------------------------------------------------------------
ProcessorSDKSerialFlash CLI Tool
Copyright (C) 2017-2022 Texas Instruments Incorporated - http://www.ti.com/
Version 1.7.0.0
----------------------------------------------------------------------------
Transferring the Image to Flash Programmer..

Transferring Header Information..
Header Transfer Complete!

Flashing Image of size 65608 bytes
Flash Programming Success!

5. Flash Application file with offset of 0x80000

c:\ti\uniflash_8.0.0>dslite.bat --mode processors -c COM8 -f C:\Users\minh.vo\workspace_v11\Test_Sitara_2\ethercat_slave_full_AM437x_arm\AM437x_debug\app_ti.bin -d 2 -o 0x80000

Executing the following command:
> c:\ti\uniflash_8.0.0\processors\ProcessorSDKSerialFlash.exe -c COM8 -f C:\Users\minh.vo\workspace_v11\Test_Sitara_2\ethercat_slave_full_AM437x_arm\AM437x_debug\app_ti.bin -d 2 -o 0x80000

For more details and examples, please refer to the UniFlash Quick Start guide.

The file extension is .bin

----------------------------------------------------------------------------
ProcessorSDKSerialFlash CLI Tool
Copyright (C) 2017-2022 Texas Instruments Incorporated - http://www.ti.com/
Version 1.7.0.0
----------------------------------------------------------------------------
Transferring the Image to Flash Programmer..

Transferring Header Information..
Header Transfer Complete!

Flashing Image of size 453556 bytes
Flash Programming Success!

6. Power cycle or software reset.

After this power cycle or software reset, the board seems not running any applications.

There are some concerns that I have:

- Did I miss any steps from above?

- Do I need to configure any pins on  AM437x Industrial EVM to boot from QPSI or it will look through a sequence to find a valid header?

Similar sources:

https://e2e.ti.com/support/processors-group/processors/f/processors-forum/900834/ccs-am4379-flashing-qspi-with-uniflash

https://e2e.ti.com/support/processors-group/processors/f/processors-forum/1052190/tmdsidk437x-flash-programming-of-the-qspi-flash-on-the-tmdsidk437x

That would be great if I can get some suggestions or hints where the issues would be.

Thank you.

Minh Vo