cancel
Showing results for 
Search instead for 
Did you mean: 

Motor Control stops working with HCLK reduced to 8 MHz

_Danny_
Associate III

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

 

 

2 REPLIES 2
GMA
ST Employee

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_
Associate III

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.