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.

CCS/LAUNCHXL-CC1352R1: OAD in project zero

Part Number: LAUNCHXL-CC1352R1
Other Parts Discussed in Thread: UNIFLASH

Tool/software: Code Composer Studio

I'm trying to work through the OAD process in project zero. (I've also implemented the DMM, which works, but I haven't ruled out that being an issue). Here's what I've done so far:

Build and run the code on the 1352. I can see the device through the ios Starter App and go through sensor view and firmware download. I've rebuilt the project in CCS, only changing some serial log output to verify its a different image. I took the newly built ble5_project_zero_cc13x2r1lp_app_FlashROM_Debug_oad.bin file and transferred it to the phone via itunes, Then I did the firmware download using this file, which "appeared" to complete. The app indicated success and reboot, and this got printed to the serial port from the device:

#001330 [ 517.075 ] INFO: (project_zero.c:841) OAD DL Complete, wait for enable

My expectation at this point is that the device would have rebooted and start advertising again. but there is nothing. There is no longer anything outputted on the serial port after the OAD, even if I power-cycle the device. This makes me think something failed, but I have no idea what or where to begin looking.

Can I just use the ble5_project_zero_cc13x2r1lp_app_FlashROM_Debug_oad.bin image from the workspace or do I have to do anything special? (It appears there are checks in OAD to prevent incompatible images).

  • Hello,

    You are likely experiencing this known issue:
    processors.wiki.ti.com/.../CC2640_OAD_User's_Guide, see section Device Does not restart after successful OAD.

    If you fully unplug and plug the device from your PC before starting the OAD, do you find that it restarts without issue?
  • Well this doesn't seem to be an OAD issue specifically. I guess I had not recently tried to powercycle the device without immediately running the debugger, and apparently I had a corrupt program in the boot slot. I would think that performing an OAD would have resolved that, even if I was running in the debugger.

    I went back and flashed the ble5_project_zero_cc13x2r1lp_app_FlashROM_Release.hex file directly with uniflash and that seems to have cleared it up (I did that a while ago, but not recently).

    I then went back to CCS and ran my code, but when I powercycle, it is running the other program (i.e. the ble5_project_zero_cc13x2r1lp_app_FlashROM_Release.hex I flashed above). So clearly the debugger and boot programs are different.

    Maybe you could help clarify what is going on. Specifically when running the debugger, where is the program, and when powercycling, where does the program load from? In my previous tests (non-OAD), when I ran the debugger, the same program would load on subsequent powercycles without the debugger.

    With the OAD stuff, it appears to load the program from a different slot. What is the difference between loading the program in the debugger and loading it via uniflash?

    Also, it appears the ble stack library is not included in the bin file that the compiler creates. I though I read somewhere that the separate python script had been integrated in the build process somehow, but I could be mistaken on that one. I guess I need to go back to the documents on that one.

  • Hello,

    When using OAD there is a bootloader that runs every time the device boots and selects the best image to run on the device.
    If it deems that this is an image located in the external flash, then it will copy the image from external flash to internal flash and execute it.

    If you are using the release configuration of the bootloader, then it will that the CRC is valid on the OAD image header before running any image. This can cause the image from the debugger to be swapped out on reset.

    The binary created by the tool (*_oad.bin) contains a merge of the app and stack_library images.

    There is more information here: dev.ti.com/.../

    See the OAD Chapter for more information.