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.

LAUNCHXL-CC2640R2: On-chip OAD procedure

Part Number: LAUNCHXL-CC2640R2
Other Parts Discussed in Thread: CC2640R2F, CC2640, BLE-STACK

I'm using the SDK example Simple peripheral on-chip OAD. When the OAD Reset service is called, I've noticed that the CC2640R2F doesn't always context switch to the Persistent App - the switch only works about 1 in 3 times. Also, after the OAD image is sent and enabled, a hard reset is always required to come back to execution of Image B. It won't be possible to execute a hard reset after the OAD on our custom board so I'm looking for other solutions to this problem.

  • Follow-up question - comments in the stack code state that the soft reset is unreliable for CC2640. What can we do to make the OAD process more robust?
  • Another follow-up question -

    dev.ti.com/.../oad_profile.html

    After OAD image download, what should the value of the "Enable OAD Image Command" characteristic be? The documentation says "LEN = 4: Image type and image number of image to be downloaded". Can you provide an example for this?

  • Hello,

    We have not observed any instability issues with resetting the device during our testing, can you provide more information about how to reproduce this. I would like to add the following note. After programming the device or attaching the device to a PC or flash programmer, there exists a condition where the debugger might detach and leave the device in halt in boot. The next time the device resets you may be stuck in halt in boot. This explains the hard reset phenomena that you have described.

    Regarding soft resets, they are not support on any CC26xx devices and the OAD solution uses a hard reset.

    Please see if you can reproduce any of the reset issues after the following:

    1. Program and setup the board
    2. Disconnect the device
    3. Unplug and replug the USB cable
    4. Perform the OAD

    Following the above steps will eliminate the possibility of halt in boot. If you are still having issues, please provide steps to reproduce.
    We will need the following information:

    - Toolchain/IDE and version
    - BLE-Stack version, SDK version
    - Reproducible on TI LaunchPad?


    Regarding the image enable command, there are two flavors of the command. One is the shortened version (LEN=0) which enables automatically the last image that is sent and the other is the extended version which allows you to select which image to enable. For onchip OAD, only the shortened version is supported. The shortened version is just sending OAD_EXT_CTRL_ENABLE_IMG (0x04) to the Extended control command.
  • More information on the halt-in-boot issue is described here:
    processors.wiki.ti.com/.../CC2640_OAD_User's_Guide
  • Thank you for the precise response, the halt-in-boot issue is what our problem seems to be.
    I will test the 'Enable image' command and report back.
  • Thanks for following up, let us know if it works.