Skip to main content
Associate II
June 10, 2026
Question

STM32F405RGT6 Support in MCSDK Workbench for 48V BLDC Motor Control

  • June 10, 2026
  • 15 replies
  • 272 views

Hello ST Community,

I am working on a BLDC motor control project and would like to use STM32 Motor Control SDK (MCSDK) Workbench to generate firmware.

My Hardware Configuration
Motor Type: BLDC
Motor Voltage: 48V
MCU: STM32F405RGT6
Issue

When creating a new project in MCSDK Workbench, I cannot find my exact board/MCU configuration in the board selection list. Since the STM32F405RGT6 board is not available in the predefined options, I am unable to proceed with the standard project generation workflow.

Questions
Is STM32F405RGT6 officially supported by MCSDK Workbench?
If yes, how can I create a project for this MCU when it is not listed in the board selection menu?
Is there a way to add a custom board definition?
Where can I obtain the required board configuration/JSON file (if available)?
Can an existing board configuration be modified to support STM32F405RGT6?
If MCSDK does support this MCU, what is the recommended procedure for configuring:
PWM generation
Current sensing
Hall sensors / Sensorless control
BLDC motor parameters
Are there any example projects available for STM32F405RGT6 motor control using MCSDK?
Additional Information

My goal is to control a 48V BLDC motor using STM32F405RGT6 and generate the motor-control firmware through MCSDK Workbench rather than developing the entire control stack manually.

Any guidance regarding custom board support, JSON configuration files, or alternative approaches would be greatly appreciated. 

How to import MCU json file MCSDK 6.4.2. Give  Reference Manual.

Thank you.

Veerapandiyan V

15 replies

PANDI902Author
Associate II
June 12, 2026

Hi Team,
I am waiting for your reply.

Regards,
Veerapandiyan V.

PANDI902Author
Associate II
June 22, 2026

Hi Team,


I am waiting for your reply.

Regards,
Veerapandiyan V.

PANDI902Author
Associate II
June 30, 2026

Hi Team,
I am waiting for your reply.
Regards,
Veerapandiyan V.

GMA
ST Technical Moderator
June 30, 2026

Hello ​@PANDI902,

The list of microcontrollers (MCUs) that the MCSDK supports is defined in the release note document available through Workbench tool > About > Documentations > Documentation.

The attached STM32F405RGTx.json microcontroller (MCU) description file must be copied to ~\.st_workbench\hardware\mcu.

Define the control board description file by using the STMCBoardDesigner tool available in the MCSDK suite. It is possible to start by cloning an available control board.

 

If you agree with the answer, please accept it by clicking on 'Best answer'.Best regards.GMA
Visitor II
July 17, 2026

Hello, I have copied the attached STM32F405RGTx.json microcontroller (MCU) description file to ~\.st_workbench\hardware\mcu. I also created a new inverter project using MotorControl Workbench 6.4.2, yet the code generation failed as shown in the figure below. Looking forward to your reply.

PANDI902Author
Associate II
July 20, 2026

Hello,

I have also tried implementing a 48V BLDC motor control project using the STM32F405RGT6, and I am currently facing a similar issue. While generating the motor drive code using the custom STM32F405RGTx.json configuration, I am getting errors and the code generation is failing.

I would like to clarify a few points:

  1. Are you also working on a BLDC motor control project using STM32F405RGT6?
  2. Are you using Hall sensor-based control or FOC (Field-Oriented Control)?
  3. If you are using Hall-based control, could you please share your code or approach?
  4. Have you observed any noise issues during motor operation? If yes, how did you resolve them?

Looking forward to your response.

Thank you.

GMA
ST Technical Moderator
July 22, 2026

Hello ​@PANDI902,

Unfortunately, for the STM32F4 series, adding the microcontroller (MCU) description file is not sufficient. Another method can generate a motor control project for an unsupported MCU. In the MC Workbench tool, generate a project for the supported NUCLEO-F401RE control board.

In the STM32CubeMX tool, perform the following steps:

  1. Create a new project with STM32F405RG.
  2. On the File menu, select Import Project, and then load the NUCLEO-F401RE .ioc file.
  3. Save the project.

Copy the NUCLEO-F401RE project ftl directory to the STM32F405RG project folder. In the STM32CubeMX tool, generate code for STM32F405RG. Adapt the generated project to the target configuration.

If you agree with the answer, please accept it by clicking on 'Best answer'.Best regards.GMA
PANDI902Author
Associate II
July 24, 2026

Hello,

Thank you for your guidance.

I have a few follow-up questions regarding the implementation:

  1. I am using a 3-shunt current sensing method, but in MC Workbench it shows only single current sensing for the selected configuration. How can I modify the project to support 3-shunt current sensing after generating the code?

  2. The PWM pin configuration in the generated project is different from my hardware design. What is the recommended way to remap or modify the PWM pins for STM32F405RG after importing the project?

  3. I am not using the STM32 motor control power/driver board. My hardware setup uses DRV8301 gate driver with parallel IRF7749 MOSFETs. What changes are required in the generated project to adapt it to this custom hardware?

  4. I am using a 48V BLDC motor, but MC Workbench mainly shows PMSM motor configuration. How should I proceed with BLDC (trapezoidal / Hall-based) control using this setup?

