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.

TIDC-SPPBLE-SW-RD: UART to BLE Bridge Design Supplemental Information [Updated]

Part Number: CC2650CC2640CC2640R2F
Other Parts Discussed in Thread: CC2640R2F, CC2640, , BLE-STACK, TIDC-SPPBLE-SW-RD

Intro

TI Designs page: 
http://www.ti.com/tool/TIDC-SPPBLE-SW-RD

Guide: http://www.ti.com/lit/pdf/tidu997

Software patch: http://www.ti.com/lit/zip/tidcac1 

This article provides additional information & the latest updates for TI's UART to BLE Bridge TI Design supporting the SimpleLink Bluetooth low energy CC2640 and CC2640R2F wireless MCUs. You can use the TI Design to develop your custom HW or just use TI's custom Serial Port Profile (SPP) for Bluetooth low energy (BLE) in your CC2640R2F / CC2640 application (also supports CC2650). Using SPP for BLE is a simple method to add Bluetooth low energy data connectivity to your BLE device.

If you are new to TI BLE, see the product overview at www.ti.com/ble and our Getting Started E2E page

Release updates

CC2640R2F with Bluetooth 5 and Bluetooth 4.2

1.40.00.00

Known Issues:

1. spp_ble_server: Please use the updated build_config.opt file from the SDK:

C:\ti\simplelink_cc2640r2_sdk_1_40_00_45\examples\rtos\CC2640R2_LAUNCHXL\blestack\simple_peripheral\tirtos\build_config.opt

Instead of the one in github:

C:\git\ble_examples\examples\rtos\CC2640R2_LAUNCHXL\bleapps\spp_ble_server\tirtos\build_config.opt

 

SIMPLELINK CC2640R2 SDK v1.35 NEW

New Features:

  • Includes Bluetooth 4.2 (BLE-Stack) and Bluetooth 5 (BLE5-Stack) for both server/client projects
  • Bluetooth 5 High Speed mode (2 Mbps) support using BLE5-Stack
  • On-chip OAD support (BLE-Stack / Bluetooth 4.2 only, IAR and CCS projects)

The SPP BLE Client and SPP BLE Server application have been ported to the latest CC2640R2 SDK v1.35 and supports the CC2640R2 LaunchPad([1]). The sample code is available on TI's SimpleLink GitHub page: https://github.com/ti-simplelink/ble_examples

Read the documentation under the docs folder to get started with the project. When connecting to the LaunchPad, use the "XDS110 Class Application/User UART (COMxx)" port. Make sure to close any programming tools or Debug sessions (e.g., CCS) as they may "lock" the COM port. If needed, unplug/re-plug the USB cable to re-enumerate the USB connection following a debug or programming session. The code can be modified to support any available GPIO pins (UART configuration) on custom boards.

Known issues

  • OAD Target builds with errors:

Fix: Replace the cc26xx_app_oad_onchip.cmd file in the oad_target_cc2640r2lp_app project(C:\ti\simplelink_cc2640r2_sdk_1_35_00_33\source\ti\blestack\common\cc26xx\ccs\cc26xx_app_oad_onchip.cmd) with the file in ble_examples (\examples\rtos\CC2640R2_LAUNCHXL\bleapps\spp_ble_server\tirtos\ccs\config\cc26xx_app_oad_onchip.cmd)

CC2640 and CC2650 with Bluetooth 4.2

BLE-Stack v2.2

New Features:

The SPP BLE Client and SPP BLE Server application have been ported to use BLE Stack v2.2 and support the CC2650 Bluetooth low energy LaunchPad kit (LAUNCHXL-CC2650). The sample code is available on TI's SimpleLink GitHub page: https://github.com/ti-simplelink/ble_examples/tree/ble_examples-2.2

Read the documentation under the docs folder to get started with the project. When connecting to the LaunchPad, use the "XDS110 Class Application/User UART (COMxx)" port. Make sure to close any programming tools or Debug sessions (e.g., CCS) as they may "lock" the COM port. If needed, unplug/re-plug the USB cable to re-enumerate the USB connection following a debug or programming session.

