SPRUJH1 August   2025 F29H850TU

 

  1.   1
  2.   Abstract
  3.   Trademarks
  4. 1Introduction
    1. 1.1 Hardware Block Diagram
    2. 1.2 Software Flowchart
    3. 1.3 MCU Resources Used
  5. 2Running the Servo Drive With QEP on TI Hardware
    1. 2.1 Supported Hardware
    2. 2.2 Hardware Setup
      1. 2.2.1 LAUNCHXL-F29H85X Setup
      2. 2.2.2 DAC128S085EVM Setup (Optional)
      3. 2.2.3 BOOSTXL-3PHGANINV Setup
      4. 2.2.4 BOOSTXL-LMG2100-MD Setup
      5. 2.2.5 BP-AMC0106-LMG-MD
      6. 2.2.6 Motor Setup
    3. 2.3 Lab Software
      1. 2.3.1 Software Development Environment
      2. 2.3.2 Project Orginization
      3. 2.3.3 Configuration of the Software
      4. 2.3.4 Debug Interfaces
        1. 2.3.4.1 Datalogging
        2. 2.3.4.2 Digital to Analog Converters
    4. 2.4 Testing the Project in Incremental Steps
      1. 2.4.1 Watch Variables
      2. 2.4.2 Step 1 Hardware Setup Validation
        1. 2.4.2.1 Build, Load and Run Project
      3. 2.4.3 Step 2 Open Loop Control
        1. 2.4.3.1 Build, Load and Run Project
      4. 2.4.4 Step 3 Close the Current Loop
        1. 2.4.4.1 Build, Load and Run Project
      5. 2.4.5 Step 4 Close the Speed and Current Loop
        1. 2.4.5.1 Build and Load Project
  6.   References

Watch Variables

The structure motorVars_M1 has references to most variables that are related to controlling the servo drive. Table 2-6 is a recommended list to populate the CCS watch window.

Note: Code Composer Studio V20.2 does not have a method to export/import the watch window variables. This feature is expected to be implemented in V20.3.
Table 2-6 Watch Variable Overview
Variable Description
motorVars_M1.ISRCount Increments once each motor ISR execution
systemVars.flagEnableSystem Transitions from 0 to 1 automatically
motorVars_M1.flagEnableRunAndIdentify
  • Set to 1 to start the motor after the flagEnableSystem variable is automatically set.
  • Set to 0 to disable the PWMs. The MCU can then be halted.
Note: For build 1 this starts the PWMs for inspection.
motorVars_M1.flagRunIdentAndOnLine Changes to 1 if there are no faults
motorVars_M1.motorState Shows the current state of the motor control such as:
  • MOTOR_STOP_IDLE
  • MOTOR_FAULT_STOP
  • MOTOR_ALIGNMENT
  • MOTOR_OL_START
  • MOTOR_CL_RUNNING
  • MOTOR_CTRL_RUN
motorVars_M1.estimatorMode ESTIMATOR_MODE_ENC for incremental encoder
motorVars_M1.faultMtrUse.all Value is non-zero if there is an over-current fault
motorVars_M1.faultMtrUse.bit Expand and check for fault flags. Of the faults that can turn off the motor, these are currently active. (faultMtrMask applied to faultMtrNow)
motorVars_M1.faultMtrNow.bit Of all possible faults, these are currently active.
motorVars_M1.faultMtrMask.bit Of the possible faults, these are the ones that can turn off the motor.
motorVars_M1.senseData.VdcBus_V The near the DC bus voltage
motorVars_M1.senseData.offset_I
  • Current offset values used for current sensing by the ADC
  • For ADC sensing: 2048 (half of a 12-bit ADC scale value)
  • For SDFM sensing: these are very small numbers
motorVars_M1.speedRef_Hz
  • The reference speed of the motor.
  • Change this variable to increase or decrease the speed.
  • A negative value reverses the direction
  • Not used in build level 1
motorVars_M1.speed_Hz Current spee of the motor. Not used in build level 1.
motorVars_M1.overCurrent_A By decreasing the value, the fault protection by the CMPSS modules can be verified.