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.

CC2640: Compatibility of module with examples from BLE_SDK

Part Number: CC2640
Other Parts Discussed in Thread: , CC2650, CC2540

Hello, I'm new in development with Bluetooth and I need some help to start.

I have a CC2640 module on a custom board. I flashed with Host_test example from "ble_sdk_2_02_00_31". (I also flashed with Simple_peripheral hex file).

I want to send commands from another MCU on UART, but I had some issues. (described here: https://e2e.ti.com/support/wireless_connectivity/bluetooth_low_energy/f/538/t/601400 ).

Then I tried to flash CC2640 with Simple_peripheral hex (Flash Programmer 2), but it will not connect with anything else. This makes me feel that I am doing something completely wrong.

1. Are those examples compatible with my module, or they only work with CC2650DK ?

2. If so, is there any tutorial how to get started with this module?

Thank you.

  • Hi Dragos,

    In general we recommend you learning bluetooth development with the launchpad - like the one for CC2650 or CC2640R2F

    Anyway - are you programming via debugger or serial bootloader? We have an app note on how to use the module www.ti.com/.../swra534

    So yes, you can run any ble example designed for the 2650 on the module. You just need to adjust the board file as necessary as well as have JTAG access (or serial boot loader access to flash) I imagine you'll probably want to debug, so JTAG access would be ideal

    You could actually use any of the learning material we already have if you wanted. (SLA or any of the example projects)

    SLA software-dl.ti.com/.../overview.html

    Regards,
    Rebel
  • Hi Rebel, thank you for your response.

    I use a debugger with the module. I have build the host_test_cc2650em project on CCS after changing the predefined symbols according to this document: http://www.ti.com/lit/an/swra530/swra530.pdf 

    Then I tried to sent on UART some commands to init the device as peripheral (GAP DEVICE INITIALIZATION, GAP CONFIGURE DEVICE ADDRESS, GAP UPDATE ADVERTISING DATA, GAP MAKE DISCOVERABLE). I can see on UART RX the events for this commands, also I can see the device start to advertise.

    The problem is when I try to connect with other device. I see the event for link established but the peripheral is not responding to connection events, so connection fails immediately (seen with packet sniffer).

    Same thing also happened for simple_peripheral example, with no other commands on UART.

    If you have any suggestion how can I solve this, please let me know. 

    Thanks, Dragos.

  • Hi Dragos,
    You can download ble stack v2.2.1 www.ti.com/.../ble-stack
    After install it. You can download the basic example of BLE in C:\ti\simplelink\ble_sdk_2_02_01_18\examples\hex\
    You can use the SmartRF Flash Programmer 2 to download the firmware to device to test. I recommend you should the cc2650lp_simple_peripheral_rel.hex.
    The hex files in C:\ti\simplelink\ble_sdk_2_02_01_18\examples\hex are merged the app & stack firmware. If you want download from 1 project. You have to download the app & stack firmware to device
  • Hi Vy,

    I have tried to flash the module with the hex you indicated and the result I still cannot establish a connection. Please check the attachment.

  • Hi Dragos,
    Do you use the TI development kit or Custom PCB?
  • A custom PCB, and CC2640F128RSM module.
    Thanks for your fast reply.
  • Hi Dragos,
    Problem: Device can advertise, but it cannot be connected or disconnected after a time. The common reasons in the custom board are
    - Problem on Central device. You can try to use the lightblue app on iOS or BLE scanner on Android to use like the central device.
    - Problem with the crystal or capacitor of crystal on peripheral device. There are some solutions to check this problem:
    + Use the TI development kit to check if you edited the code. If you only use the hex files in ble stack, It is not necessary. Because this hex files is good.
    + Configure the internal crystal of CC2650 in your code
    + Check the capacitor of crystal on your pcb and try to check on a few other pcbs
    Besides, you can check some other problems such as power, RF schematic on your pcb

  • 1. As central was used: Android (BLE scanner), iOS and BTool (CC2540 dongle) - same behavior on every device.
    2. For peripheral I used hex file (cc2650lp_simple_peripheral_rel) to be sure that problem is not in my code.
    Do I still need to configure internal crystal, is not configured in the hex file?
    3. RSSI looks fine on peripheral, so signal power should not be a problem. Also, with SmartRF Studio I checked Tx and Rx and it looks that packets are sent and received.
  • Hi Dragos,
    It maybe the capacitor of crystal. You have to edit it in your code.
    See more details on how to adjust
    processors.wiki.ti.com/.../CC26xx_Tips_and_Tricks
    e2e.ti.com/.../432034
  • Hi Vy, thank you for your support. It seems that clock configuration caused the connection issue.

    1. I have modified the project configuration to FlashROM_RCOSC. Now the slave is responding on connection events. 

    2. Than with Flash_ROM config, I uncomment from ccfg.c :

    #define SET_CCFG_MODE_CONF_SCLK_LF_OPTION            0x0        // LF clock derived from High Frequency XOSC with normal configuration

    I have on the custom board a 24MHz Oscillator. This option also works.

    Is this meaning that in first case I used internal oscillator and in second I configured the external one? Can you give me more info about what configuration is better?

    Thank you very much, Dragos.

  • Hi Dragos,
    You can see this document to find more detail.
    www.ti.com.cn/.../swra495e.pdf