SLAU927 March   2024 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 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
    1. 3.1 Software Support
  7. 4GUI Setup
  8. 5Register Map
    1. 5.1 User Control Registers (Base Address = 0x202000C8h)
    2. 5.2 User Input Registers (Base Address = 0x20200000h)
  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 Motor BEMF Constant
      5. 6.1.5 Base Voltage (V)
      6. 6.1.6 Base Current (A)
      7. 6.1.7 Maximum Motor Electrical Speed (Hz)
    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
        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 Initial Speed Detection of the Motor for Reliable Motor Resynchronization
      2. 7.1.2 Unidirectional Motor Drive Detecting Backward Spin
      3. 7.1.3 Preventing Back Spin of Rotor During Startup
      4. 7.1.4 Gradual and Smooth Start up Motion
      5. 7.1.5 Faster Startup Timing
      6. 7.1.6 Stopping Motor Quickly
      7. 7.1.7 Preventing Supply Voltage Overshoot During Motor Stop.
      8. 7.1.8 Protecting the Power supply
    2. 7.2 Hardware Configurations
      1. 7.2.1 Direction Configuration
      2. 7.2.2 Brake Configuration
      3. 7.2.3 Real Time Variable Tracking
  11. 8Revision History

Real Time Variable Tracking

32-bit algorithm variables can be output in real time from the MCU through the DAC. DAC output is enabled by setting DAC_EN = 1. The DAC in MSPM0 is 12 bit, thus a scaling needs to be applied before output. User has two ways to scale the variable before output.

  • For variables in global IQ format(IQ27):

    DAC_OUTPUT_VOLTAGE = (VARIABLE_VALUE × DAC_SCALING_FACTOR + 1) × 1.65V

    In the above eqaution setting the DAC_SCALING_FACTOR to 1 enables user to represent a data of IQ(1.0) to IQ(-1.0) in between 0 - 3.3V. To represent the data exceeding the value 1.0 use higher DAC_SCALING_FACTOR.

    For Example: To represent a data from -2.0 to +2.0 , set the DAC_SCALING_FACTOR to 0.5.

  • For variables in other IQformat:

    For output of any other IQ, user can left shit or right shift the variable to bring the data in a 12 bit range before output.This mode is selected by setting DAC_SCALING_FACTOR to 0.

    If variable value is less than a 12-bit value, set DAC_SCALE to positive, the DAC output follows as below:

    DAC_OUTPUT_VOLTAGE = (VARIABLE_VALUE << DAC_SCALE) × 3.3V

    If variable value is greater than a 12-bit value, set DAC_SCALE to negative, the DAC output follows as below

    DAC_OUTPUT_VOLTAGE = (VARIABLE_VALUE >> DAC_SCALE) × 3.3V

    Note: Settings DAC_EN = 1 feeds the variable output to the DAC registers, but user needs to enable the DAC peripheral in TI Sysconfig for the DAC peripheral to function. Also make sure the DAC output pin is not loaded by any other peripheral.

Table 7-1 Address Table for DAC Monitoring
Variable Address
A phase current 0x202001B0
B phase current 0x202001B4
C phase current 0x202001B8
A phase current raw ADC value 0x202001BC
B phase current raw ADC value 0x202001C0
C phase current raw ADC value 0x202001C4
A phase voltage 0x20200208
B phase voltage 0x2020020C
C phase voltage 0x20200210
A phase voltage raw ADC value 0x20200214
B phase voltage raw ADC value 0x20200218
C phase voltage raw ADC value 0x2020021C
D axis current 0x202002D0
Q axis current 0x202002D4
D axis voltage 0x202002D8
Q axis voltage 0x202002DC
Estimated motor velocity filtered 0x20200700
Estimated rotor angle 0x20200708
SVM ouput duty A phase 0x202002A4
SVM ouput duty B phase 0x202002A8
SVM ouput duty C phase 0x202002AC