cancel
Showing results for 
Search instead for 
Did you mean: 

Motor Profiler - Motor Won't Spin - (from MC Workbench 6.2.0)

Gary_Baldy
Associate II

Hi,

This is my first post on the forum so my apologies if I’m doing something wrong.

OS:

Windows 10 64-bit

Software:

STM32CubeIDE 1.14.1

Motor Control Workbench 6.2.0

ST Motor Pilot v1.2.4

Hardware:

Dev Kit:                      P-NUCLEO-IHM002

Control Board:            NUCLEO-F302R8

MCU:                          STM32F302R8

Power Board:              X-NUCLEO-IHM07M1

Motor:                         Bull Running BR2804-1700kv

 

Problem Description:

The motor does not spin when I run the profiler using Motor Pilot v1.2.4. I can see the motor momentary jerks but it doesn’t spin and consequently the profiler fails. I have followed the profiler setup in ST Motor Pilot v1.2.4 > Help > Profiler Documentation. The profiler firmware is generated. I have compiled and uploaded the generated code with STM32CubeIDE 1.14.1. No errors or warnings are generated. When I start the profiler it hangs at 28% - the motor never rotates. See attached screenshots

In contrast I have no problems when using the Motor Pilot instead of the Motor Profiler. With the Motor Pilot the motor spins and I can adjust the speed from the GUI.

Questions:

  1. What is the problem stopping the Motor Profiler from working?
  2. How do I fix this problem?
  3. It appears that the code generated for the Motor Profiler (tick the "Motor Profiler" feature into the "Application configuration") does not work with the Motor Pilot – and code generated for the Motor Pilot does not work with the Motor Profiler. Is this correct? I didn’t see this mentioned in the documentation.

Thanks:

If anyone from ST sees this message then I want to say a sincere thank you to ST for providing all the excellent tools, software and documentation – for free! A very intelligent business decision and I’m grateful.

 

1 ACCEPTED SOLUTION

Accepted Solutions
Gael A
ST Employee

Hello Gary_Baldy,

I don't know if this is your case, but it feels like you generated a project with MCSDK 6.2.0, then opened the same project with MCSDK 6.2.1 and re-generated that project into the same folder without changing its name. Am I right ?
In any case, please refrain from doing this, as it generally causes a few issues. Please create a new project or save your project in a different folder / with a different name to ensure a correct generation. If the issue persists, please make sure your CubeMx, CubeIDE and Firmware package are up to date. I generated your project using MCSDK 6.2.1, CubeMX v6.11.0, CubeIDE v.1.13.2 and Firmware package v1.11.4 and had no issue.

If you agree with my answer, please consider accepting it by clicking on 'Accept as solution'.

Hope this will help,
Gaël A.

View solution in original post

4 REPLIES 4
GMA
ST Employee

Hello @Gary_Baldy,

Firstly, thank you for your message.
There is a known issue on WorkBench 6.2 profiler (profiler functional for STM32G4 series only), could you please try with 6.2.1 version?

If you agree with the answer, please accept it by clicking on 'Accept as solution'.
Best regards.
GMA

Many thanks for your reply!

I installed 6.2.1 and re-generated the code (using the project attached to my first post). When I compiled the new code I got many errors as shown below so cannot test the profiler. Most seem to state 'undefined reference'. I've tried to solve this but haven't succeeded.

Can you help?

 

13:33:30 **** Build of configuration Debug for project motor_test_2 ****

make -j4 all

arm-none-eabi-gcc -o "motor_test_2.elf" @"objects.list" -mcpu=cortex-m4 -T"C:\Users\user\.st_workbench\projects\motor_test_2\STM32CubeIDE\STM32F302R8TX_FLASH.ld" --specs=nosys.specs -Wl,-Map="motor_test_2.map" -Wl,--gc-sections -static --specs=nano.specs -mfpu=fpv4-sp-d16 -mfloat-abi=hard -mthumb -Wl,--start-group -lc -lm -Wl,--end-group

C:/ST/STM32CubeIDE_1.10.1/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.11.3.rel1.win32_1.1.100.202309141235/tools/bin/../lib/gcc/arm-none-eabi/11.3.1/../../../../arm-none-eabi/bin/ld.exe: ./Application/User/mc_api.o: in function `MC_ProfilerCommand':

C:/Users/user/.st_workbench/projects/motor_test_2/Src/mc_api.c:716: undefined reference to `SCC_CMD'

C:/ST/STM32CubeIDE_1.10.1/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.11.3.rel1.win32_1.1.100.202309141235/tools/bin/../lib/gcc/arm-none-eabi/11.3.1/../../../../arm-none-eabi/bin/ld.exe: ./Application/User/mc_tasks.o: in function `MCboot':

C:/Users/user/.st_workbench/projects/motor_test_2/Src/mc_tasks.c:890: undefined reference to `SCC_CheckOC_RL'

 

