2025-04-16 7:39 AM - last edited on 2025-04-16 8:00 AM by Andrew Neil
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.
2025-04-17 11:17 PM
Hello @_Danny_ ,
Have you checked the CPU load? Is there enough time for handling HALL interrupts and your motor control function?
2025-04-17 11:59 PM
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.