2026-04-10 1:57 PM
Hello,
I use the STM32 Motor Control Software Development Kit (MCSDK version 6.4.1). I created a new project with the STM32G474E-EVAL microcontroller board, the two IHM07M1 motor-drivers (power boards), the two modified X-NUCLEO-IHM09M1 adapter (connector) boards, and two gimbal 12V 3-Phase BLDC motors with encoder AS5048A. The project code was generated. By the way, I have not bought all the hardware yet.
Our project is specific. For all microcontroller boards and their software, which I know, it is true that setting zero speed holds a motor's rotor in a fixed position. We need to accelerate two motors' rotors for 180 degrees and let them rotate by inertia for next 180 degrees. In this way, a rotor makes one full 360-degree circle path. It seems that the MCSDK Motor Pilot makes a rotor in a fixed position if the motor speed is set zero. Hence, we need to depower the motors while the rotors make the 180-degree path by their inertia. I doubt that the MCSDK Motor Pilot can completely depower the motors.
Could you please tell whether or not the motor-driver boards can depower the motors while the rotors rotate for 180 degrees by inertia? If it is possible, we would like to edit and execute the new project generated code by using Arduino IDE. Could you please specify what files and from where we should take? After watching the ST video tutorial https://www.youtube.com/watch?v=iTnj0DT3lBM&list=PLnMKNibPkDnGTAifVExzpTJjmF2b-SAw5&index=2 , I tried to find a main.c file, please see the screenshot attached, but failed to do it.
Thank you.
2026-04-17 1:52 AM
Hello @Boris_L,
Generate the project for STM32CubeIDE for a complete data file structure. "main.c" located in the Project/src directory.
2026-04-17 10:16 AM
Thank you, GMA. If we cannot completely depower the motors by using the IHM07M1 motor-drivers (power boards) while their rotors rotate by inertia (just some hundred milliseconds), we will need to disable the power boards. I see that the IHM07M1 power board has some EN pins based on its schematic: https://www.st.com/resource/en/schematic_pack/x-nucleo-ihm07m1_schematic.pdf Can any of those EN pins be used to completely disable the power board?
Moreover, in this case, the power boards will be turned off and on very frequently. As I understand, every time the power board is turned on, it is automatically reset. May the frequent off-on regime lead to the power board malfunction?
Based on the schematic of the STM32G474E-EVAL microcontroller board (page #20) https://www.st.com/resource/en/schematic_pack/mb1397-g474emc-b04_schematic.pdf , I see that the microcontroller board can be powered by an external 5V-18V supply. However, we use a LIPO 22.5V 1300mAh battery. If we will turn off and on the power boards to completely depower the motors, we cannot power the microcontroller board from one of the power boards. Therefore, we will need to power the microcontroller board directly from the battery. Do you sell any transformers (step-down voltage regulators) suitable for the microcontroller board and the battery? Thank you.
2026-04-20 7:03 AM
Hello @Boris_L,
When the MC_StopMotor1() function is called, PWM signals are disabled by resetting the EN signal. In this case, the motor continues to spin due to its inertia.
2026-04-20 9:12 AM
Dear GMA,
Thank you. Could you please tell what function is used to stop the motors to spin by holding the motors' rotors at a fixed position?
2026-04-23 1:04 AM
Hello @Boris_L,
If you want "the motors to spin by holding the motors' rotors at a fixed position" refer for Position Control Application note.
2026-04-23 9:06 PM
Hello GMA,
I am sorry I was not clear. What function is used to stop the motor by holding the motor's rotor in a fixed position? So if the MC_StopMotor1() function completely depowers the motor based on your earlier post, what function powers the motor by holding its rotor in a fixed position? Thank you.
2026-04-24 12:17 AM
Hello @Boris_L,
In Position Control mode, using MC_ProgramPositionCommandMotor1() API, you can order a π radian movement command. At the end of the rotation, position will be maintained as long as there is no MC_StopMotor1() command.
2026-04-24 9:51 AM
Dear GMA,
I am sorry. I think that you are wrong about the MC_StopMotor1() function for the following reasons:
1. Please watch this STM32 Motor Control Tools video starting at 3 min. 40 sec.: https://www.youtube.com/watch?v=8O67QLbATJg When the motor is stopped, its rotor stops almost immediately. It could not be so if the rotor continued to rotate by its inertia. In another ST video https://www.youtube.com/watch?v=3ac9b_u6gZM at 21st second, it is seen that the yellow disc is prevented to rotate by its inertia.
2. If motors' rotors continued to rotate by their inertia, a STM32 Smart toy car in this video https://www.youtube.com/watch?v=-yzckeePID0 would not move as it does. The car could not make such complicated paths.
Based on the said above, I would like to ask you to double-check with the ST Motor Control specialists concerning the MC_StopMotor1() function. I think that the function does not completely depower motors. Thank you.