Skip to main content
Associate
July 8, 2025
Solved

ADC selection for HSO sensing

  • July 8, 2025
  • 1 reply
  • 245 views

Hello ST

Im trying to generate a HSO compatible FOC board using the STM32G747CEUx but I am not able to select the HSO option for Speed sensing.

I've seen the requirement of using atleast two different ADCs for the current sensor and voltage measurement

Therefor I have assigned ADC1 and ADC2 for current measurement

And ADC3, 4 and 5 for voltage measurement

But I am not getting a solution for this.

Here is my json design file

Thank you

"mcu": "STM32G474CEUx",
 "clockFrequency": 170,
 "motorDrives": [
 {
 "name": "M1",
 "minRatedVoltage": 16.9,
 "maxRatedVoltage": 60,
 "maxRatedCurrent": 80,
 "maxRatedPower": 2000,
 "features": [
 {
 "type": "CurrentSensing",
 "name": "CurrentSensing",
 "hwVariants": [
 {
 "signals": {
 "CURRENT_AMPL_U": [
 {
 "name": "PA0",
 "help": {},
 "cost": 0
 }
 ],
 "CURRENT_AMPL_V": [
 {
 "name": "PA1",
 "help": {},
 "cost": 0
 }
 ],
 "CURRENT_AMPL_W": [
 {
 "name": "PA2",
 "help": {},
 "cost": 0
 }
 ]
 },
 "type": "ThreeShunt_AmplifiedCurrents",
 "cost": 0,
 "amplifyingNetworkImax": 80,
 "amplifyingNetworkPrating": 6,
 "offsetNetworkAttenuation": 0.5,
 "opAmpGain": 60,
 "amplifyingNetworkVm": 3.3,
 "shuntResistor": 0.0005,
 "polarizationOffset": 1.6
 }
 ],
 "tRise": 1
 },
 {
 "type": "PhaseVoltageGeneration",
 "name": "PhaseVoltageGeneration",
 "driverName": "LMG2100",
 "driverPN": "LMG2100",
 "tNoise": 12,
 "minDeadTime": 5,
 "maxSwitchingFreq": 100000,
 "hwVariants": [
 {
 "signals": {
 "PWM_CHU_H": [
 {
 "name": "PA8",
 "help": {},
 "cost": 0
 }
 ],
 "PWM_CHV_H": [
 {
 "name": "PA9",
 "help": {},
 "cost": 0
 }
 ],
 "PWM_CHW_H": [
 {
 "name": "PA10",
 "help": {},
 "cost": 0
 }
 ],
 "PWM_CHU_L": [
 {
 "name": "PA11",
 "help": {},
 "cost": 0
 }
 ],
 "PWM_CHV_L": [
 {
 "name": "PA12",
 "help": {},
 "cost": 0
 }
 ],
 "PWM_CHW_L": [
 {
 "name": "PB15",
 "help": {},
 "cost": 0
 }
 ]
 },
 "type": "DrivingHighAndLowSides",
 "cost": 0,
 "deadTime": 6,
 "highSideSwitchesDrivingPolarity": "Active high",
 "lowSideSwitchesDrivingPolarity": "Active high"
 }
 ]
 },
 {
 "type": "TemperatureSensing",
 "name": "TemperatureSensing",
 "hwVariants": [
 {
 "signals": {
 "TEMPERATURE_NTC": [
 {
 "name": "PB12",
 "help": {},
 "cost": 0
 }
 ]
 },
 "type": "NTCThermistor",
 "cost": 0,
 "v0": 10,
 "gain": 25,
 "t0": 25,
 "maxSensorTemperature": 125
 }
 ]
 },
 {
 "type": "VBusSensing",
 "name": "VBusSensing",
 "hwVariants": [
 {
 "signals": {
 "VBUS": [
 {
 "name": "PA7",
 "help": {},
 "cost": 0
 }
 ]
 },
 "type": "VBusSensing",
 "cost": 0,
 "busVoltageDivider": 0.95,
 "busVoltageDividerR1": 47000,
 "busVoltageDividerR2": 2200
 }
 ],
 "busVoltageDivider": 0.95
 },
 {
 "type": "SpeedAndPositionSensing",
 "name": "SpeedAndPositionSensing",
 "hwVariants": [
 {
 "signals": {
 "BEMF_U": [
 {
 "name": "PB0",
 "help": {},
 "cost": 0
 },
 {
 "name": "PB13",
 "help": {},
 "cost": 0
 }
 ],
 "BEMF_W": [
 {
 "name": "PB1",
 "help": {},
 "cost": 0
 },
 {
 "name": "PB14",
 "help": {},
 "cost": 0
 }
 ],
 "BEMF_V": [
 {
 "name": "PB14",
 "help": {},
 "cost": 0
 },
 {
 "name": "PB0",
 "help": {},
 "cost": 0
 }
 ],
 "BEMF_DIVIDER": [
 {
 "name": "PC4",
 "help": {},
 "cost": 0
 }
 ]
 },
 "type": "BEMFSensingADC",
 "cost": 0,
 "dividingNetworkR1": 47000,
 "dividingNetworkR2": 2200
 }
 ]
 }

 

Best answer by Gael A

Hello Motonaut,

In your board description, I don't see any PhaseVoltageSensing, which is the required structure for voltage measurement in HSO.

The BEMF_X inside SpeedAndPositionSensing is used to define the voltage sensing that is used to estimate the speed and the position of the rotor in 6-STEP algorithm. This is not the same topology for HSO.

You can find the description of the PhaseVoltageSensing on our wiki, or use the Board Designer tool integrated in the MCSDK to describe your board accordingly.

1 reply

Gael A
Gael ABest answer
ST Employee
July 8, 2025

Hello Motonaut,

In your board description, I don't see any PhaseVoltageSensing, which is the required structure for voltage measurement in HSO.

The BEMF_X inside SpeedAndPositionSensing is used to define the voltage sensing that is used to estimate the speed and the position of the rotor in 6-STEP algorithm. This is not the same topology for HSO.

You can find the description of the PhaseVoltageSensing on our wiki, or use the Board Designer tool integrated in the MCSDK to describe your board accordingly.

If you agree with my answer, please consider accepting it by clicking on 'Accept as solution'.Hope this will help,Gaël A.
MotonautAuthor
Associate
July 8, 2025

Thank you

I thought there was no real difference between the back emf measuring and phase voltage measuring, but I guess the back emf only measure during zero crossings or something. Your explaination makes sense.