MCSDK 6.4.2 - Three Shunt Current Sensing Dual ADC Configuration Issue o
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 NoSolutionI 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 → PA3Questions
- 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)
- Is this ADC topology supported by the Dual ADC current sensing algorithm?
- Is there a recommended way to configure this hardware using Board Designer, or does this configuration require modifications to the generated firmware?
- 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,
