2026-02-10 2:45 PM
Hi there,
I am using the Motor Control Workbench tool (6.4.1) and having issues after flashing using the Motor Pilot tool (6.4.1). My current setup is the Nucleo-F401RE + Nucleo-IHM16M1 + GBM2804H-100T motor.
The project creation and code generation works fine, and the code builds and I am able to flash the code onto the STM32F401RE. I am designing for 3xPWM input and 3 Current Sensing resistors. All other settings are default. Then, using the Motor Pilot tool I am encountering the "Driver Protection" error right after connection. After investigating the generated code with a debugger, I found the issue to be with these two lines in the MX_NVIC_Init() function. I have not made any changes to the generated code. I am using the STM32CubeIDE.
HAL_NVIC_SetPriority(TIM1_BRK_TIM9_IRQn, 4, 1)
HAL_NVIC_EnableIRQ(TIM1_BRK_TIM9_IRQn);
At the second line the code fails silently and gets stuck in a infinite loop (not sure exactly where). Even after this failure,
the motor pilot application is still able to read the USART data and is able to grab the relevant info
(Motor, FOC rate, PWM freq, etc...) .
Not sure what exactly I am doing wrong and would appreciate any help in this matter. If more information regarding
my setup is required, please let me know.
Thanks
2026-02-10 2:59 PM - edited 2026-02-10 3:00 PM
Sounds like the interrupt gets triggered continuously and prevents the code from doing anything else. Set a breakpoint in the interrupt handler and figure out why. Debugging the code, letting it run until it gets stuck and hitting "pause" will show where execution is at.
2026-02-11 1:29 PM
Thank you for your response
It seems that the issue is the driver protection flag is constantly being set. From my limited understanding, this should only be set when the controller detects overcurrent. This is seemingly due to the TIM1_BKIN (PB12) being pulled low (it is active low). The hardware configuration is exactly like the user manual and quick start guide. I get this error whether I connect motor power or not.
Any further guidance would be much appreciated.
2026-02-11 10:57 PM