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 USB libraries

Other Parts Discussed in Thread: CC2540

I am working on a project that will need the ability to talk from a PC to the CC2540 through USB. I have installed the drivers and the SImpleJavaPeripheral application and was able to communicate to the HostTestAPp application. In another thread on this forum it was mentioned that the HostTestApp application is the network configuration rather than the single chip, which means the HCI-USB is linked in a manner that won't work for me. Instead, I must start a new project with the single chip mode (I chose the SimpleBLEPeripheral) and import the USB libraries. I imported the following files to my workspace:

All the files in "\Texas Instruments\BLE-CC254x-1.2.1\Components\hal\target\CC2540USB\usb\library"

All the files in ":Texas Instruments\BLE-CC254x-1.2.1\Components\hal\target\CC2540USB\usb\library\cc2540"

and all the files in "\Texas Instruments\BLE-CC254x-1.2.1\Components\hal\target\CC2540USB\usb\class_cdc"

Are these the correct files to be importing? Also do they need to go into particular area of the workspace. I currently have them under HAL->Target->CC2540EB->USB->library and HAL->Target->CC2540EB->USB->class_cdc and IAR is having trouble finding them. Thanks

  • Tom Amedro said:
    Are these the correct files to be importing?

    I think yes, though i'm not 100% sure.


    Tom Amedro said:
    IAR is having trouble finding them.

    You have to add the links into the workspace. Open project options (Alt+F7) -> C/C++ compiler ->
    Preprocessor->Additional include directories. You'll figure it out from there.

  • Thanks Igor, you are a very helpful individual :) I have some other questions, I may start another thread but just in case you may know the answer I'll post it here:

    Should the code that initializes the USB port such as uartConfig.baudRate and uartConfig.flowControl (my understanding is that USB libraries provide a virtual UART interface) go in my app's initialization function (in this case void SimpleBLEPeripheral_Init( uint8 task_id )) or somewhere else? And will the callback will go in the same source as its own function? 

  • Hi,

    I'm not sure how this thing goes in BLE Stack, you should go with a new thread on this.