CC2564C TI Dual-Mode Bluetooth® Stack on STM32F4 MCUs

User's Guide

Document Number: SWRU498A

Revision: November 2016 – Revised February 2017

Introduction

The CC2564C dual-mode Bluetooth stack on STM32F4 microcontrollers (MCU) software (CC2564CSTBTBLESW) from Texas Instruments (TI) enables the STM32 ARM Cortex-M4 processor. It offers single-mode and dual-mode capabilities implementing the Bluetooth 4.2 specification. The stack is fully qualified (QDID 85355 and QDID 69886) and provides simple command-line applications to expedite development. MFi capability is available upon request.

For a complete evaluation solution, the CC2564CSTBTBLESW software development kit (SDK) works directly with the STM3240G-EVAL hardware development kit. The stack for the STM32 MCU is certified and royalty-free.

The software is compatible with the CC256xCQFN-EM board. It provides a complete Bluetooth BR, EDR, and low-energy HCI solution, reducing design effort and accelerating time-to-market. The CC256xCQFN-EM features TI's dual-mode Bluetooth 4.2-compliant solution. These devices offer best-in-class RF performance with transmit power and receive RX sensitivity that approximately doubles the range compared to other BLE-only solutions. TI's power-management hardware and software algorithms contribute to significant power savings in common Bluetooth BR, EDR, and low-energy modes.

1 Features

Trademarks: ARM, Cortex, Keil, µVision are registered trademarks of ARM Limited (or its subsidiaries). Bluetooth is a registered trademark of Bluetooth SIG. IAR Embedded Workbench is a registered trademark of IAR Systems AB. STM32 is a registered trademark of STMicroelectronics International N.V. All other trademarks are the property of their respective owners.

2 Bluetooth Profiles

Classic Profiles

Low-Energy Profiles

MFi Support

3 Sample Application Overview

This demonstration allows evaluation of TI's CC2564C Bluetooth device with the STM3240G-EVAL platform. The CC2564C STM3240G-EVAL Bluetooth applications provide a feature-rich and user-friendly experience. Users can employ a console to send Bluetooth commands, configure a Bluetooth device to accept connections, connect to a remote Bluetooth device, and communicate via Bluetooth.

This demonstration includes one sample application for each profile, along with simple command-line sample applications to accelerate development. Figure 1 illustrates the demonstration overview.

Figure 1. Overview of Demonstration: A diagram showing two PCs (PC1 and PC2) connected via UART to development boards. The boards are then connected wirelessly via Bluetooth, one acting as a server and the other as a client.

4 CC2564CSTBTBLESW Hardware and Software Requirements

A complete evaluation requires the following hardware and software tools:

Hardware

Note: All sample applications function directly with the STM3240G-EVAL board. Applications must be ported to the STM32F4DISCOVERY board; porting documentation is available in the CC2564CSTBTBLESW installation directory.

Due to hardware limitations on the STM32F4DISCOVERY board, audio and voice applications cannot be fully evaluated. Use the STM3240G-EVAL for complete evaluation of the following audio and voice sample applications:

Software

Figure 2. Hardware Combination: An image displaying the CC256XCQFN-EM board, CC256XEM-STADAPT board, and STM3240G-EVAL board connected together.

5 Setting Up the Hardware

Using TI's dual-mode Bluetooth CC2564C solution (CC256xCQFN-EM), the STM32 MCU evaluation board (STM3240G-EVAL or STM32F4DISCOVERY), and the CC256xEM Bluetooth Adapter Kit (CC256XEM-STADAPT), developers can evaluate both classic and Bluetooth low energy capabilities with the TI Dual-Mode Bluetooth stack on STM32F4 MCUs.

To set up the hardware, follow these steps:

  1. Fit the jumpers onto the adapter board. Refer to the CC256xEM Bluetooth Adapter Kit User's Guide and Quick Start Guide for correct jumper positions and connections to STM32 boards.
  2. Mount the adapter board onto the STM32 board. See Figure 5 for STM3240G-EVAL and Figure 6 for STM32F4DISCOVERY examples.
  3. Optional for Audio and Voice Sample Applications: Ensure PCM signal directions are correctly set on the CC256XCQFN-EM. The PCM port can be configured as master or slave depending on the sample application. Table 1 details the required resistor configurations (R18, R19, R11) on the CC256XCQFN-EM for audio and voice sample applications.

