Skip to main content
Associate III
April 16, 2025
Question

Motor Control stops working with HCLK reduced to 8 MHz

  • April 16, 2025
  • 1 reply
  • 360 views

Hi We are using a custom STM32U5G7-based board to drive a BLDC motor using STSPIN230 with Hall sensor feedback. The Hall sensor inputs are handled through interrupts, and motor commutation is performed based on these events. The motor operates smoothly when the HCLK is configured to 80 MHz (HSI with PLL). However, when the HCLK is reduced to 8 MHz (HSI), the motor no longer rotates smoothly, despite the PWM timer frequency being maintained at 50 kHz in both cases. We would appreciate any insights into potential causes for this issue.


_Danny__0-1744814301298.png

_Danny__1-1744814355312.png

 

 

1 reply

GMA
Technical Moderator
April 18, 2025

Hello @_Danny_ ,

Have you checked the CPU load? Is there enough time for handling HALL interrupts and your motor control function?

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

Hi GMA,

Could you please guide me on how to monitor or check the CPU load on the system?

I have verified the Hall sensor signals and commutation timing using an oscilloscope. At a system clock of 80 MHz, there is no observable delay between the Hall sensor input and the commutation — the commutation is triggered immediately upon receiving the Hall interrupt. However, at 8 MHz, a delay is noticeable; the commutation starts slightly after the Hall interrupt is received.