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.

CC2540 unable to pair with bluetooth device when running TI USB platform

Other Parts Discussed in Thread: CC2540

Hi,

I am using the CC2540 Bluetooth SOC. We are encountering an issue where we are unable to pair with another Bluetooth device when the SOC is running TI’s USB platform code (allowing USB enumeration with a host). Pairing works fine when the SOC is running the Keyfob platform code (with no support for USB enumeration).

 

We are not sure if this is a hardware or software problem. Would you be able to point us in the right direction?

 

Thanks,

David

  • What is the specific software project you are running?

    The simpleBLEPeripheral project does not have a configuration for the USB dongle.

    The sample software which runs on the USB dongle is HostTestApp project which configures the device as a network processor. You must then send commands via UART (from BTool for example) to get the device to advertise, connect, etc.

    Please see the Mini-DK user guide for a walkthrough: http://www.ti.com/lit/ug/swru270c/swru270c.pdf

  • Hi Tim,

    We use the SimpleBLEPeripheral as reference, but we are implementing our own GATT Profiles and using as many as HAL APIs we can use. I have changed the CC2540 platform from CC2540EB to CC2540USB since we are using the last one as our main processor.

    After I’ve changed that, I needed to change the workspace/project adding all USB stack files and instead of using the macro CC2540_MINIDK I’m using now NANO_DONGLE, as I saw in HIDDEV reference code provided on TI’s sample project.

     

    I have the USB enumeration working fine if I disable the POWER_SAVING. Actually, that’s another question we have: How could we get USB and POWER_SAVING working together? Do you have a fix for that already? Is this some limitation not documented?

    Back to the main bug: After I’ve enabled CC2540USB and added all the USB files into our custom project the bug mentioned previously started:

    - Our device is capable to connect to a peripheral (an iPhone) only if the CC Debugger is connected. Note that the CC Debugger does not need to be powered.

    - If the CC Debugger is not connected, the peripheral (iPhone) times out in every attempt to connect. Even if we connect first our ble device and the iPhone, keep the CC Debugger connected and disconnect after the connection is stablished, the connection is dropped.

     

    I don’t have any patches/modifications in USB code provided by TI. I don’t have any patches/modifications to the platform support CC2540USB either. If we keep the same application and profile and use CC2540EB as platform (no USB files), everything works like a charm. (No ble connection drops anymore).

     

    Any idea what could be interfering on the bluetooth controller or from the USB code itself?

     

    Thanks,

    David

     

  • Hello David,

    What do you mean by:

    - Our device is capable to connect to a peripheral (an iPhone) only if the CC Debugger is connected. Note that the CC Debugger does not need to be powered.

    So you only need to connect the debugger without it being connected to any USB cable and then it works?

    Are you using a custom PCB

  • Hello Eirik and Tim,

    Yes, as strange as it seems we are only able to pair with an iPhone when a debugger is connected, even if the debugger has no USB power supplied to it. Also, we are using our own custom PCB.

     

    Lately, we are having issues pairing even with a debugger connected. This seems to be a very inconsistent problem to nail down at our end without full access to TI’s code.

     

    Thank you so much for your help. We really appreciate it.

    Regards,

    David

  • Hello David,

    Have you tried to run your code without enabling USB? Just to figure out if USB is actually the problem or not.

    You cannot use power modes unless you disable the USB interface because you need the 32 Mhz XTAL to run for correct USB operation:

    "The 48-MHz internal USB PLL must be powered up and stable for the USB controller to operate correctly.
    It is important that the crystal oscillator is selected as souce and is stable before the USB PLL is enabled."

  • Hello Eirik,

    If we use CC2540EB as platform instead of CC2540USB + USB files the bug does not happen.

    I am disabling the Power Saving when CC2540USB is selected.

    Thanks,

    David

  • Hello,

    Ok, But for the CC2540USB configuration could you verify that the problem does not occur if you simply do not enable the USB interface in your code? I just want to verify that the board configuration is not the source of the problem. 

    I will check if we have any info on using USB+Peripheral.

  • Hi,

    Keep in mind that the USB board config uses internal 32kHz. You should consider changing this to external at least and see if it has any effect.

    Though, with power saving defined as xPOWER_SAVING, i.e. disabled, it should not make a difference.

    Best regards,
    Aslak