Figure 3. CC256XCQFN-EM PCM Role Selection for Audio and Voice Sample Applications: An image highlighting resistors R18, R19, and R11 on the CC256XCQFN-EM board.

Table 1. CC256XCQFN-EM PCM Direction for Audio and Voice Sample Applications

Demo Name CC256XCQFN-EM PCM Role R18 R19 R11
A3DP Demo_SNKSlave0 ΩDNIDNI
A3DP Demo_SRC
HFP Demo_AG
HFP Demo_HF
HSP Demo
All other Sample ApplicationsMaster (default)DNI10K Ω0 Ω

(1) In addition to the changes listed, ensure proper UART and I2S paths are configured on the CC256XEM-STADAPT board for each demo. Refer to the CC256xEM Bluetooth® Adapter Kit quick start guide for details.

(2) DNI indicates Do not install.

Figure 4. STM32 General Setup: An image showing a typical setup of the STM32 board with the adapter and CC256xCQFN-EM boards.

Figure 5. STM3240G-EVAL, CC256X-STADAPT, and CC256xCQFN-EM Combination: An image displaying the STM3240G-EVAL board combined with the CC256X-STADAPT and CC256xCQFN-EM boards.

Figure 6. STM32F4DISCOVERY, CC256X-STADAPT, and CC256xCQFN-EM Combination: An image displaying the STM32F4DISCOVERY board combined with the CC256X-STADAPT and CC256xCQFN-EM boards.

Note: Due to hardware limitations on the STM32F4DISCOVERY board, audio and voice applications cannot be ported for complete evaluation. Use the STM3240G-EVAL for complete evaluation of the following sample applications: A3DP Demo_SNK, A3DP Demo_SRC, AUD demo, HFP demo, HFPAG demo, HSP demo.

6 Setting Up the Software

Follow these steps to set up the software for the demonstration:

  1. Navigate to the Bluetooth SDK.
  2. Note: A TI login is required for SDK download. Create one if you do not have an account.
  3. Create a TI login if necessary.
  4. Complete and submit the export approval form.
  5. Note: Wait for TI to approve the request. Upon approval, a download link will be provided.
  6. Click Download to obtain the software.
  7. Note: The Bluetooth SDK is intended for use with the STM3240G-EVAL board. Software modifications are necessary for the STM32F4DISCOVERY board.
  8. Run the installer (e.g., CC256XSTMNoOSBTBLESW-v4.2.x.x-Setup.exe) after download.
  9. Accept the TI Bluetooth Stack Clickwrap License Agreement.
  10. Note: After accepting the license, the SDK installs to C:\TI\Connectivity\CC256X BT\CC256xSTM32BluetopiaSDK\v4.2.x.x\.
  11. Access the SDK via Start/Programs/Texas Instruments/CC256XBT/CC256xSTM32BluetopiaSDKv4.2.x.x.

7 Building and Flashing the Bluetooth Code (STM3240G-EVAL)

Sample applications for FreeRTOS and NoOS are available for IAR and Keil IDEs. Follow these instructions to set up applications for each IDE.

IAR

  1. Navigate to C:\TI\Connectivity\CC256XBT\CC256xSTM32BluetopiaSDK\v4.2.x.x to open the workspace.
  2. Select a sample:
    • For NoOS, navigate to \NoOS\STM3240G-EVAL\Samples\ for a list of samples.
    • For FreeRTOS, navigate to \FreeRTOS\STM3240G-EVAL\Samples\ for a list of samples.
  3. Choose the demonstration to load onto the device (e.g., SPPDemo).
  4. Navigate to NoOS.
  5. Navigate to EWARM.
  6. Select SPPDemo.eww.
  7. Note: The IAR IDE opens.
  8. Select Debug (see Figure 7) or Release Configuration from the drop-down menu. For this example, select Debug.

