SPRAD24 august   2023 AM2631 , AM2632 , AM2632-Q1 , AM2634 , AM2634-Q1 , AM263P4 , AM263P4-Q1

 

  1.   1
  2.   Abstract
  3.   Trademarks
  4. 1Introduction
    1. 1.1 Key System Specifications
  5. 2AM263x Overview
    1. 2.1 AM263x Control Card and Traction System Framework
  6. 3Guide to Running TIDM-02014 Traction Inverter
    1. 3.1 Software Set-up
      1. 3.1.1 Code Composer Studio Project
      2. 3.1.2 Software Structure
    2. 3.2 Create Real Time Debug Interface
      1. 3.2.1 Confirm CCS Features
      2. 3.2.2 Create Target Configuration File
      3. 3.2.3 Add Serial Command Monitor Software
      4. 3.2.4 Launch Real Time Debug
    3. 3.3 Running the Code
      1. 3.3.1 Project Setup
      2. 3.3.2 Running the Application
    4. 3.4 Get Samples From ADC and Read Samples Through CCS
      1. 3.4.1 Register and Enable Interrupt
      2. 3.4.2 Add Log Code to Read Samples in Graph at Fixed Rate
      3. 3.4.3 Read ADC Samples in Expression and Graph Windows
    5. 3.5 Generate Space Vector PWM and Drive Motor in Open Loop
      1. 3.5.1 Setup SVPWM Generator Inputs
      2. 3.5.2 Read SVPWM Duty Cycles in Graph Window
      3. 3.5.3 Power Up Inverter and Spin Motor in Open Loop
    6. 3.6 Close Current Loop With Mock Speed
      1. 3.6.1 Add Transformations and Read Id-Iq in Open Loop
      2. 3.6.2 Add Controllers to Close Current Loop
      3. 3.6.3 Read Id-Iq to Close Current Loop
    7. 3.7 Add Software Resolver to Digital Converter
      1. 3.7.1 Generate Excitation for Resolver Hardware
      2. 3.7.2 Add Resolver Software
      3. 3.7.3 Read Resolver Software Outputs
  7. 4Brief Guide to Code Migration
    1. 4.1 SDK Resources Overview
    2. 4.2 Code Migration From C28
    3. 4.3 Code Migration From AM24
  8. 5Summary
  9. 6References

Running the Application

Run the code by going to Run → Resume or clicking the Resume button in the tool bar. The project can now run and the variables display in the Expressions window. Check the following to confirm the application and hardware set up are working:

  • The green power LEDs on the gate-drive boards must be on. If the gate-drivers are initialized without faults, none of the red, nFault LEDs are on. Gate drive initialization status can be checked through the tripFlagDMC.fault.UCC5880_status variable.
  • Similarly other variables in the tripFlagDMC struct show the status of other faults. If no fault flags are set, to run the test motor, the runMotor can be set to RUN_MOTOR. Your variables need to appear similar to what is shown in Figure.
  • If no faults are detected, the motor1.isrCount must increment continuously.
  • Check the calibration offsets of the motor inverter board. The offset values of the motor phase current sensing values must be equal to approximately half of the scale current of ADC.
  • The PWM output for motor drive can also be probed with an oscilloscope.

You can halt the CPU by first clicking the Suspend button on the toolbar or by selecting Target → Suspend. To run the application from the start again, reset the controller by clicking on the CPU Reset tool bar button or clicking Run → Reset → CPU Reset and then clicking on the Restart button or Run → Restart. You can close the CCS debug session by clicking the Terminate button or by clicking Run → Terminate. This will halt the program and disconnect CCS from the controller.

Note that it is not necessary to terminate the debug session each time you change the code. Instead you can go to Run → Load → Load Program... (or Reload Program... if it is the same file). CCS will also automatically prompts to ask if you want to reload your executable if it detects you have rebuilt it.