Skip to main content
Associate
June 30, 2026
Question

MCSDK 6.4.2 - Three Shunt Current Sensing Dual ADC Configuration Issue o

  • June 30, 2026
  • 1 reply
  • 7 views

Dear ST Support Team,

I am working on a custom BLDC motor controller using STM32G431CBU6 with STM32 Motor Control SDK 6.4.2 and DRV8316CT motor driver.

I have created custom Control Board and Power Board JSON files using the Motor Control Board Designer. However, I am facing an issue configuring the current sensing topology for FOC.

Hardware Configuration

  • MCU: STM32G431CBU6
  • MCSDK Version: 6.4.2
  • Motor Driver: DRV8316CT
  • Control Algorithm: FOC
  • PWM Configuration: 3-PWM (TIM1)
  • Current Sensing: Three Shunt Resistors (Amplified)

Current sensing connections are:

Signal MCU Pin ADC Function
CURRENT_AMPL_U PA1 ADC1_IN2 / ADC2_IN2
CURRENT_AMPL_V PA2 ADC1_IN3
CURRENT_AMPL_W PA3 ADC1_IN4

Problem

When I configure Three Shunt Resistors, Motor Control Workbench reports the following warnings:

 
CSConnect: ThreeShunt_AmplifiedCurrents DualADCs SharedSignal
CSConnect: ThreeShunt_AmplifiedCurrents DualADCs NoSolution

I investigated the ParameterConnection.json file and found that the DualADCs implementation requires a shared signal.

Since PA1 supports both ADC1_IN2 and ADC2_IN2, I modified my board configuration to make CURRENT_AMPL_U the shared signal.

After this modification, the warnings disappeared, but the generated ADC mapping became:

Channel U : ADC2_IN2 (PA1)
Channel V : ADC1_IN2 / ADC2_IN2 (PA1)
Channel W : ADC1_IN4 (PA3)

This causes both CURRENT_AMPL_U and CURRENT_AMPL_V to be assigned to PA1, which does not match my hardware.

The actual hardware connections are:

CURRENT_AMPL_U → PA1
CURRENT_AMPL_V → PA2
CURRENT_AMPL_W → PA3

Questions

  1. Does MCSDK 6.4.2 support a Three-Shunt current sensing configuration where:
    • CURRENT_AMPL_U → PA1 (ADC1_IN2 / ADC2_IN2)
    • CURRENT_AMPL_V → PA2 (ADC1_IN3 only)
    • CURRENT_AMPL_W → PA3 (ADC1_IN4 only)
  2. Is this ADC topology supported by the Dual ADC current sensing algorithm?
  3. Is there a recommended way to configure this hardware using Board Designer, or does this configuration require modifications to the generated firmware?
  4. If this topology is not supported, what is the recommended current sensing configuration for a custom STM32G431 board with this pin assignment?

I would appreciate any guidance or reference project that demonstrates the correct configuration for this hardware.

Thank you for your support.

Best regards,

1 reply

GMA
ST Technical Moderator
June 30, 2026

Hello,

Refer to ConnectionParameters.json file located in MC_SDK_x.x.x\Utilities\PC_Software\STMCWB\assets directory.
The supported configurations are listed as structures. For current sensing topology:

  "mcus": {
"STM32G4":{
"CurrentSensing": {
"ThreeShunt_AmplifiedCurrents": {
"ADCSignals":[
["CURRENT_AMPL_U", "CURRENT_AMPL_V", "CURRENT_AMPL_W"],
["(ADC[0-9]*)_IN(?!N)"]
],
"swVariant": {
"DualADCs" :{
"sharedPhase": ["CURRENT_AMPL_V"],
"ips": ["All"]
},

On Dual ADC three shunts amplified current, shared phase is expected to be Phase V.
Board Designer tool does not embed these restrictions for the moment, and as mentioned in the release note: “Board designer only guaranties the JSON board description coherency but not the full MCSDK compatibility. Please proceed with the complete generation/compilation flow before going forward with the board description and design”.
You can use the three shunts, 1 ADC topology.

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