2025-11-02 6:54 PM
Hi there,
As the title suggests, I am working on a new project for my DIY board.
I already created a new inverter board with the board designer. (See the inverter config in the attachment)
I also configured a motor like below:
However, after I merge the inverter and the motor by creating a new project, there are some errors shown:
Question:
1. Can I find some information for the LOG? If yes, where is it?
2. Why can't I select the FOC or six-step algorithm? Is there some wrong configuration?
3. What's the problem with the current sensing?
Thanks for your help!
2025-11-03 2:01 AM
Hello @Junde,
Current sensing topologies for STM32 families are described in the ConnectionParameters.json file located in the "MC_SDK_x.x.x\Utilities\PC_Software\STMCWB\assets" directory of the MCSDK tool.
For the STM32G4 series, the closest available topology is ThreeShunt_RawCurrents_Differential_ExternalGain_FilteredADCInput.
ThreeShunt_RawCurrents_Differential_ExternalGain is not available.
Refer to the board description page for more details.
2025-11-03 6:23 PM
Thanks, @GMA, for your important information.
My hardware doesn't support the "filterADCInput" feature; however, it seems I can reuse the OP out GPIO as ADC input.
In this way, I get the result like below:
Why can't I choose the FOC algorithm after changing the current sensing? Because I reuse the PIN?
My board is designed as above, Is there anyway that I can config the current sensing to compatible my board?
Thans for your help, have a good day.
2025-11-03 11:28 PM
Hello @Junde,
If FOC current sensing topologies are not available, FOC Driving Algorithm will not be presented.
In your snapshot, Filtered ADC input is selected (you mention that this configuration is not available on your hardware).
Refering to ConnectionParameters.json file, for STM32G4 series, you can use ThreeShunt_RawCurrents_Differential_InternalGain with 3 OpAmps (OPAMP1,OPAMP2,OPAMP3), two ADC (ADC1,ADC2) and a shared phase OPAMP3_OUT.