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

Application Events

When a user operation or hardware callback sets an event, the following routines are processed.

Table 4-2 Application Routines and Function
Routine Function
ACTION_UART Process either Bluetooth LE or UART functionality received through user input which was described earlier. Developers can modify this section to determine functionality and user interface.
ACTION_CONTINUE Start the motor by driving to the DRV pin low, setting the minimum duty cycle, initializing the correct motor GPIO states, starting application timers, and opening the PWM TI Driver. This routine is not performed if the PWM TI Driver is already opened.
ACTION_STOP Stop the motor by driving the DRV pin high, resetting the motor GPIO pins, stopping relevant application clocks, and stopping the PWM TI Driver. This also reports out the cause of the stop through UART.
ACTION_HALL After a hall sensor pin callback, reads all hall sensor states and proceeds along the motor commutation table accordingly.
ACTION_PWM Serviced whenever the acceleration clock expires to increment or decrement the duty cycle value until this matches the goal, and then stop the acceleration clock once achieved.