SDAA075 October   2025 CC2340R5

 

  1.   1
  2.   Abstract
  3.   Trademarks
  4. 1Introduction
    1. 1.1 CC2340R5
    2. 1.2 DRV8329A
    3. 1.3 BLDC Motor
  5. 2BLDC Hardware
    1. 2.1 Hardware Setup
      1. 2.1.1 DRV8329AEVM Settings
    2. 2.2 Connection Diagram
  6. 3Running the Example
    1. 3.1 Dependencies
    2. 3.2 Loading Firmware
    3. 3.3 Motor Connection Test
    4. 3.4 BLDC Motor Hall Sensored Trap Operation With Bluetooth® LE
      1. 3.4.1 SimpleLink™ Connect Phone Application
  7. 4Firmware Design
    1. 4.1 Code Flow Description
    2. 4.2 Customized TI Drivers
      1. 4.2.1 PWM
      2. 4.2.2 ADCBuf
      3. 4.2.3 Power
    3. 4.3 Application Events
    4. 4.4 Commutation Table
    5. 4.5 Motor Acceleration
    6. 4.6 ADC Operations
    7. 4.7 Spin Detect Feature
    8. 4.8 Reporting Statistics
    9. 4.9 Bluetooth® LE Stack
  8. 5Tests and Results
  9. 6Summary
  10. 7References

Bluetooth® LE Stack

This example is based on the out-of-box Basic Bluetooth® LE Project and Data Stream Bluetooth LE examples found in the SimpleLink Low Power F3 SDK v8.40. However, the Bluetooth LE profile was heavily modified to accomplish the goals of the project described in this application note. All project functionality not pertaining to the Bluetooth LE stack was handled outside the Bluetooth LE task context, as to not starve the task or risk impacting the Bluetooth LE connection. The device functions as a Bluetooth LE peripheral and advertises using the following parameters, however these are highly configurable. For more information on scanning and advertising in Bluetooth LE, refer to the SimpleLink Academy Scanning and Advertising lab.

Table 4-3 Bluetooth® LE Stack Configurations
Bluetooth® LE Component Value
Advertisement Type Connect Bluetooth LE and scan Bluetooth LE Undirected Advertisements
Primary PHY Interval Min and Max 100ms, 100ms
Primary PHY 1M PHY

Upon receiving a connection established event in the app_connection.c file, the CC2340R5 sends an exchange MTU request to the Bluetooth LE central to increase the maximum size of data that can be sent when interacting with the Bluetooth LE characteristics of the Bluetooth LE profile. To perform this, the max size of PDUs was increased to 255 in the general configurations of the Bluetooth LE stack in the Syscfg file. This was heavily utilized in the throughput test that is discussed in Section 5.