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.

TIDC-CC2650STK-SENSORTAG: I can OAD to a target running prebuilt 1.40 firmware but not 1.40 firmware built from source

Part Number: TIDC-CC2650STK-SENSORTAG
Other Parts Discussed in Thread: CC2650STK

I am developing on top of ble_sdk_2_02_01_18 .

If I JTAG-flash ble_sdk_2_02_01_18\examples\hex\cc2650stk_sensortag_rel.hex to a SensorTag board, and then connect to it using BLE Device Monitor, it reports a Firmware Revision String of "1.40 (Oct 26 2016)".  If I click on File > Program (OAD), it presents me with an "OAD Programming" tab as I would expect, with these events in the verbose log:

13:53:19.576 > WriteChar.[2902]: v=0001 
13:53:19.626 > Command Status: 00 FD92 [len=0]
13:53:19.628 > WriteRsp[2902]: st=0 n=0
13:53:19.628 > WriteChar.[CCC2,8]: 06 00 06 00 00 00 32 00
13:53:19.632 > Command Status: 00 FD92 [len=0]
13:53:19.650 > WriteRsp[CCC2]: st=0 n=0
13:53:19.651 > WriteChar.[2902]: v=0001 
13:53:19.654 > Command Status: 00 FD92 [len=0]
13:53:19.669 > WriteRsp[2902]: st=0 n=0
13:53:19.669 > WriteChar.[2902]: v=0001 
13:53:19.674 > Command Status: 00 FD92 [len=0]
13:53:19.684 > WriteRsp[2902]: st=0 n=0
13:53:19.685 > WriteChar.[2902]: v=0001 
13:53:19.691 > Command Status: 00 FD92 [len=0]
13:53:19.700 > GAP Link Param Update: 0 0 6 0 50
13:53:19.700 > Connection parameters updated
13:53:19.706 > WriteRsp[2902]: st=0 n=0
13:53:19.706 > WriteChar.[2902]: v=0001 
13:53:19.709 > Notif.[CCC1]: st=0 n=6 06 00 00 00 32 00
13:53:19.710 > Connection parameters updated
13:53:19.714 > Command Status: 00 FD92 [len=0]
13:53:19.721 > WriteRsp[2902]: st=0 n=0
13:53:19.721 > WriteChar.[FFC1]: v=00
13:53:19.725 > Command Status: 00 FD92 [len=0]
13:53:19.736 > WriteRsp[FFC1]: st=0 n=0
13:53:19.984 > Notif.[FFC2]: st=0 n=2 00 00

But if I build the sensortag project from the source (in that same ble_sdk release), JTAG-flash it to the same board, and then connect to it using BLE Device Monitor, it reports a Firmware Revision String of "1.40 (Feb 6 2018)".  If I click on File > Program (OAD), I don't even get to the "OAD Programming" tab.  Instead, I get a "WriteRsp failure" message and the SensorTag disconnects.  Here's what I see in the verbose log:

14:03:08.656 > WriteChar.[2902]: v=0001 
14:03:08.711 > Command Status: 00 FD92 [len=0]
14:03:08.713 > WriteRsp[2902]: st=0 n=0
14:03:08.713 > WriteChar.[CCC2,8]: 06 00 06 00 00 00 32 00
14:03:08.718 > Command Status: 00 FD92 [len=0]
14:03:08.745 > WriteRsp[CCC2]: st=0 n=0
14:03:08.746 > WriteChar.[2902]: v=0001 
14:03:08.749 > Command Status: 00 FD92 [len=0]
14:03:08.771 > WriteRsp[2902]: st=0 n=0
14:03:08.771 > WriteChar.[2902]: v=0001 
14:03:08.774 > Command Status: 00 FD92 [len=0]
14:03:08.794 > GAP Link Param Update: 0 0 6 0 50
14:03:08.795 > Connection parameters updated
14:03:08.799 > WriteRsp[2902]: st=0 n=0
14:03:08.799 > WriteChar.[2902]: v=0001 
14:03:08.802 > Command Status: 00 FD92 [len=0]
14:03:09.304 > WriteRsp[2902]: st=20 n=0
14:03:09.305 > WriteRsp failed
14:03:09.391 > GAP Link Terminated: status=0 h=0 reason=0x08
14:03:09.391 > Supervision timeout
14:03:09.393 > CC2650 SensorTag disconnected

I am running BLE Device Monitor 2.7.0.  (I believe 2.8.0 is out now, but if my past experience is any guide, updating that may cause more problems than solutions.)

Anybody know what causes this?

  • In order to help investigate/reproduce this problem, it would be useful to know the steps you took before this happened:

    1. How did you build your project? IAR or CCS
    2. How did you flash it? Flash RF Flash Programmer 2 or via the CCS or IAR
    3. Did you flash only the application image, or did you include the stack and BIM as well?
    4. What was the state of the SensorTag after the error happened?
      1. Did the green LED blink?
      2. Does pressing the POWER button cause the green LED to start or stop blinking?
      3. Did you have to reinsert the battery to get going again?

    This issue is unlikely to be related to the BLE Device Monitor but we will recommend to upgrade to version 2.8.0 in any case (this version has a fix for a serious OAD bug). More on BLE Device Monitor here.

  • ccs_original_sensortag-1.zipThank you, Jomar!  I very much appreciate your willingness to take a look.

    1. I built my project using CCS 6.2.0.00050 .  I am attaching here a file, "ccs_original_sensortag-1.zip", which contains my CCS project.  Inside it you will also find the OAD_IMAGE_FULL.hex I generated from that project.  (By the way: I have confirmed that my source build works for things other than OAD--using BLE Device Monitor, I can flip the LEDs on and off, watch sensor values, etc.)  Maybe there is a #define I need to be setting in one of my project files???

    2. In both cases, I flashed the board using SmartRF Flash Programmer 2 ver 1.7.2 (build #5) over an XDS100v3 board.

    3. I know my hexfile (OAD_IMAGE_FULL.hex) contains BIM+stack+app.  I assume the prebuilt cc2650stk_sensortag_rel.hex file (within  ble_sdk_2_02_01_18\examples\hex) contains BIM+stack+app also, right?

    4. After the error happens, the green LED does not blink.  Pressing SK_KEY_RIGHT does not help; the board remains undiscoverable until I remove/reinsert the battery.

    Given that BLE Device Monitor 2.7.0 works against the prebuilt binary, it's hard to believe it is part of the problem.  But you have been kind enough to take an interest in my problem, so I will update to 2.8.0 and report whether that changed anything. :-)

  • It very much appears that the firmware you generated and downloaded has crashed. The only difference I can see is that cc2650stk_sensortag_rel.hex is built by IAR and your project uses CCS. IAR uses less stack than CCS so it could be some marginal issue.
    One thing to try is to set GAPROLE_TASK_STACK_SIZE in your project to a value higher than the default 440.

    Otherwise I can't try your hex file until I'm back in the office on 19 February, so please remind me then.

    NB! You're absolutely right, BLE Device Monitor is innocent, but it doesn't harm to upgrade.

  • YES! Thank you, Jomar! Overriding GAPROLE_TASK_STACK_SIZE in my .cproject file (with a value of 470) fixed the problem!

    I have not experimented with values between 440 and 470.

    So, if OAD doesn't work for you, and you're building on CCS, I think this is the fix.