Please note as of Wednesday, August 15th, 2018 this wiki has been set to read only. If you are a TI Employee and require Edit ability please contact x0211426 from the company directory.

CC2640 Serial Communication

From Texas Instruments Wiki
Jump to: navigation, search

Bluetooth Low Energy Wiki Main Page


This page describes some common possibilities for adding serial communication to an BLE project on the CC2640 / CC2650 family of devices.

Overview

Name Description Advantages Disadvantages
Using TI RTOS Drivers Interface directly with device drivers to send/recieve data Offers highest level of customization. Good doxygen documentation Requires a significant amount of development
Basic Printf Using TI RTOS Adds printf support using RTOS drivers Printf makes it easy to format data SPI is not supported in this wiki
Transport Layer Implementation Thin transport layer implementation that can be added to any application Very easy to use Can only use UART or SPI, not both
UART to BLE Bridge (SPP over BLE) Sends serial UART data over BLE Client and server projects are provided Data payloads are limited


Using TI RTOS Drivers

The recommended method if you want to build your own messaging system from the ground up. These functions interact with the serial (UART or SPI) hardware directly. Documentation on these functions, and example code can be found in the TI RTOS documentation. Each BLE stack release comes bundled with a supported version of TI RTOS, which includes documentation. For BLE Stack v2.1 the default install location of the driver docs:

Stack Version Driver Docs
BLE Stack v2.2 C:\ti\tirtos_cc13xx_cc26xx_2_18_00_03\products\tidrivers_cc13xx_cc26xx_2_16_01_13\docs\tidriversAPIs.html
BLE Stack v2.1.x C:/ti/tirtos_simplelink_2_13_00_06/docs/doxygen/html/index.html

Using basic printf over TI-RTOS

BLE Stack v2.1.x Only
This wiki shows you how to use the System_printf() function to send serial data over UART. System_printf() is a custom, lightweight printf implementation that uses the RTOS SysCallback system provider.

The wiki can be found here: http://processors.wiki.ti.com/index.php/CC26xx_Adding_basic_printf_over_uart_with_TI-RTOS

Application Transport Layer

BLE Stack v2.1.x Only

A reference sample application that uses a modified version of the Network Processor Inteface (NPI) to add serial communication (UART or SPI) to a sample app. This is demonstrated on SimpleBLEPeripheral. There is an extra layer added to remove the need for an NPI task.

Transport Layer information can be found here: http://processors.wiki.ti.com/index.php/Cc2640_Adding_a_UART_or_SPI_driver_to_a_Sample_Project

UART to BLE Bridge (SPP over BLE)

This project sends UART serial data over BLE much like SPP from Bluetooth classic. There are client and server examples to start sending serial data out of the box.

TI Design page: http://www.ti.com/tool/TIDC-SPPBLE-SW-RD Additional info here: http://processors.wiki.ti.com/index.php/CC2640_UART_to_BLE_Bridge