Figure 7. IAR Drop-Down Menu: A screenshot of the IAR Embedded Workbench IDE showing the project structure and the Debug/Release configuration selection.

  1. Select Download and Debug from the Project drop-down menu or click the Play icon (see Figure 8).

Figure 8. Download and Debug: A screenshot of the IAR IDE showing the "Download and Debug" option in the Project menu and the "Play" icon.

Note: The IDE debugs and loads the software onto the device, which may take 5 to 10 minutes.

  1. Click the red 'X' icon in the IDE to stop debugging (see Figure 9).

Figure 9. Debugging Screen: A screenshot of the IAR IDE showing the debugging interface with the code execution and variables.

  1. Disconnect the STM3240G-EVAL.
  2. Reconnect the STM3240G-EVAL.
  3. Press the Reset button on the STM3240G-EVAL device.
  4. Click the GO button in IAR (see Figure 10).

Figure 10. The GO Button: A screenshot of the IAR IDE highlighting the "GO" button used to start program execution.

Keil

  1. Navigate to C:\TI\Connectivity\CC256XBT\CC256xSTM32BluetopiaSDK\v4.2.x.x to open the workspace.
  2. Select one of the following samples:
    • For NoOS, navigate to \NoOS\STM3240G-EVAL\Samples\ for a list of samples.
    • For FreeRTOS, navigate to \FreeRTOS\STM3240G-EVAL\Samples\ for a list of samples.
  3. Select the demonstration to load onto the device (this example uses SPPDemo).
  4. Navigate to NoOS.
  5. Note: For RTOS, navigate to FreeRTOS.
  6. Navigate to RVMDK in the list.
  7. Click SPPDemo.uvproj.
  8. Note: Keil µVision4 opens.
  9. Select Debug or Release Configuration from the drop-down menu (for this example, select Debug [See Figure 11]).

Figure 11. Debug Drop-Down Menu: A screenshot of the Keil µVision4 IDE showing the project structure and the Debug/Release configuration selection.

  1. Right-click SPPDemo_Debug in the project sidebar.
  2. Select Build target to build the code (see Figure 12).

Figure 12. Building Target: A screenshot of the Keil µVision4 IDE showing the "Build target" option in the project context menu.

Note: Figure 13 shows the output when built correctly. After a few minutes, the build process finishes and creates an .axf file. Rebuild the .axf file each time the configuration changes.

Figure 13. Build Output: A screenshot of the Keil µVision4 IDE's build output window, indicating a successful build with no errors or warnings.

  1. Choose Debug mode or Release and Debug modes.
  2. For Debug mode only:
    • (a) Select Start/Stop Debug Session to load the profile onto the STM32 device and work in Debug mode (see Figure 14).

Figure 14. Debug Mode: A screenshot of the Keil µVision4 IDE showing the "Start/Stop Debug Session" option in the Debug menu.

Note: The loading process completes in a few minutes. The profile loads on the STM3240G-EVAL board.

    • (b) Stop the debugging session from the Debug drop-down menu.
    • (c) Unplug the device.
    • (d) Plug the device in again to start working with it.

For Release and Debug modes:

    • (a) Click LOAD to start loading the profile onto the STM32 device (see Figure 15).

Figure 15. Release and Debug Mode: A screenshot of the ST-LINK Utility showing the "LOAD" button to initiate the flashing process.

Note: The loading process completes in a few minutes. The profile loads on the STM3240G-EVAL board.

    • (b) Unplug the device.
    • (c) Plug the device in again to start working with it.

7.1 Flashing the Bluetooth Code STSW-LINK004

The STSW-LINK004 utility can be used to flash the software after creating the binary file through IAR or Keil.