Your suggestions would be very helpful for proceeding further.

Thank you.


Regards,
Veerapandiyan V.

GMA
ST Technical Moderator
July 29, 2026

Hello ​@PANDI902,

Update the NUCLEO-F401RE board with the MCSDK Board Designer tool to connect the three current-sensing signals to an MCU ADC (single ADC or dual ADC with shared phase V).

Use the STM32CubeMX tool to remap or modify the PWM pins.

For trapezoidal or Hall-based control, refer to the Six-step Firmware Algorithm User Manual chapter.

 

If you agree with the answer, please accept it by clicking on 'Best answer'.Best regards.GMA
PANDI902Author
Associate II
July 29, 2026

Hello,

Thank you for the update.

I have one more clarification regarding my hardware setup:

My driver hardware (DRV8301 + external MOSFETs) does not have a BEMF (Back-EMF) sensing pin available. However, in the reference driver board design, BEMF sensing is included.

In my case, I am planning to use Hall sensor-based (trapezoidal) control. Is BEMF sensing mandatory for this method, or can I proceed without using any BEMF feedback?

If BEMF is not required, could you please confirm whether Hall sensor inputs alone are sufficient for stable motor control in this configuration?

Looking forward to your guidance.

Thank you.

Visitor
August 3, 2026

Short answer: no, not just because they land on the same physical pin.

On STM32G0 (like G4/F3), a pin's alternate function selector only lets you pick one AF at a time. Comparator output and USART RX are two separate alternate functions sharing that pin position, so you can only enable one AF number in the port's AFR register at any moment, not both simultaneously. There's no internal crossbar that connects COMP output directly into the USART RX line just because they happen to share a pad.

This exact question was tested on the STM32 forums for a comparator driving a USART RX where both landed on the same pin. The result, confirmed against the reference manual's internal-connection tables, was that the two alternate functions on that pin can't be active at once through the mux alone. The workaround people use is to physically wire the COMP output pin to the USART RX pin externally with a jumper (if they're on separate pins) or, if you need the comparator's thresholding function, buffer it and feed a second GPIO acting as RX with pin remapping (available on some G0 parts through SYSCFG) rather than relying on shared-pin internal muxing.

If you do need the comparator's clean digital edge as your UART's actual RX line, check the datasheet AF table for whether COMP output and USART RX are on genuinely separate pins on your package. If they are, a short external trace or jumper is the reliable path.

Two lines with space for your link:

If you're working through similar STM32 peripheral routing questions, I've put together some notes that might help.
You can check here

PANDI902Author
Associate II
August 3, 2026

Hello,

Thank you for the update.

I have one more clarification regarding my hardware setup:

My driver hardware (DRV8301 + external MOSFETs) does not have a BEMF (Back-EMF) sensing pin available. However, in the reference driver board design, BEMF sensing is included.

In my case, I am planning to use Hall sensor-based (trapezoidal) control. Is BEMF sensing mandatory for this method, or can I proceed without using any BEMF feedback?

If BEMF is not required, could you please confirm whether Hall sensor inputs alone are sufficient for stable motor control in this configuration?

Looking forward to your guidance.

Thank you.

GMA
ST Technical Moderator
August 3, 2026

Hello ​@PANDI902,

For 6-Step (trapezoidal) control, you can use the SensorLess-ADC as Speed Sensor mode and Bemf Phase measurement is necessary.

Or you can use the Hall Sensor as speed Sensor mode and HALL Sensor signals are necessary.
Refer to the Six-step Firmware Algorithm chapter of the MCSDK User Manual for more details.

If you agree with the answer, please accept it by clicking on 'Best answer'.Best regards.GMA
PANDI902Author
Associate II
August 5, 2026

Hi GMA,

Using NUCLEO-F446RE + X-NUCLEO-IHM09M1 + STEVAL-CTM009V1 in MC Workbench (FOC).

With the default Two Insulated Current Sensors variant, everything validates fine — no errors, Create works.

When I clone the board and switch Current Sensing to Three Insulated Current Sensors instead (CURRENT_ICS_U/V/W auto-map to MC15/MC17/MC19, applies cleanly in Board Designer with a green checkmark), MC Workbench then shows a red ✕ on Current Sensing with this error:

"Mandatory Current Sensing Feature for FOC/HSO algorithm is not defined or there are not connection paths between hardware signals and relative MCU resources for the feature."

Is 3-ICS actually supported with the IHM09M1 bridge for this power board, or is 2-ICS the only validated option? Screenshots attached.

 

Looking forward to your guidance.

Thank you.