Skip to main content
Associate
August 23, 2025
Question

Facing an error when using MCSDK 6.4.1

  • August 23, 2025
  • 1 reply
  • 795 views
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

1 reply

GMA
Technical Moderator
August 25, 2025

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
一hangAuthor
Associate
August 25, 2025
{
 "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": []
}
GMA
Technical Moderator
August 25, 2025

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