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.

CC3220SF-LAUNCHXL: Download flash firmware via serial port using Uniflash failed

Part Number: CC3220SF-LAUNCHXL
Other Parts Discussed in Thread: CC3220SF, UNIFLASH, FLASHTOOL, CC3120

Hi,

   I am trying to download flash firmware to CC3220SF-LAUNCHXL without using on-board XDS-110. By connecting the UART of CC3220SF separately to PC via a UART-to-USB dongle, The bootloader can be invoked successfully. However, there is always a ERROR : Failed to receive expected data. Log is as following :

2019/12/7 上午10:45:07] [INFO] Cortex_M4_0: CC3220SF(Bootloader)
[2019/12/7 上午10:45:07] [INFO] Cortex_M4_0: ...Start to invoke the bootloader...
[2019/12/7 上午10:45:07] [INFO] Cortex_M4_0: Trigger XDS reset
[2019/12/7 上午10:45:09] [INFO] Cortex_M4_0: Send break signal
[2019/12/7 上午10:45:10] [INFO] Cortex_M4_0: Bootloader is successfully invoked!
[2019/12/7 上午10:45:10] [INFO] Cortex_M4_0: ...Get the storage list bitmap information...
[2019/12/7 上午10:45:22] [ERROR] Cortex_M4_0: [ERROR_MESSAGE]Failed to receive expected data!
   The application image is created by Uniflash which can be download successfully if using on-board XDS-110. How to fix this error ? Thanks. 
  • Hi,

    Please try to generate *.UCF file and upload it using exe (or python script) from the Embedded Programming package.

    Jan

  • Hi Jan,

        The programming process was stuck in "get storage list" as following :

         Please help, thanks

    Martin

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

    C:\Github\FlashTool\FlashTool\bin\Debug>ImageProgramming.exe -p 6 -i yztek.ucf
    Image Programming v2.0.0
    -----------------------------
    This utility programs a binary image to a serial flash connected to CC3120/CC3220 device
    Only production devices are supported (i.e. no pre-production devices)
    The binary image needs to be prepared in advance using Uniflash utility

    Step #1 --> connect to target device
    --- please restart the device ---
    connection succeeded
    get storage list

  • Hi Martin,

    I am not sure why this failing. Few hints:

    • Please make sure that you are using right COM port.
    • How do you have connected your USB-to-UART converter to your LaunchPad? Please provide photo of your connection.
    • As first step please try to use Embedded Programming with COM port from XDS-110. After success you can move to your USB-to-UART converted.
    • Do you use USB-to-UART converter with supports 921600bd?
    • Do you have *.UCF file generated in development or production mode? In case of *.UCF is generated in development mode, please make sure that is created with proper MAC address. Best way for creating of *.UCF file is a Uniflash GUI. After connecting to LaunchPad, is MAC addressa automatically assigned.

    Jan

  • Hi Jan,

        Following is new log with verbose enabled. I found that the process can continue if I pressed the reset button whenever log show "wait for ack".

    According to the log, I think the com port communication is OK. The problem is the boot loader protocol is not match to the Imageprogramming.exe. This make the Imageprogramming.exe "wait for ack“  which bootloader will not respond.

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

    C:\Github\FlashTool\FlashTool\bin\Debug>ImageProgramming.exe -p 6 -i yztek.ucf -v
    Image Programming v2.0.0
    -----------------------------
    This utility programs a binary image to a serial flash connected to CC3120/CC3220 device
    Only production devices are supported (i.e. no pre-production devices)
    The binary image needs to be prepared in advance using Uniflash utility

    Step #1 --> connect to target device
    port opened
    wait and clear uart rx buffer
    set break signal
    --- please restart the device ---
    wait for ack
    receive ack
    connection succeeded
    get storage list
    wait for ack <= press reset
    receive ack
    receive storage list

    exit bootldr connect
    Step #2 --> Reading version info
    port opened
    wait for ack <= press reset
    receive ack
    --- error during get version
    ---Call Trace:---
    File "ImageProgramming.py", line 119, in <module>

    File "ImageProgramming.py", line 89, in main

    File "ImageProgramming.py", line 49, in BurnImage

    File "bootldr.pyc", line 503, in SwitchToNwpBootloader

    ---Error Line:---
    Traceback (most recent call last):
    File "bootldr.pyc", line 332, in GetVersion
    error: unpack requires a string argument of length 2

  • Hi Martin,

    Your wires connection (P57, P55, GND), jumper settings and SOP modes does look OK. Please make sure that you not have exchanged RX and TX lines. Also make sure that you have selected 3V3 UART level at your converter. Because CC3220 chip is not TTL tolerant.

    • Was you able to use Embedded programming via XDS-110 successfully?
    • I don't have confidence to your USB to UART converter witch CH340 chip. Please make sure that your converter have real capability to baud-rate 921600bps. Please use oscilloscope and check integrity of UART signal. I have seen many issues with these cheap isolated USB-to-UART converters.

    Jan

  • Hi Jan,

       By using XDS-110 UART, it success ! It's a USB to UART converter problem. I will find a better one. Thanks for your help.

    Martin