SLAU958A January   2025  â€“ 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  Peripheral Configurations for IPD Usage
    3. 2.3  Pin Configurations for PWM Outputs
    4. 2.4  Pin Configurations for ADC Currents
    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 = 3Ch) [Reset = 00000000h]
      3. 5.3.3  MOTOR_STARTUP1 Register (Offset = 40h) [Reset = 00000000h]
      4. 5.3.4  MOTOR_STARTUP2 Register (Offset = 44h) [Reset = 00000000h]
      5. 5.3.5  CLOSED_LOOP1 Register (Offset = 48h) [Reset = 00000000h]
      6. 5.3.6  CLOSED_LOOP2 Register (Offset = 4Ch) [Reset = 00000000h]
      7. 5.3.7  FIELD_CTRL Register (Offset = 50h) [Reset = 00000000h]
      8. 5.3.8  FAULT_CONFIG1 Register (Offset = 54h) [Reset = 00000000h]
      9. 5.3.9  FAULT_CONFIG2 Register (Offset = 58h) [Reset = 00000000h]
      10. 5.3.10 MISC_ALGO Register (Offset = 5Ch) [Reset = 00000000h]
      11. 5.3.11 PIN_CONFIG Register (Offset = 60h) [Reset = 00000000h]
      12. 5.3.12 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 BEMF estimation for Sensorless Rotor Position detection
          1. 6.2.2.1.1 Enhanced Sliding Mode Observer
          2. 6.2.2.1.2 Finite BEMF Estimation Based on Motor model
        2. 6.2.2.2 Rotor Position and Speed Estimation With PLL
        3. 6.2.2.3 PI Controller Tuning for Closed Loop Speed Control
          1. 6.2.2.3.1 Current Loop PI Tuning
          2. 6.2.2.3.2 Speed Controller Tuning
        4. 6.2.2.4 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

CLOSED_LOOP1 Register (Offset = 48h) [Reset = 00000000h]

Table 5-28 shows the register to configure close loop settings1.

Table 5-28 CLOSED_LOOP1 Register Field Descriptions
BitFieldTypeResetDescription
31-30RESERVEDR/W0hReserved
29-28CONTROL_MODER/W0h

FOC Closed loop Mode of operation

0h = Closed Loop Speed Control

1h = Closed Loop Power Control

2h = Closed Loop Torque Control

3h = Voltage Control mode.

27HIGH_FREQ_FOC_ENR/W0b

Enable /Disable High FOC Sampling rate. Higher the Sampling rate, lower the CPU bandwidth available for other tasks.

0h = High Frequency FOC Enable.(Max FOC Frequency 16KHz)

1h = High Frequency FOC Disable(Max FOC Frequency 8KHz)

26-22ILIMITR/W0hCurrent limit in Closed loop Torque Mode and Closed loop Speed control in % of CURRENT_BASE

0h = 7.5%

1h = 8.0%

2h = 8.5%

3h = 9.0%

4h = 9.5%

5h = 10%

6h = 11%

7h = 12%

8h = 13%

9h = 14%

Ah = 15%

Bh = 16%

Ch = 17%

Dh = 18%

Eh = 20%

Fh = 22.5%

10h = 25%

11h = 27.5%

12h = 30%

13h = 35%

14h = 40%

15h = 45%

16h = 50%

17h = 55%

18h = 60%

19h = 70%

1Ah = 75%

1Bh = 80%

1Ch = 85%

1Dh = 90%

1Eh = 95%

1Fh = 100%

21-20MTR_STOPR/W00b Motor stop method

0h = Hi-z

1h = Active spin down

2h = Braking

3h = Reserved

19OVERMODULATION_
ENABLE
R/W0b

Overmodulation enable

0h = Disable Over Modulation

1h = Enable Over Modulation

18-14CL_ACCR/W0h Closed loop acceleration

0h = 0.5Hz/s

1h = 1Hz/s

2h = 2.5Hz/s

3h = 5Hz/s

4h = 7.5Hz/s

5h = 10Hz/s

6h = 20Hz/s

7h = 40Hz/s

8h = 60Hz/s

9h = 80Hz/s

Ah = 100Hz/s

Bh = 200Hz/s

Ch = 300Hz/s

Dh = 400Hz/s

Eh = 500Hz/s

Fh = 600Hz/s

10h = 700Hz/s

11h = 800Hz/s

12h = 900Hz/s

13h = 1000Hz/s

14h = 2000Hz/s

15h = 4000Hz/s

16h = 6000Hz/s

17h = 8000Hz/s

18h = 10000Hz/s

19h = 20000Hz/s

1Ah = 30000Hz/s

1Bh = 40000Hz/s

1Ch = 50000Hz/s

1Dh = 60000Hz/s

1Eh = 70000Hz/s

1Fh = No limit

13CL_DEC_CONFIGR/W0h Closed loop deceleration configuration

0h = Closed loop deceleration defined by CL_DEC

1h = Closed loop deceleration defined by CL_ACC

12-8CL_DECR/W0h Closed loop deceleration. This register is used only if AVS is disabled and CL_DEC_CONFIG is set to '0'

0h = 0.5Hz/s

1h = 1Hz/s

2h = 2.5Hz/s

3h = 5Hz/s

4h = 7.5Hz/s

5h = 10Hz/s

6h = 20Hz/s

7h = 40Hz/s

8h = 60Hz/s

9h = 80Hz/s

Ah = 100Hz/s

Bh = 200Hz/s

Ch = 300Hz/s

Dh = 400Hz/s

Eh = 500Hz/s

Fh = 600Hz/s

10h = 700Hz/s

11h = 800Hz/s

12h = 900Hz/s

13h = 1000Hz/s

14h = 2000Hz/s

15h = 4000Hz/s

16h = 6000Hz/s

17h = 8000Hz/s

18h = 10000Hz/s

19h = 20000Hz/s

1Ah = 30000Hz/s

1Bh = 40000Hz/s

1Ch = 50000Hz/s

1Dh = 60000Hz/s

1Eh = 70000Hz/s

1Fh = No limit

7-8PWM_FREQ_OUTR/W0h Output PWM switching frequency

0h = 5kHz

1h = 10kHz

2h = 16kHz

3h = 20kHz

4h = 25kHz

5h = 32kHz

6h = 40kHz

7h = 48kHz

8h = 50kHz

9h = 64kHz

Ah = 80kHz

Bh = N/A

Ch = N/A

Dh = N/A

Eh = N/A

Fh = N/A

14PWM_MODER/W0b PWM modulation

0h = Continuous Space Vector Modulation

1h = Discontinuous Space Vector Modulation

3AVS_ENR/W0b AVS enable

0h = Disable

1h = Enable

2RESERVEDR0bReserved
1SPEED_LOOP_DISR/W0b Speed loop disable

0h = Enable

1h = Disable