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.

cc3200 can't start from flash

Other Parts Discussed in Thread: UNIFLASH, CC3200, CC3200SDK

Dear friends:

  I was trying to program a bin file I did for cc3200 using uniflash. However, even the programming is successful, CC3200 load board can't start from flash after removing SOP2 pin. The program works fine if I use debug mode. The code I had is a modified version from one of the cc3200 examples. There is no html or anything, only .bin file needs to be loaded in. Please let me know if I did anything wrong.

  • Hi Dong,

    Here are the steps I use, pay particular attention to step 2 and 3 :-

    1. Make sure the SOP2 jumper is present
    2. Select the "sys/mcuimg.bin" 
    3. Browse to C:\ti\CC3200SDK\cc3200-sdk\example*\Release and select the filename.bin file you want
    4. Check the boxes for Erase, Update, and Verify
    5. Then choose Operation => Program
    6. Then hit the Reset button on the CC3200 LP if asked by UniFlash
    7. To run the program now stored on the SFlash, remove the SOP2 jumper.

    I hope this helps.

    Glenn.

  • Thank you very much for the reply. I did all the steps but for some reason it still doesn't work. Should I do something in the code?

  • Hi Dong,

    There shouldn't be anything required in the code, the same code should work in debug mode and on the SFlash.

    Here are a few other suggestions:-

    Make sure you have installed the latest service pack, which you can get from here - http://www.ti.com/tool/cc3200sdk

    You will need the latest version of UniFlash for the CC3200 to install the service pack, you can get that from here - http://processors.wiki.ti.com/index.php/CCS_UniFlash_-_CC3100/CC3200_Edition

    Can you check the Rev number on your LaunchPad, is it Rev 3.1 or Rev 3.2?

    Glenn.

  • Hi Dong,

    If the code is working fine with debugger, then it should run from Flash. Since you are also removing SOP-2 Jumper. Only thing I suspect is that .bin file didn't get flashed properly.

    Did you observe any error while programming using Uniflash? What is the size of bin file.

    Also Do you have any UART/LED indication in your application that can indicate running state of the program. This is to understand whether the program ran and went to some fault or it didn't even load from Flash

    Regards,

    Kaushal

  • Hi,

    One last thing that might happen is if the device was formatted in secure mode.

    Have you used the Uniflash to format the device? if so, do you remember if you checked the 'secure' option?

    Anyway, if none of the above suggestions work, please start over with Uniflash and make sure you format the device with 'secure' option unchecked. Please also capture the Uniflash log in the Console screen at the buttom and send it over.

    Regards

  • Thank you for the reply.

    I did check the items you guys listed and make sure they are correct. 

    my main program is:

    void main()
    {
    BoardInit();

    //
    // Pinmux for UART
    //
    PinMuxConfig();

    //
    // Initializing DMA
    //
    UDMAInit();

    #ifndef NOTERM
    //
    // Configuring UART
    //
    //InitTerm();
    #endif

    //
    // Start the SimpleLink Host
    //
    VStartSimpleLinkSpawnTask(SPAWN_TASK_PRIORITY);

    //
    // Start the GetWeather task
    //
    osi_TaskCreate(ControlTask,
    (const signed char *)"Remote Control",
    OSI_STACK_SIZE,
    NULL,
    1,
    NULL );

    //
    // Start the task scheduler
    //
    osi_start();
    }

    Part of the main subroutine "ControlTask" is:

    void ControlTask(void *pvParameters)
    {
    int iRetVal, i;
    char acCityName[32];
    int iStatus,result=0;
    char cCommandString[7];

    unsigned long ulDestinationIP;

    DBG_PRINT("GET_WEATHER: Test Begin\n\r");

    //
    // Configure LED
    //
    GPIO_IF_LedConfigure(LED1|LED3);

    GPIO_IF_LedOff(MCU_RED_LED_GPIO);
    GPIO_IF_LedOff(MCU_GREEN_LED_GPIO);

    //
    // Reset The state of the machine
    //
    Network_IF_ResetMCUStateMachine();

    //
    // Start the driver
    //
    Network_IF_InitDriver(ROLE_STA);
    GPIO_IF_LedOn(MCU_GREEN_LED_GPIO);

    //
    // Configure Timer for blinking the LED for IP acquisition
    //
    LedTimerConfigNStart();

    Since I didn't see LED turning off, I know the code didn't even go to the GPIO_IF_LedOff function.

    The size in Uniflash is:

    [23:22:36] INFO: Downloading file "/sys/mcuimg.bin" with size 56848

    Please help.

  • Hi Dong,

    As mentioned by Kaushal, the code should not make any difference, the LED has likely confirmed that the program is not loading at all.

    As Shlomi has stated the next steps should be "please start over with Uniflash and make sure you format the device with 'secure' option unchecked. Please also capture the Uniflash log in the Console screen at the bottom and send it over."

    Glenn

  • Hi Guys:

      I finally created a new project from one of the examples. The problem solved. By the way, my load board is ver3.2. 

    Thank you very much for the hints!

  • Hi Dong !

    I have problem that you same. Can you training for me step-by-step. Thanks you very much !

  • Dear Dong,

    In reply to your first post - "  I was trying to program a bin file I did for cc3200 using uniflash. However, even the programming is successful, CC3200load board can't start from flash after removing SOP2 pin. The program works fine if I use debug mode. The code I had is a modified version from one of the cc3200 examples. There is no html or anything, only .bin file needs to be loaded in. Please let me know if I did anything wrong",

     

    When u create any .bin file (modified from the CC3200-SDK sample codes), in the Uniflash utility, just rename your file as "/sys/mcuimg.bin". Then follow the standard procedure. 

     

    By doing this, u can flash and run your own .bin file on the CC3200.

    Best regards.

  • Glenn, Kaushal,

       I have been having the exact same problem as Dong.  Are you sure there is no influence by how the bin file is created, i.e. from the project settings, that changes how this works?  As Dong wrote, starting from a sample project fixed the problem.  I have a project that was modified from the out-of-box application which is giving me the same problems.  I wrote my steps and Uniflash output below.

       Please advise, as this is really delaying my development progress.

    Thanks,

    Angelo

    Programming steps through CCS (works OK):
    1. Open project in CCS.
    2. Launchpad (rev 3.2 with XCC3200HZ chip) is plugged in, with SOP2 jumper in place.
    3. Press the Debug button, and press F8 to start the application. ---> Aplication starts normally.


    Programming steps through Uniflash (does not work):
    1. File->New Configuration
    2. Press OK on Target Setup window
    3. Set COM port
    4. Press Format, leave options unchecked, 1MB capacity, press OK.
    5. Select /sys/mcuimg.bin option and change URL to .bin file compiled by CCS during the above steps for the same project.
    6. Check Erase, Update, and Verify options.
    7. Launchpad (rev 3.2 with XCC3200HZ chip) is plugged in, with SOP2 jumper in place.
    8. Return to CC31x Flash Setup and Control, and press Program.  Reset Launchpad when prompted.
    9. Remove SOP2 jumper.
    10. Open terminal emulator on COM port.
    11. Reset Lanuchpad. ---> Application does NOT start

    NOTE: If I perform the exact same steps above but use a precompiled bin file from the examples (e.g. C:\TI\CC3200SDK_1.0.0\cc3200-sdk\example\out_of_box\ccs\Release\oob.bin) in step 5, it runs the application as expected.


    Uniflash messages after step 4:

    [12:42:14] Begin Format operation.
    [12:42:14] INFO: > Executing Operation: Connect
    [12:42:16] INFO: setting break signal
    [12:42:16] INFO: --- please restart the device ---
    [12:42:16] INFO: connection succeeded
    [12:42:16] INFO: getting storage list
    [12:42:16] INFO: > Executing Operation: Init
    [12:42:16] INFO: reading version info
    [12:42:16] INFO: DEVICE CC3200 ES1.32
    [12:42:16] INFO: reading version info
    [12:42:18] INFO: reading version info
    [12:42:20] INFO: > Executing Operation: Format
    [12:42:20] INFO: Erase storage SFLASH
    [12:42:20] INFO: erase storage succeeded
    [12:42:20] INFO: erase storage completed
    [12:42:20] INFO: > Executing Operation: Disconnect
    [12:42:21] Operation Format returned.


    Uniflash messages after step 8:

    [12:45:14] Begin Program operation.
    [12:45:14] INFO: > Executing Operation: Connect
    [12:45:16] INFO: setting break signal
    [12:45:16] INFO: --- please restart the device ---
    [12:45:16] INFO: connection succeeded
    [12:45:16] INFO: getting storage list
    [12:45:16] INFO: > Executing Operation: Init
    [12:45:16] INFO: reading version info
    [12:45:16] INFO: DEVICE CC3200 ES1.32
    [12:45:16] INFO: reading version info
    [12:45:18] INFO: reading version info
    [12:45:20] INFO: > Executing Operation: Program
    [12:45:20] INFO: > File name: /sys/mcuimg.bin, Update: true, Erase: true
    [12:45:20] INFO: > Erase File: /sys/mcuimg.bin
    [12:45:20] INFO: erasing file "/sys/mcuimg.bin"
    [12:45:20] INFO: deleting file "/sys/mcuimg.bin"
    [12:45:20] INFO: erase file completed
    [12:45:20] INFO: > Size of file = 79784
    [12:45:20] INFO: > Update File: /sys/mcuimg.bin
    [12:45:20] INFO: Downloading file "/sys/mcuimg.bin" with size 79784
    [12:45:24] INFO:

    New Token is 0x0
    [12:45:24] INFO: Download complete
    [12:45:24] INFO: Verifying Data...
    [12:45:24] INFO: get file
    [12:45:25] INFO: Done. Reading 79784  bytes
    [12:45:25] INFO:

    Verification OK
    [12:45:26] INFO: > Updated Token value: 0x0
    [12:45:26] INFO: > File name: /cert/ca.pem, Update: false, Erase: false
    [12:45:26] INFO: > File name: /cert/client.pem, Update: false, Erase: false
    [12:45:26] INFO: > File name: /cert/private.key, Update: false, Erase: false
    [12:45:26] INFO: > File name: /tmp/pac.bin, Update: false, Erase: false
    [12:45:26] INFO: > File name: /sys/macadd.bin, Update: false, Erase: false
    [12:45:26] INFO: > Executing Operation: Disconnect
    [12:45:26] Operation Program returned.

  • Hey I am trying to run my program on the CC3200 using an external PSU. I have found various forum posts about this and many have the issue of generating the bin file utilizing the Debug option in CCS. Does anybody know the specific steps I must follow or what document I should read to get acquainted? Thank you.
  • If I understand correctly, you looking to just run your binary in standalone mode, i.e. load the binary into SFlash and have it boot from that binary, without having to load the program into RAM through the debugger each time.  If you program the binary using Uniflash, it should work fine, but I did find one exception (and there may be others) where this didn't work.  I explained it here:  

    http://e2e.ti.com/support/wireless_connectivity/f/968/t/397121

    So check to see if you are trying to write to the console before UART is initialized.  This won't necessarily fail when using the debugger, but does prevent program execution when running from SFlash.

  • The differences I have with that project is that I am using a project I created myself and currently I do not know how to do the generation of a binary file in code composer studio. Once I know this I believe I canbdo the flashing.

  • It's hard to speculate what could be wrong with a project you created from scratch. Most likely it's related to the project settings. I would suggest opening an example app, e.g. 'out of the box', and compare the settings. You could also do a diff on the .project files, which will probably show many differences, but might point out the issue(s). You may want to first confirm that your toolchain is all set up, for instance again using the out-of-box demo and make sure you can compile it, program the device, and run. If that works you might want to add your code to an example project until you get familiar enough with the project settings and environment to create your own custom project. You may find you don't need to create a new project. Using an example project as the starting point and replacing all the code with your own may be fine. Hope that helps.
  • hi


    I have same problem after so much searching.I found one solution for it.

    1.Open CCS and edit in project what you want to do.

    2.Then build project

    3.In left pane you should find .out file.for example oob.out

    4.Copy its file path

    5.Then open uniflash load old .ucf file

    6.After that I go to set /sys/mcuimg.bin file path which you copied.

    7.and program that file.It works definitely.