SLAU927C March   2024  – March 2025 MSPM0G3507

 

  1.   1
  2.   Abstract
  3.   Trademarks
  4. 1Introduction
  5. 2Hardware Setup
    1. 2.1  EVM Hardware Setup
      1. 2.1.1 EVM Hardware Support
    2. 2.2  Pin Configurations for PWM Outputs
    3. 2.3  Pin Configurations for ADC Currents
    4. 2.4  Pin Configurations for IPD Usage
    5. 2.5  Pin Configurations for ADC Voltages
    6. 2.6  Pin Configurations for Faults
    7. 2.7  Pin Configurations for GPIO Output Functions
    8. 2.8  Pin Configurations for SPI Communication
    9. 2.9  Pin Configurations for UART Communication
    10. 2.10 External Connections for Evaluation Boards
  6. 3Software Setup
  7. 4GUI Setup
    1. 4.1 Serial Port Configuration
    2. 4.2 GUI Home Page
    3. 4.3 System Configurations
    4. 4.4 Register Map
    5. 4.5 Motor Tuning Page
    6. 4.6 Collateral Page
    7. 4.7 Loading and Saving register Configurations
  8. 5Register Map
    1. 5.1 Register Map Page in GUI
    2. 5.2 User Control Registers (Base Address = 0x20200400h)
      1. 5.2.1 Speed Control Register (Offset = 0h) [Reset = 00000000h]
      2. 5.2.2 Algo Debug Control 1 Register (Offset = 4h) [Reset = 00000000h]
      3. 5.2.3 Algo Debug Control 2 Register (Offset = 8h) [Reset = 00000000h]
      4. 5.2.4 Algo Debug Control 3 Register (Offset = Ch) [Reset = 00000000h]
      5. 5.2.5 DAC Configuration Register (Offset = 10h) [Reset = 00000000h]
    3. 5.3 User Input Registers (Base Address = 0x20200000h)
      1. 5.3.1  SYSTEM_PARAMETERS (Offset = 0h)
      2. 5.3.2  ISD_CONFIG Register (Offset = 38h) [Reset = 00000000h]
      3. 5.3.3  RVS_DRV_CONFIG Register (Offset = 3Ch) [Reset = 00000000h]
      4. 5.3.4  MOTOR_STARTUP1 Register (Offset = 40h) [Reset = 00000000h]
      5. 5.3.5  MOTOR_STARTUP2 Register (Offset = 44h) [Reset = 00000000h]
      6. 5.3.6  CLOSED_LOOP1 Register (Offset = 48h) [Reset = 00000000h]
      7. 5.3.7  CLOSED_LOOP2 Register (Offset = 4Ch) [Reset = 00000000h]
      8. 5.3.8  FIELD_CTRL Register (Offset = 50h) [Reset = 00000000h]
      9. 5.3.9  FAULT_CONFIG1 Register (Offset = 54h) [Reset = 00000000h]
      10. 5.3.10 FAULT_CONFIG2 Register (Offset = 58h) [Reset = 00000000h]
      11. 5.3.11 MISC_ALGO Register (Offset = 5Ch) [Reset = 00000000h]
      12. 5.3.12 PIN_CONFIG Register (Offset = 60h) [Reset = 00000000h]
      13. 5.3.13 PERI_CONFIG Register (Offset = 64h) [Reset = 00000000h]
    4. 5.4 User Status Registers (Base Address = 0x20200430h)
  9. 6Basic Tuning
    1. 6.1 System Configuration Parameters
      1. 6.1.1 Configuring System Parameters From GUI
      2. 6.1.2 Motor Resistance in Milliohms (mΩ)
      3. 6.1.3 Motor Inductance in Microhenries (μH)
      4. 6.1.4 Saliency of IPMSM Motor
      5. 6.1.5 Motor BEMF Constant
      6. 6.1.6 Base Voltage (V)
      7. 6.1.7 Base Current (A)
      8. 6.1.8 Maximum Motor Electrical Speed (Hz)
      9. 6.1.9 Maximum Motor Power(W)
    2. 6.2 Control Configurations for Basic Motor Spinning
      1. 6.2.1 Basic Motor Startup
        1. 6.2.1.1 Disable ISD
        2. 6.2.1.2 Motor Start Option - Align
        3. 6.2.1.3 Motor Open Loop Ramp
        4. 6.2.1.4 Motor Open Loop Debug
      2. 6.2.2 Controller Configuration for spinning the Motor in Closed Loop
        1. 6.2.2.1 PI Controller Tuning for Closed Loop Speed Control
          1. 6.2.2.1.1 Current Controller Tuning
          2. 6.2.2.1.2 Speed Controller Tuning
        2. 6.2.2.2 Testing for Successful Startup Into Closed Loop
    3. 6.3 Fault Handling
      1. 6.3.1 Abnormal BEMF Fault [ABN_BEMF]
      2. 6.3.2 Monitoring Power Supply Voltage Fluctuations for Voltage Out of Bound Faults
      3. 6.3.3 No Motor Fault [NO_MTR]
  10. 7Advanced Tuning
    1. 7.1 Control Configurations Tuning
      1. 7.1.1  Control Mode of Operation
        1. 7.1.1.1 Closed Loop Speed Control Mode
        2. 7.1.1.2 Closed Loop Power Control Mode
        3. 7.1.1.3 Closed Loop Torque Control Mode
        4. 7.1.1.4 Voltage Control Mode
      2. 7.1.2  Initial Speed Detection of the Motor for Reliable Motor Resynchronization
      3. 7.1.3  Unidirectional Motor Drive Detecting Backward Spin
      4. 7.1.4  Preventing Back Spin of Rotor During Startup
        1. 7.1.4.1 Option 1: IPD
        2. 7.1.4.2 Option 2: Slow First Cycle
      5. 7.1.5  Gradual and Smooth Start up Motion
      6. 7.1.6  Faster Startup Timing
        1. 7.1.6.1 Option 1: Initial Position Detection (IPD)
        2. 7.1.6.2 Option 2: Slow First Cycle
      7. 7.1.7  Stopping Motor Quickly
      8. 7.1.8  Flux Weakening: Operating Motor at Speeds Higher than Rated Speed
      9. 7.1.9  Maximum Torque Per Ampere : Improve Efficiency of IPMSM Motors
      10. 7.1.10 Preventing Supply Voltage Overshoot During Motor Stop.
      11. 7.1.11 Protecting the Power Supply
      12. 7.1.12 FOC Bandwidth Selection
  11. 8Hardware Configurations
    1. 8.1 Direction Configuration
    2. 8.2 Brake Configuration
    3. 8.3 Main.h Definitions
      1. 8.3.1 Sense Amplifier Configuration
      2. 8.3.2 Driver Propagation Delay
      3. 8.3.3 Driver Min On Time
      4. 8.3.4 Current Shunt Configuration Selection
        1. 8.3.4.1 Three Shunt Configurations
        2. 8.3.4.2 Dual Shunt Configuration
        3. 8.3.4.3 Single Shunt Configuration
      5. 8.3.5 CSA Offset Scaling Factor Selection
    4. 8.4 Real Time Variable Tracking
  12. 9Revision History

