cancel
Showing results for 
Search instead for 
Did you mean: 

Facing an error when using MCSDK 6.4.1

一hang
Associate II
Hello,
I encountered an error when using MCSDK 6.4.1 (Motor Control Software Development Kit 6.4.1) to configure the STM32G431VBT for using the three-resistor internal operational amplifier and performing external differential gain sampling. I would like to ask how to resolve this issue.
hang_0-1755912335348.png

The following images show my configuration process:

 
hang_13-1755913014045.pnghang_14-1755913036144.pnghang_15-1755913047945.pnghang_17-1755913095494.pnghang_18-1755913111882.png
5 REPLIES 5
GMA
ST Employee

Hello @一hang.,

Can you share your board description .json file?

If you agree with the answer, please accept it by clicking on 'Accept as solution'.
Best regards.
GMA
{
  "type": "inverter",
  "contentVersion": "1.0",
  "descVersion": 4,
  "name": "test",
  "PN": "test",
  "algorithmCompatibility": [
    "FOC"
  ],
  "mcu": "STM32G431VBTx",
  "clockSource": "24_crystal",
  "clockFrequency": 170,
  "motorDrives": [
    {
      "name": "M1",
      "minRatedVoltage": 15,
      "maxRatedVoltage": 60,
      "maxRatedPower": 200,
      "maxRatedCurrent": 10,
      "features": [
        {
          "type": "CurrentSensing",
          "name": "CurrentSensing",
          "tRise": 620,
          "hwVariants": [
            {
              "signals": {
                "CURRENT_SHUNT_UP": [
                  {
                    "name": "PA1",
                    "help": {},
                    "cost": 0
                  }
                ],
                "CURRENT_SHUNT_VP": [
                  {
                    "name": "PA7",
                    "help": {},
                    "cost": 0
                  }
                ],
                "CURRENT_SHUNT_WP": [
                  {
                    "name": "PB0",
                    "help": {},
                    "cost": 0
                  }
                ],
                "CURRENT_SHUNT_UN": [
                  {
                    "name": "PA3",
                    "help": {},
                    "cost": 0
                  }
                ],
                "CURRENT_SHUNT_VN": [
                  {
                    "name": "PA5",
                    "help": {},
                    "cost": 0
                  }
                ],
                "CURRENT_SHUNT_WN": [
                  {
                    "name": "PB2",
                    "help": {},
                    "cost": 0
                  }
                ],
                "CURRENT_AMPL_U": [
                  {
                    "name": "PA2",
                    "help": {},
                    "cost": 0
                  }
                ],
                "CURRENT_AMPL_V": [
                  {
                    "name": "PA6",
                    "help": {},
                    "cost": 0
                  }
                ],
                "CURRENT_AMPL_W": [
                  {
                    "name": "PB1",
                    "help": {},
                    "cost": 0
                  }
                ]
              },
              "type": "ThreeShunt_RawCurrents_Differential_ExternalGain",
              "cost": 0,
              "amplifyingNetworkImax": 10,
              "amplifyingNetworkVm": 3.3,
              "offsetNetworkAttenuation": 0.909,
              "polarizationOffset": 1.65,
              "shuntResistor": 0.05,
              "opAmpGain": 11,
              "amplifyingNetworkPrating": 1
            }
          ]
        },
        {
          "type": "PhaseVoltageGeneration",
          "name": "PhaseVoltageGeneration",
          "driverName": "TEST",
          "driverPN": "TEST",
          "minDeadTime": 700,
          "tNoise": 800,
          "maxSwitchingFreq": 32,
          "hwVariants": [
            {
              "signals": {
                "PWM_CHU_H": [
                  {
                    "name": "PE9",
                    "help": {},
                    "cost": 0
                  }
                ],
                "PWM_CHV_H": [
                  {
                    "name": "PE11",
                    "help": {},
                    "cost": 0
                  }
                ],
                "PWM_CHW_H": [
                  {
                    "name": "PE13",
                    "help": {},
                    "cost": 0
                  }
                ],
                "PWM_CHU_L": [
                  {
                    "name": "PE8",
                    "help": {},
                    "cost": 0
                  }
                ],
                "PWM_CHV_L": [
                  {
                    "name": "PE10",
                    "help": {},
                    "cost": 0
                  }
                ],
                "PWM_CHW_L": [
                  {
                    "name": "PE12",
                    "help": {},
                    "cost": 0
                  }
                ]
              },
              "type": "DrivingHighAndLowSides",
              "cost": 0,
              "deadTime": 700,
              "lowSideSwitchesDrivingPolarity": "Active high",
              "highSideSwitchesDrivingPolarity": "Active high"
            }
          ]
        }
      ]
    }
  ],
  "features": []
}

Hello @一hang,

For the current MCSDK implementation, only ThreeShunt_RawCurrents_Differential_ExternalGain_FilteredADCInput is supported on the STM32G4 series.
The description of the current sensing feature is available here.

If you agree with the answer, please accept it by clicking on 'Accept as solution'.
Best regards.
GMA
Hello,

That means in the graphical configuration of MCSDK 6.4.1, it is not possible to configure the Three-Resistor Shunt Differential Internal Op-Amp with External Gain (ThreeShunt_RawCurrents_Differential_ExternalGain), right?

If I want to use ThreeShunt_RawCurrents_Differential_ExternalGain, do I have to modify the software by myself to configure it?

Hello @一hang,

As the ThreeShunt_RawCurrents_Differential_ExternalGain topology is not supported, you must generate a project with a supported topology and modify the generated firmware.
If your purpose is to use the HSO Speed Sensor Mode, it is recommended to use the ThreeShunt_RawCurrents_Differential_ExternalGain_FilteredADCInput topology.

If you agree with the answer, please accept it by clicking on 'Accept as solution'.
Best regards.
GMA