BLE-Stack v2.1

  • Note BLE-Stack v2.1.1 and earlier Bluetooth 4.1 SDKs are not recommended for new designs. Please use BLE-Stack v2.2 or later.

Addendum to User Guide 
In CCS, when importing, compile errors might occur due to incorrect board file configuration. Please double check correct board file is included under the 'Startup' folder in Project Explorer for the selected Build configuration.

DevPack Debugger Version Differences 
There are different versions of the DevPack debugger which uses different pinout for the UART. The RX/TX pins are switched in the two versions. Select the correct pins using the code snippet below by defining DevPackBoard_REV for either REV1_0 or the newer REV1_2.

Add/Modify the following in Board.h in your SensorTag project:

#define REV1_0						          1
#define REV1_2						          2

#define DevPackBoard_REV					  REV1_2

#if defined(DevPackBoard_REV) && DevPackBoard_REV == REV1_0
/* UART pins used by driver */
#define Board_UART_TX               Board_DP4_UARTTX
#define Board_UART_RX               Board_DP5_UARTRX

#elif DevPackBoard_REV == REV1_2
/* UART pins used by driver with RX/TX switched */
#define Board_UART_TX               Board_DP5_UARTRX
#define Board_UART_RX               Board_DP4_UARTTX
#endif

Attaching the board files as reference: SensorTag Board files


RS232 Hardware Reference Design 
This design also includes a RS232 hardware reference (for reference only, not manufactured) to be used with the CC2650/CC2640 device to communicate with other processors supporting the RS232 protocol.

Note: This reference design uses MAX3232 RS-232 LINE DRIVER/RECEIVER which requires external power source for the board to operate. The coin cell used with the SensorTag will not meet the voltage requirements of the RS232 reference design.

This RS232 reference design is not required for testing and prototyping custom applications since our development boards such as the SensorTag+Debugger DevPack and SmartRF06 board already includes UART to USB converters to communicate with the PC.


Common Issues/Fixes 


Changing RTOS Versions 
Make sure the RTOS version used with the project is consistent. Current version is 2.13.x 
Follow the steps below:

  1. Change RTOS version in CCS project settings (make sure only one is selected)
  2. Close CCS
  3. Delete the following files:
    INSTALL_DIR\Projects\ble\SimpleBLEPeripheral\CC26xx\CCS\Config\src
    INSTALL_DIR\Projects\ble\SimpleBLEPeripheral\CC26xx\CCS\SimpleBLEPeripheral\{PROJECT CONFIGURATION}\configPkg
  4. Open and rebuild project in CCS


Support for CC2650 LaunchPad 
Follow these steps to run this UART to BLE Bridge on the CC2650 LaunchPad (LAUNCHXL-CC2650) by using a different board file with minor changes. The CC2650 LaunchPad includes an integrated XDS110 debugger which provides a UART back channel that can be used to demonstrate the CC2640 UART to BLE Bridge TI Design on a low-cost development kit.

  1. Get the Launchpad board files from the the SimpleLink GitHub page. These files are compatible with the BLE-Stack v2.1.0 / v2.1.1 SDK.
  2. Add the LaunchPad board files to the project after excluding the existing board files. Refer to the CC2640 BLE SW Developer's Guide (SWRU393) for more details on how to update the board file.


Application Size 
This is the output of the map file of building SPPBLEServer in IAR V7.40.2:
SPPBLEServer - CC2640App:

  31 375 bytes of readonly  code memory
   3 396 bytes of readonly  data memory
  16 169 bytes of readwrite data memory

SPPBLEServer - CC2640Stack:

  55 453 bytes of readonly  code memory
   8 715 bytes of readonly  data memory
   1 235 bytes of readwrite data memory

From this, the flash is about 34KB for the App and 63KB for the Stack which totals to 97KB for the entire flash usage. This leaves about 31KB (128-97) for the application. Refer to Section 9.12 "Check System Flash/RAM usage with Map file" in the SDG for more detailed steps: http://www.ti.com/lit/pdf/swru393

CC2650 Module BoosterPack