To flash the software:

  1. Open the file from the File drop-down menu.
  2. Select the demonstration to load on the device (this example uses SPPDemo).
    • For NoOS, navigate to C:\TI\Connectivity\CC256XBT\CC256xSTM32BluetopiaSDK\v4.2.x.x\NoOS\STM3240G-EVAL\Samples\SPPDemo\NoOS\EWARM\Debug\Exe.
    • For FreeRTOS, navigate to C:\TI\Connectivity\CC256XBT\CC256xSTM32BluetopiaSDK\v4.2.x.x\FreeRTOS\STM3240G-EVAL\Samples\SPPDemo\FreeRTOS\EWARM\Debug\Exe.
  3. Select a .bin file (this example uses SPPDemo.bin).
  4. Click Program & Verify... from the Target drop-down menu (see Figure 16).

Figure 16. Program and Verify: A screenshot of the STM32 ST-LINK Utility showing the "Program & Verify..." option in the Target menu.

Note: The information for your device is displayed. Ensure the values in Device Information match your device.

  1. Press Start (see Figure 17).

Figure 17. Start Download: A screenshot of the STM32 ST-LINK Utility showing the "Start" button to begin the programming process.

Note: The command window displays "Verification...OK" (see Figure 18).

Figure 18. Verification...OK: A screenshot of the STM32 ST-LINK Utility's command window confirming successful verification.

8 Applications

The dual-mode Bluetooth stack on STM32F4 MCUs includes a sample application directory for NoOS and FreeRTOS, featuring source code that demonstrates TI's dual-mode Bluetooth stack. These simple, command-line sample applications display a list of available commands. Table 2 lists the available profiles for the Bluetooth SDK.

Table 2. Table of Available Profiles for Bluetooth SDK

Profile Role FreeRTOS NoOS EM Platform
A3DP Demo_SNKSink
Controller
IAR
Keil
IAR
Keil
STM3240G-EVAL
A3DP Demo_SRCSource
Target
IAR
Keil
IAR
Keil
STM3240G-EVAL
ANP demoServer
Client
IAR
Keil
IAR
Keil
STM3240G-EVAL
AUD demoSource
Sink
IAR
Keil
IAR
Keil
STM3240G-EVAL
FMP demoTarget
Locator
IAR
Keil
IAR
Keil
STM3240G-EVAL
CSCP demoServer
Client
IAR
Keil
IAR
Keil
STM3240G-EVAL
HFP demoAudio gateway
Hands-free unit
IAR
Keil
IAR
Keil
STM3240G-EVAL
HFPAG demoAudio gateway
Hands-free unit
IAR
Keil
IAR
Keil
STM3240G-EVAL
HID demoHost
Device
IAR
Keil
IAR
Keil
STM3240G-EVAL
HOGP demoHost
Device
IAR
Keil
IAR
Keil
STM3240G-EVAL
HRP demoCollector
Sensor
IAR
Keil
IAR
Keil
STM3240G-EVAL
HSP demoAudio gateway
Headset
IAR
Keil
IAR
Keil
STM3240G-EVAL
HTP demoCollector
Thermometer
IAR
Keil
IAR
Keil
STM3240G-EVAL
iBEACON demoServer
Client
IAR
Keil
IAR
Keil
STM3240G-EVAL
MAP demoServer
Client
IAR
Keil
IAR
Keil
STM3240G-EVAL
PASP demoServer
Client
IAR
Keil
IAR
Keil
STM3240G-EVAL
PBAP demoServer
Client
IAR
Keil
IAR
Keil
STM3240G-EVAL
PXP demoServer
Client
IAR
Keil
IAR
Keil
STM3240G-EVAL
SPP demoDevice A
Device B
IAR
Keil
IAR
Keil
STM3240G-EVAL
SPPDMMulti demoServer
Client
IAR
Keil
IAR
Keil
STM3240G-EVAL
SPPLE demoServer
Client
IAR
Keil
IAR
Keil
STM3240G-EVAL

9 Classic Bluetooth Sample Applications

AUD Demo

A3DP Sink Demo

A3DP Source Demo

HFP Demo

HFPAG Demo

HID Demo

HSP Demo

MAP Demo

10 Classic Bluetooth + Bluetooth low energy Applications

PBAP Demo

SPP Demo

SPP + SPPLE Demo