..... lines removed here due to 20,000 character limit

 

C:/ST/STM32CubeIDE_1.10.1/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.11.3.rel1.win32_1.1.100.202309141235/tools/bin/../lib/gcc/arm-none-eabi/11.3.1/../../../../arm-none-eabi/bin/ld.exe: ./Application/User/register_interface.o: in function `RI_SetRegisterMotor1':

C:/Users/user/.st_workbench/projects/motor_test_2/Src/register_interface.c:559: undefined reference to `OTT_SetSpeedRegulatorBandwidth'

C:/ST/STM32CubeIDE_1.10.1/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.11.3.rel1.win32_1.1.100.202309141235/tools/bin/../lib/gcc/arm-none-eabi/11.3.1/../../../../arm-none-eabi/bin/ld.exe: C:/Users/user/.st_workbench/projects/motor_test_2/Src/register_interface.c:411: undefined reference to `SCC_SetUnderVoltageThreshold'

C:/ST/STM32CubeIDE_1.10.1/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.11.3.rel1.win32_1.1.100.202309141235/tools/bin/../lib/gcc/arm-none-eabi/11.3.1/../../../../arm-none-eabi/bin/ld.exe: C:/Users/user/.st_workbench/projects/motor_test_2/Src/register_interface.c:585: undefined reference to `SCC_SetResistorOffset'

C:/ST/STM32CubeIDE_1.10.1/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.11.3.rel1.win32_1.1.100.202309141235/tools/bin/../lib/gcc/arm-none-eabi/11.3.1/../../../../arm-none-eabi/bin/ld.exe: C:/Users/user/.st_workbench/projects/motor_test_2/Src/register_interface.c:238: undefined reference to `SCC_SetPBCharacterization'

C:/ST/STM32CubeIDE_1.10.1/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.11.3.rel1.win32_1.1.100.202309141235/tools/bin/../lib/gcc/arm-none-eabi/11.3.1/../../../../arm-none-eabi/bin/ld.exe: C:/Users/user/.st_workbench/projects/motor_test_2/Src/register_interface.c:572: undefined reference to `SCC_SetNominalSpeed'

C:/ST/STM32CubeIDE_1.10.1/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.11.3.rel1.win32_1.1.100.202309141235/tools/bin/../lib/gcc/arm-none-eabi/11.3.1/../../../../arm-none-eabi/bin/ld.exe: C:/Users/user/.st_workbench/projects/motor_test_2/Src/register_interface.c:220: undefined reference to `SCC_SetPolesPairs'

C:/ST/STM32CubeIDE_1.10.1/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.11.3.rel1.win32_1.1.100.202309141235/tools/bin/../lib/gcc/arm-none-eabi/11.3.1/../../../../arm-none-eabi/bin/ld.exe: C:/Users/user/.st_workbench/projects/motor_test_2/Src/register_interface.c:1398: undefined reference to `SCC_GetLdLqRatio'

C:/ST/STM32CubeIDE_1.10.1/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.11.3.rel1.win32_1.1.100.202309141235/tools/bin/../lib/gcc/arm-none-eabi/11.3.1/../../../../arm-none-eabi/bin/ld.exe: C:/Users/user/.st_workbench/projects/motor_test_2/Src/register_interface.c:1420: undefined reference to `OTT_GetJ'

collect2.exe: error: ld returned 1 exit status

make: *** [makefile:66: motor_test_2.elf] Error 1

"make -j4 all" terminated with exit code 2. Build might be incomplete.

 

13:33:32 Build Failed. 55 errors, 0 warnings. (took 1s.624ms)

 

 

Gael A
ST Employee

Hello Gary_Baldy,

I don't know if this is your case, but it feels like you generated a project with MCSDK 6.2.0, then opened the same project with MCSDK 6.2.1 and re-generated that project into the same folder without changing its name. Am I right ?
In any case, please refrain from doing this, as it generally causes a few issues. Please create a new project or save your project in a different folder / with a different name to ensure a correct generation. If the issue persists, please make sure your CubeMx, CubeIDE and Firmware package are up to date. I generated your project using MCSDK 6.2.1, CubeMX v6.11.0, CubeIDE v.1.13.2 and Firmware package v1.11.4 and had no issue.

If you agree with my answer, please consider accepting it by clicking on 'Accept as solution'.

Hope this will help,
Gaël A.

Yes, you are correct I opened an existing 6.2.0 project in 6.2.1 and re-built it.

I followed your advice, updated all software components and created a new MC project and now the profiler works.

Many thanks for your assistance!