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/CC2650: Code Composer debug not working: the semaphore for the test bus controller is in a time-out state

Part Number: CC2650
Other Parts Discussed in Thread: UNIFLASH, CCSTUDIO

Tool/software: Code Composer Studio

Hi,

I'm trying to upload/debug an example project (ADC single channel, or simple BLE peripheral) to my cc2650 launchpad using code composer studio v7, but when I click the little bug icon to debug, code composer studio stops responding, then eventually returns the error: 

error connecting to the target: (error -215 @ 0x0) the semaphore for the test bus controller is in a time-out state. unified-scif was unable to acquire the semaphore used to express ownership of a controller by a utility or debugger. you may have to exit other clients because the timeout occured. emulation package 6.0.504.4

I'm working on a windows computer, I thought I had everything installed correctly but I could easily be wrong.  Any idea how to fix it?

Thanks!

  • Hi,

    This seems to be an error caused by other tools accessing the same board. Do you have anything else running that could be using the launchpad? Things such as the CCS Cloud or Uniflash or even the Flash Programmer? I would also check the Windows Task Manager for any lingering processes running (ccstudio.exe, uniflash.exe, eclipse.exe, gui_flash_programmer.exe).

    Other than that I can't think of anything else that could be wrong, as I am able to connect to my Launchpad with my CCSv7 here.

    Hope this helps,
    Rafael
  • Hi,

    I don't think I had anything else that could have been accessing the board. I had already tried closing CCS Cloud and Uniflash, and I checked the task manager for other ccsstudio.exe as suggested by another question. I realized that my target configuration was not the XDS110 but the XDS100v3, so I changed that (it should be XDS110 I believe) before uploading the Simple BLE Peripheral.

    After doing so, I was able to upload programs for a bit. Then I tried the Simple BLE Peripheral example program. This (supposedly) successfully loaded. Since then, I have not been able to load any programs. I get the following error in a dialog box:

    Load program Error.

    File:

    C:\workspace\ProjectZeroApp_CC2650LAUNCHXL\Debug\ProjectZeroApp_CC2650LAUNCHXL.out: Load failed.

    And these errors in the console:

    Cortex_M3_0: Trouble Halting Target CPU: (Error -2062 @ 0x0) Unable to halt device. Reset the device, and retry the operation. If error persists, configuration, power-cycle the board, and/or try more reliable JTAG settings (e.g. lower TCLK). (Emulation package 6.0.504.4)

    Cortex_M3_0: File Loader: Memory write failed: Timed out waiting for target to halt

    Cortex_M3_0: GEL: File: C:\workspace\ProjectZeroApp_CC2650LAUNCHXL\Debug\ProjectZeroApp_CC2650LAUNCHXL.out: Load failed.

    Cortex_M3_0: Trouble Halting Target CPU: (Error -2062 @ 0x0) Unable to halt device. Reset the device, and retry the operation. If error persists, configuration, power-cycle the board, and/or try more reliable JTAG settings (e.g. lower TCLK). (Emulation package 6.0.504.4)

    I was previously getting an issue that said:

    error connecting to the target: (error -215 @ 0x0) the semaphore for the test bus controller is in a time-out state. unified-scif was unable to acquire the semaphore used to express ownership of a controller by a utility or debugger. you may have to exit other clients because the timeout occured. emulation package 6.0.504.4

    I also posted another question about this before realizing you had responded here, sorry! Any ideas?

    Thanks!
  • Hi,

    Thanks for the additional details. Which BLE SDK are you using? Are you loading this project from the Resource Explorer inside CCS or you downloaded it from the link below? 

    http://www.ti.com/tool/ble-stack 

    The main reason is that the package available in the Resource Explorer is not the latest version. A newer version is available at the link above if you want to try. Keep in mind this newer version is not integrated into the Resource Explorer. 

    The new error you are getting also suggests the simple BLE Peripheral code may be causing the device to go out of control - the JTAG debugger is unable to halt the Cortex M3 core of the CC2650 so it can properly load code.

    You can recover the device by checking one of the troubleshooting tips at this thread. It basically says:

    thread said:

    Q: How do I unbrick the device?

    A: Use SmartRF Flash Programmer 2. Under the wrench icon (top right), select “CC26xx/CC13xx Forced Mass Erase”. Note that the flash programming tool will always report "success" when performing a mass erase. If the CC26xx Device Configuration (CCFG) has been set to disable the Mass Erase function, the operation will not succeed despite the flash programming tool reporting "success".

    Hope this helps,

    Rafael

  • Hi Rafael,

    I'm using BLE-STACK-2-2-1, downloaded from the website. Thank you for directing me to the link to unbrick the device! That was successful. Now, I can't see my device in the simpleLink app or Light Blue on my computer. After unbricking it I loaded the project zero app and could see project zero. I loaded another example project, and couldn't see my device, so I went back to project zero and have not been able to see it again. It says everything loads correctly, I get no errors, it just doesn't show up in BLE explorers. I've tried loading it through CCS and launching a debugging session, using Uniflash, and flash programmer 2.  I'd love so more help if you can!

    Thanks!

  • Hi,

    >>so I went back to project zero and have not been able to see it again.
    Without knowing the Project Zero in deep detail (unfortunately it is not my area of expertise), in general this is due to incompatibilities caused by a pre-initialized device.

    The explanation is that some of these examples usually expect the device to be coming straight from reset and not half-initialized by a previous code run. Given these examples are written in Flash memory, you can test this by resetting the device (menu Run --> Reset), load the code and run. This should be enough to get the Project Zero working again.

    In certain more extreme cases (where there is external hardware, for example) a power cycle of the board/device is necessary. Given the CC2650 Launchpad does not have other processors or peripherals, I wouldn't expect this to be necessary.

    Please give this a try and see if you can get a more stable scenario.

    Hope this helps,
    Rafael

  • Hi,

    So yesterday I had tried reseting and power cycling the board already without any luck, I still wasn't able to see project zero after trying multiple times. I left and returned hours later and have no clue why, but I could see it again.  I have no idea what could have changed.  I haven't been able to see any of the other example projects yet though, I'd love help with that.

    Thanks