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.

CC2650STK + CCS SensorTag Firmware + Debugger Dev Pack Firmware not running.

Other Parts Discussed in Thread: CC2650, CC2541, CC2650STK

Hi all,


I tried to compile the Sensortag Code and Stack from the BLE stack V2 (downloaded this week).

I openned CCS, imported the Sensortag and Sensortag stack projects, then build everything. It works, and I get a .hex file in the output directory.

I ran SmartRf, and programmed.No errors, but the firmware isn't doing anything... No led blinking or BLE activity. Is anyone having this issue?

Thanks a lot

  • Hi,

    Your screen shot only shows the Application project hex file being programmed. Did you build & program the Stack project's hex file?
    Also, you can use the prebuilt SensorTag hex file located in the Accessories\HexFiles directory within the SDK. I would program with this file to make sure your flashing environment is working correctly.

    Best wishes
  • Thanks a lot, smhw couldn't find the documentation. I thought the stack was statically linked on build.
    Best wishes
  • Hi AlphaPaul,

    The two images (stack and application) are two fully separate images which communicates through a software layer called Icall (Indirect Call).

    When developing on the current SW platform there are a few things that are important to be aware of that I am not sure is documented anywhere:

    Application/stack boundaries

    The stack must be compiled before the application so that the Boundary tool executed after stack build can adjust the flash/ram boundaries between application and stack (see ch 3.10 of SWRU393)

    Customer configuration

    The SensorTag application project in the current SDK does not include ccfg.c so the last page of flash will be empty if you have fully erased the device. This causes the device to enter bootloader mode (since the field SET_CCFG_IMAGE_VALID_CONF_IMAGE_VALID != 0) when powered on (when debugger is not attached) and the application will thus not work.

    The original HEX file for the sensorTag contains a separate "baseloader" used for OAD support which is located together with CCFG on the last flash page. This project is unfortunately not included with the SDK at the moment but I think it will be for the next release in July. 

    I would recommend to do one of the following when developing for the SensorTag:

    Option A

    • Erase the device
    • Flash the device with the original HEX image (which includes CCFG and the baseloader

    Modify the linker file (cc26xx_ble_app.icf) and remove the FLASH_LAST_PAGE region and the ccfg section. Note that the linker file is shared between projects so you might want to do a local copy and change the linker file settings.

    • This is to ensure the baseloader from the original HEX is not overwritten by an empty last page by the application
    • Flash your application and stack either through CCS / IAR or with SRF Prog 2. Remember to only erase "Pages in image) when flashing with SRFProg 2.

    Option B (no OAD support)

    • Erase the device
    • Modify the application to compile in ccfg_appBLE.c
    • Flash your applicatino and stack as normal.

    Regards,
    Svend

  • Hello Svend!

    Thank you very much for helping us,

    I have the same problem as AlphaPaul and tried to follow your instructions. I started with Option A) but I couldn't find the linker file cc26xx_ble_app.icf, I found the FLASH_LAST_PAGE region and ccfg section in c26xx_ble_app.cmd instead so I gave it a try. I made a local copy, removed the suggested lines from the code, recompiled and reprogram the target with a custom SensorTag.hex using SRFProg2 (only erasing pages in image) but I had no luck (I subsequently tried with CCS with the same results) . The BLE SensorTag app finds the CC2650 SensorTag but when I press connect in the app a window appears with the text "Unfortunately, BLE SensorTag has stopped". Am I doing something fundamentally wrong with the instructions you kindly have given us? thank you

    kind regards

    Sergio
  • Hi Sergio,

    When using CCS there are currently a bug in the SensorTag example project. The Android app checks a VERSION flag that is not set as a compiler symbol in the CCS project.
    See the following link for details:
    e2e.ti.com/.../1529328

    Regards,
    Svend
  • Also be careful with Erase->All unprotected pages setting ...

    When you are programming both the App and Stack, then Select Erase->Pages in image (don't select erase all unprotected pages)

  • If we just want to restore the firmware on the sensorTag 2, where is the factory firmware hex file located, and what is its name?

    I connected a DevPack debugger to mine, and was able to run the debugger from within Code Composer Studio  (with some sample apps), but I'd like to restore the SensorTag 2 firmware to its original state (My SensorTag doesn't appear to power on when disconnected from the Debugger board, or communicate with the iOS app anymore).

    I've tried to reflash it with this hex file (using Smart RF Flash Programmer 2)...

    C:/Program Files (x86)/Texas Instruments/SmartRF Tools/BLE Device Monitor/firmware/cc26xx/CC2650SensorTag_BLE_All_v1_12.hex

    but I get a programming error:

    >Initiate access to target: XDS-00000000.

    >Reading file: C:/Program Files (x86)/Texas Instruments/SmartRF Tools/BLE Device Monitor/firmware/cc26xx/CC2650SensorTag_BLE_All_v1_12.hex.

    >Start flash programming ...

    >Flash loader reported an error (4)

    >Error occured at addr: 0x00000000, writing 16768 bytes.

    >Reset target ...

    >Reset of target successfull.

    What are the steps for restoring a SensorTag 2 to it's original factory firmware and operating state?

    Thanks,

    - Larry

  • The steps you do seems to be correct. Make sure you have no debugging sessions active somewhere else (e.g. CCS).
    Can you try to force mass erase the sensorTag first (press the wrench in SmartRF Flash Prog 2 after selecting the CC2650)?

    :.svend
  • That seems to have done the trick. It reflashed successfully. It still doesn't communicate, but I think I may have a dead battery on the sensorTag (LED doesn't come on when I push the power button), so I'm going to get a new battery and see if it comes back to life.

    Thanks!

    - Larry
  • I got a new battery, and it now works (with version CC2650SensorTag_BLE_All_v1_12.hex flashed into the sensorTag).  I can now restore it to working firmware if/when I mess it up running via the Debugger;  which brings me to the next problem encountered...

    I've tried to build/debug and run with the SensorTag project using Code Composer Studio and the DevPak Debugger connected (using the project at C:\ti\simplelink\ble_cc26xx_2_01_00_44423\Projects\ble\SensorTag\CC26xx\Source\Application\...), but it doesn't seem to want to communicate with the iOS SensorTag App either when its running, or afterwards.  The SensorTag doesn't appear to be running (or at least, responding to any buttons), nor communicating vit BTLE with the iOS App, and the only way to restore it is to reflash with CC2650SensorTag_BLE_All_v1_12.hex.

    Is this the version of sources that should be the same or similar to hex file CC2650SensorTag_BLE_All_v1_12.hex?  If so, shouldn't the SensorTag still be able to communicate with the iOS App when running via the debugger?  It seems that perhaps I'm not building/running the correct sources, or something else is not set up correctly.

  • Hello,

    It definitely sounds like you have a setup problem with your local builds. I suggest reviewing the build procedure documented in the BLE SW Developer's Guide (SWRU393). Although that doc uses the SimpleBLEPeripheral example, the same work flow applies to any project.

    Note that the firmware / source in the BLE 2.1 SDK is newer than v1.12.

    Best wishes
  • Hello,

    I am experiencing a similar issue and have followed the suggestions on this post and have had no luck. When porting via CCS my Sensortag is not showing up on the app (not advertising). It works with the hex files though.

    I have posted more details here: e2e.ti.com/.../2067792

    Thanks,

    Darius
  • Hello 

    Were you able to resolve the issue? I have the same problem I think. I've flashed with "C:\ti\simplelink\ble_sdk_2_02_01_18\examples\hex\cc2650stk_sensortag_rel.hex" which I got from the SDK. However the hex file seems to be for CC2541 SensorTag and not CC2650STK. I am able to connect via iOS app and the app is able to detect the sensortag but it is the older version. Because of this the connection is lost a lot of times and the sensor reading is also not good.

    Regards,

    Artiom 

  • @Artiom I think you see the same issue discussed in e2e.ti.com/.../344278 . You can check the solution in that discussion thread.
  • I am having the same issue.Everything is building and i made the super hex file as described in the wiki pages.But when i am uploading the hex file to the sensor tag nothing is working.I am confused.

  • Do you include BIM in your supper hex?
  • yes, definitely. I have followed the steps given in the user guide. Btw i am using Code Composer studio for the compiling and building the project.Is There any specific project setting that i might be missing?Other than that everything i am following as per the wiki user guide
  • If you download your multiple hex to CC2650STK using CCS or Flash Programmer 2, does it work? By the way, do you use TI ARM Compiler v5.2.6 when you build hex files?
  • hi i am using compiler 5.2.9
  • previously i was using Ti V 16.9.1 LTS and it was not working but now with compiler version 5.2.9 it working fine.
  • Do you mean download multiple hex files which are built by TI ARM Compiler v5.2.9 to CC2650STK and it works fine?