Getting started with MCSDK and P-NUCLEO-IHM002
I'm using SDK version 5.Y.4.
I start by using the motor profiler and the included motor, with the settings 7 pole pairs, 18000 max rpm, 2.8Apk, 12V. It makes a profile, but gives warnings that stator resistance and stator inductance are < 1.
I can use the "play" mode to spin the motor at 16200 rpm, and my power supply delivers 480mA at 12V to do this.
Now I save the motor profile and load it into the workbench. I then make one single change... to change the current reading topology from 1 shunt to 3 shunt. The board is jumpered for 3 shunt after setting it up using the out of the box test program.
I generate the code. load it into STM32CubeMX. Make no changes, and generate code again, and load it into STM32CubeIDE. Load the code onto the board. Run it. Load up Motor Pilot and start playing. At low RPMs, everything is fine.. At high RPMs, either the FOC overrun fault occurs, or an overcurrent fault occurs.
I've tried a bunch of stuff after reading other posts:
- Lower the PWM frequency to 20kHz.
- Set the Release build in CubeIDE. Both Release and Debug seem to have been set for -Ofast
- Raise the Execution Rate value in the workbench to 2 PWM periods. This makes the overcurrent fault happen at lower RPMs
- Change the cut-off frequency down to 2000 or up to 9000
Is there anything I should try that I haven't yet?
One other tidbit... turning on FreeRTOS causes the same faults to occur at lower RPMs. It feels like the optimization level might not be right?