User Status Registers (Base Address = 0x20200430h)

User Status Registers are set of consolidated variables available for user to read the Motor status and analyze the control performance.

Below are the set of Status Registers that can be imported in the CCS expression window using structure pointer pUserStatusRegs.


 User Status Registers in CCS
                    Debug Mode

Figure 5-5 User Status Registers in CCS Debug Mode

Table 5-36 lists the definitions of variables available for monitoring.

Table 5-36 User Status Registers
Variables Type Reset Value Description
SYSTEM_FAULT_STATUS USER_FAULT_TYPES NO_FAULT Defines the status of motor faults.

MOTOR_STALL : Indicates motor lock faults - abnormal BEMF, no motor, abnormal speed

VOLTAGE_OUT_OF_BOUNDS:Indicates undervoltage or overvoltage.

LOAD_STALL:Indicates IPD fault.

HARDWARE_OVER_CURRENT:Indicates DC bus current limit fault

HV_DIE: Indicates gate driver fault if applicable.

MOTOR_STATE MOTOR_STATE_TYPE MOTOR_IDLE Defines the state of Current Motor Running Status

MOTOR_IDLE : Motor Idle State

MOTOR_ISD : Motor in Initial Speed Detection state

MOTOR_TRISTATE : Motor in Tristate or Hi-Z mode.

MOTOR_BRAKE_ON_START : Motor Brake during Start up.

MOTOR_IPD : Motor in Initial position Detection

MOTOR_SLOW_FIRST_CYCLE : Motor in Slow First Cycle Startup Method.

MOTOR_ALIGN : Motor in Align Start State

MOTOR_OPEN_LOOP : Motor in openloop ramp up state.

MOTOR_CLOSE_LOOP_UNALIGNED : Motor in Closed loop run State with Angle unaligned

MOTOR_CLOSE_LOOP_ALIGNED: Motor in closed loop run state aligned angle.

MOTOR_SOFT_STOP : Motor in Stop state

MOTOR_BRAKE_ON_STOP Motor in Brake stop state

MOTOR_FAULT Motor in Motor Fault State
V_DQ_FILT IQ GLOBAL 27 IQ27(0) Indicates the filtered Vd and Vq applied to the motor. Output of current PI controllers.
I_DQ_PI IQ GLOBAL 27 IQ27(0) Indicates the Kp and Ki values of current PI controllers.
PI_SPEED IQ GLOBAL 27 IQ27(0) Indicates the reference and feedback values of speed PI controller set by FOC algorithm in PU.
PI_POWER IQ GLOBAL 27 IQ27(0) Indicates the reference and feedback values of Power PI controller set by FOC algorithm in PU.
PI_ID IQ GLOBAL 27 IQ27(0) Indicates the reference and feedback values of direct current PI controller set by FOC algorithm in PU.
PI_IQ IQ GLOBAL 27 IQ27(0) Indicates the reference and feedback values of quadrature current PI controller set by FOC algorithm in PU.
IPD_IDENTIFIED_SECTOR COMMUTATION_STATE 0b Indicates the IPD identified nearest rotor state.
ESTIMATED_SPEED IQ GLOBAL 27 IQ27(0) Indicates the motor speed in PU estimated by the FOC observer algorithm.
DC_BUS_VOLTAGE IQ GLOBAL 27 IQ27(0) Indicates the DC bus voltage value in PU
TORQUE_LIMIT IQ GLOBAL 27 IQ27(0) Indicates the quadrature current controller saturation limit set by FOC. This value is based on the limit set in ClosedLoop1 configuration.
GATE_DRIVER_FAULT_STATUS Unsigned Int 0x00000000h Defines the Index of Gate Driver Specific faults as defined in gateDriverLib.
CONTROLLER_FAULT_STATUS Unsigned Int 0x00000000h Defines the Index of FOC Control Algorithm Specific Faults as defined in main.h.
APP_VERSION Unsigned hex 0x00000000h Defines the Version number of Application Firmware