SDAA116 October   2025 CC2340R5

 

  1.   1
  2.   Abstract
  3.   Trademarks
  4. 1Introduction
    1. 1.1 CC2340R5
    2. 1.2 DRV8251A
    3. 1.3 BDC Motor
    4. 1.4 TMAG5213
  5. 2BDC Application
    1. 2.1 Hardware Setup
      1. 2.1.1 DRV8251AEVM Settings
    2. 2.2 Connection Diagram
  6. 3Running the Example
    1. 3.1 Dependencies
    2. 3.2 Loading Firmware
    3. 3.3 Zigbee Network Formation
  7. 4Firmware Design
    1. 4.1 Code Flow Description
    2. 4.2 LaunchPad Button Functionality
    3. 4.3 Non-Volatile Memory
    4. 4.4 Bidirectional PWM Motor Control
    5. 4.5 ADC Overcurrent Protection Feature
    6. 4.6 Hall-Effect Based Motor Position Tracking Feature with Configurable Endpoints
    7. 4.7 Logging Functionality
    8. 4.8 Interoperability with Third-Party Smart Hub Devices
  8. 5Tests and Results
    1. 5.1 PWM and Hall-effect Signal Analysis
    2. 5.2 Power Consumption Analysis with EnergyTrace™
  9. 6Summary
  10. 7References

LaunchPad Button Functionality

To interact with the BDC motor of the device window covering locally, pushbutton operations are implemented for several events which allow the user to configure the motor endpoints and rotate the motor clockwise or counter-clockwise. This table summarizes those events.

Table 4-2 LaunchPad Button Operation for BDC Motor
Button Operation BTN-1 Function BTN-2 Function
Double Click Set high endpoint for current position Set low endpoint for current position
Single Click Move until reached high endpoint location (USE_HALL defined) or movement timeout (USE_HALL not defined) Move until reached low endpoint location (USE_HALL defined) or movement timeout (USE_HALL not defined)
Pressed Down Move up continuously until released Move down continuously until released

When USE_HALL is defined, TI recommends that users rotate the motor manually (that is, button press) and set endpoints (that is, button double clicks) before using Zigbee or single button click commands to control the motor position. When USE_HALL is not defined, a single click only moves in the desired direction for MOVEMENT_TIME.