SPPDMMulti Demo

This application is based on the SPP + SPPLE Demo and demonstrates features from Bluetooth specifications 4.1 and 4.2:

The application allows users to establish connections between multiple BLE devices using the SPPLE custom service, send Bluetooth commands, and exchange data over BLE. It also demonstrates using the SPP module and handling SPP callback events, acting as an SPP server or client with the same command set as SPPDemo.

For a step-by-step demonstration, visit the SPPDMMulti demo wiki.

11 Bluetooth low energy Applications

ANP Demo

iBEACON Demo

HRP Demo

HTP Demo

PASP Demo

HOGP Demo

PXP Demo

FMP Demo

CSCP Demo

Revision History

Note: Page numbers for previous revisions may differ from page numbers in the current version.

Changes from November 14, 2016 to February 28, 2017

PDF preview unavailable. Download the PDF instead.

swru498a TopLeaf 8.0.015 iText 2.1.7 by 1T3XT

Related Documents

Preview Texas Instruments CC2652PSIP SimpleLink Multiprotocol 2.4-GHz Wireless MCU Datasheet
Discover the capabilities of the Texas Instruments CC2652PSIP SimpleLink™ Multiprotocol 2.4-GHz Wireless System-in-Package (SiP) MCU. This comprehensive datasheet details its advanced features, diverse applications, precise specifications, and essential development tools, making it ideal for IoT and embedded system design.
Preview Texas Instruments MSP Low-Power Microcontrollers Brochure
A comprehensive overview of Texas Instruments' MSP (Microcontroller) portfolio, focusing on ultra-low-power and low-power plus performance microcontrollers. It details features, applications, development tools, and product families like MSP430 and MSP432.
Preview Developing Bluetooth Low Energy Solutions with TI SimpleLink Ultra Low Power Platform
Discover how to develop efficient Bluetooth Low Energy (BLE) solutions using Texas Instruments' SimpleLink Ultra Low Power Platform, featuring the CC2640 wireless MCU and CC2650 SensorTag. This guide covers key features, development tools, kits, and resources for rapid prototyping and deployment.
Preview CC2652PSIP SimpleLink™ Multiprotocol 2.4-GHz Wireless System-in-Package Datasheet
Datasheet detailing the Texas Instruments CC2652PSIP SimpleLink™ multiprotocol 2.4-GHz wireless System-in-Package (SiP) module. Features include an Arm Cortex-M4F processor, support for Bluetooth 5.2 LE, Zigbee, Thread, and Matter, ultra-low power consumption, integrated power amplifier, and applications in IoT, building automation, and personal electronics.
Preview MSPM0G3507 LaunchPad Development Kit: User Guide
Explore embedded development with the Texas Instruments MSPM0G3507 LaunchPad Development Kit. This guide provides an overview of hardware features, software tools, and resources for microcontroller development.
Preview Migration Guide from STM32 to Arm-Based MSPM0 MCUs
This application note assists with migrating from the STMicroelectronics STM32 platform to the Texas Instruments MSPM0 MCU ecosystem. It covers the MSPM0 development and tool ecosystem, core architecture, peripheral considerations, and software development kit, highlighting differences and leveraging existing STM32 knowledge for quick ramp-up with MSPM0 series MCUs.
Preview CC2652R SimpleLink™ Multiprotocol 2.4 GHz Wireless MCU Datasheet
Datasheet for the Texas Instruments CC2652R SimpleLink™ Multiprotocol 2.4 GHz Wireless MCU. Features an Arm® Cortex®-M4F processor, 2.4 GHz RF transceiver, and support for Bluetooth 5 Low Energy, Zigbee, Thread, and IEEE 802.15.4 for low-power IoT applications.
Preview Texas Instruments Bluetooth Low Energy Beacons Reference Design
A comprehensive reference design from Texas Instruments detailing Bluetooth Low Energy (BLE) beacons, including implementations of Eddystone, iBeacon, and proprietary protocols. It covers system overview, hardware and software setup, testing procedures, and key specifications for applications like asset tracking and micro-location services.