Skip to main content
Associate III
July 16, 2025
Question

Motor Control Issue with MCSDK 6.4.0

  • July 16, 2025
  • 6 replies
  • 2929 views

Hello,

I am working with the STM32F303E-EVAL control board and the STEVAL-IPMNM2S power board, using IAR Embedded Workbench 9.40.

I have struggled to get the motor running. I initially tried both MCSDK versions 9.3.2 and 9.4.0 separately, but in most cases, the motor either does not rotate or runs with excessive noise — overall, it fails to operate with error.

However, on one occasion, I accidentally recreated a project using MCSDK 9.3.2 and then rebuilt it using 9.4.0. Surprisingly, that build worked — the motor rotated smoothly, and I was able to Motor Pilot control speed and torque successfully.

Since then, I have tried many times (over 100 attempts) to reproduce the same working setup using both versions, separately and in combination, but without success. The motor fails to start or runs poorly.

Could someone please help me understand what might have gone right in that one successful attempt and how I can reliably replicate it?

Thank you in advance for your support.

6 replies

GMA
Technical Moderator
July 17, 2025

Hello @kumarairia,

Did you use ST Motor Profiler tool for your motor?
For error description and management refer to User Manual documentation available through "Workbench tool">About>Documentations>Documentation>"User manual" tab, "(FOC) Firmware errors" link

If you agree with the answer, please accept it by clicking on 'Accept as solution'.Best regards.GMA
Associate III
July 21, 2025

Thank you for your quick reply.

No, I haven't used the Motor Profiler tool, as I already have the exact motor parameters provided by the supplier, so I didn't find it necessary to run the profiler.

I’ve spent a lot of time carefully reviewing the documentation and troubleshooting the setup. I’m now able to run the motor smoothly and control both speed and torque using external op-amps for current sensing.

However, my goal is to use the internal op-amps and internal PGA for current sensing—without any external op-amp circuitry.

When I generated the code using this configuration:

  • Attempt 1: Motor Pilot didn’t show any Iq/Id readings.

  • Attempt 2 to 10: I resolved the above issue, but the motor now runs with noticeable noise and the Iq readings are jumpy and unstable. The operation is quite unreliable.

I would really appreciate your guidance on how to properly configure the internal op-amp/PGA setup to achieve stable and reliable performance. I'm looking for a concrete solution, as I’m quite frustrated with the trial-and-error approach and would like to resolve this as soon as possible.

Please find the details attached.

Thanks again for your support.

Associate III
July 25, 2025

Hello,

I need your urgent assistance regarding the issue mentioned above. Could you please respond at your earliest convenience?

GMA
Technical Moderator
July 25, 2025

Hello @kumarairia,

Did you check the list of hardware updates to be done on both boards? A list is available on workbench interface

GMA_0-1753448577538.png

Refer to steval-ipmnm2s user manual (Chapter 6. Current sensing amplifying network) and stm32303e-eval user manual (Table 19. Motor control related switches and solder bridges in OAM position).

If you agree with the answer, please accept it by clicking on 'Accept as solution'.Best regards.GMA
Associate III
July 28, 2025

Hello Expert,

Yes, I have carefully checked, and all instructions have been followed. Still facing same issues. 

Issues are more worst when i try with 2 motor setup, 2 motors MCSDK. my motor pilot connection is jumping a lot in this case.

 

 

 

P.S. I have another question:
Does the STM32F303E-EVAL board support a virtual COM port for USART communication?

I am currently using a USB to TTL Serial Cable with a built-in FTDI FT232RL IC (1.8M/5.9FT) and connecting:

  • PC4 to RX

  • PE1 to TX

  • GND to ground

to interface with Motor Pilot.
Motor Pilot is connecting without any issue using this setup.

Associate III
July 29, 2025

Hello Expert,

For the MC Pilot disconnection issue, I am attaching the error log message for your review.
Please let me know if any additional information is required to analyze this problem. I am keen to resolve it and establish a stable connection.

Thank you as well for suggesting the PWM frequency adjustment. I will try this and share the results with you shortly.

Associate III
August 5, 2025

I purchased an STM32F303E-EVAL control board along with two STEVAL-IPMNM2S boards to run two motors. Initially, I tested with a single motor, which worked fine. However, when I tried running two motors simultaneously, the connections were unstable, and there was noticeable ripple in the Iq current. (case1- current sensing external opamp)

To try internal opamp/comparator, I switched to the internal op-amp configuration, where I again observed ripple in single-motor operation, but at least the motor was rotating. All motor parameters were provided by the supplier, as we are purchasing the motors in bulk. (case2- internal opamp and PGA)

Unfortunately, one day the STEVAL-IPMNM2S board was damaged (blown) IPM. I replaced it with a new board, but then I encountered new issues, such as incorrect voltage readings and the motor not functioning. Thinking the microcontroller might be faulty, I purchased a new STM32F303E-EVAL board.

After setting up everything again, the new boards initially caused a lot of trouble. However, last week I finally got both motors working using MCSDK 6.40. But today, I noticed the some issue over current (fault now - fault over jumping)has returned in the new setup that was working fine before the weekend.

This is critical, and I need urgent help to resolve it . For reference, I also have another board, STEVAL-IHM39V1, and the motor works fine with it. Please review the error and advise me on the resolution as soon as possible.

 

My priority for testing and validation is STM32F303E-EVAL control board along with two STEVAL-IPMNM2S boards.

GMA
Technical Moderator
August 6, 2025

Hello @kumarairia,

You can free MCU load disabling Sto-Cordic Auxiliary speed sensing on both motor is not needed.
Referring to Error description and management available through "Workbench tool">About>Documentations>Documentation>"User manual" tab, "(FOC) Firmware errors" link, Over Current could be a drawback of decreasing PWM too much.


If you agree with the answer, please accept it by clicking on 'Accept as solution'.Best regards.GMA
GMA
Technical Moderator
August 27, 2025

Hello @kumarairia,

Did disabling both auxiliary sensors and tuning the pulse-width modulation (PWM) frequency improve performance?

If you agree with the answer, please accept it by clicking on 'Accept as solution'.Best regards.GMA
GMA
Technical Moderator
September 12, 2025

Hello @kumarairia,

You have to add an external wire between PB14 and PD14, as mentioned in the Workbench Pins Usage & Hardware Changes tab, which is not visible on slide 6.

GMA_0-1757663868815.png

 

If you agree with the answer, please accept it by clicking on 'Accept as solution'.Best regards.GMA
Associate III
September 12, 2025

PB14 and PD14 are connected on the back side, I have soldered wire  there. Once I am at work I can send you picture. 

Associate III
September 12, 2025

Hello Expert,

 

PB14 and PD14 are connected on the back side of the board.