2022-09-27 05:50 AM
I have been trying to compile the example program "6-Steps speed regulation using the STEVAL-SPIN3204 inverter board" from Motor control workbench.
I have made no changes to the example and following instructions from the text file as it is:
The project is generated successfully:
Then I make a new project in STM IDE with the ioc file as follows:
When I try to build the project, I get the following errors:
Can somebody please help, where am I making a mistake?
P.S. This is my first time using STM.
Solved! Go to Solution.
2022-09-30 11:16 AM
Hello again,
I think you came across an issue in the MCSDK 4.8 which I have not qualified yet. It is going to take some time to identify the issue. I'm sorry.
However, I may have alternatives for you. If you are not stuck into using MCSDK 5.4.8, maybe can you switch to using MCSDK 5.Y.4 or even MCSDK 6.0.0, both of which are available for free from st.com (https://www.st.com/en/embedded-software/x-cube-mcsdk.html).
Trying with MCSDK 5.Y.4 will provide you with an experience close to 5.4.8 in terms of tooling with the Workbench. With this version, you have two examples that target 6-Step motor drive with the STEVAL3204 inverter board:
Both are similar except that one is sensorless (the first one) while the other one relies on Hall sensors for speed and position sensing. I checked the first one which built well in the configuration that you described: STM32CubeMx 6.6.1, the (currently) latest FW version 1.11.3. My assumption is also that you use the latest STM32CubeIDE version (1.10.1).
Please, feel free to tell me if this configuration suits your needs at the moment. Note that the one you tried from MCSDK 5.4.8 is very similar to that one.
Another option for you would be to try MCSDK 6.0.0 in which Six Step is no longer provided as a set of examples but rather as a first class citizen into the MCSDK that you can configure more to your needs (especially in terms of motor parameters). The workbench interface has been fully reworked and it is the path MCSDK is taking for future releases.
Now, the way you open the project in STM32CubeIDE is not what I would advise, but the thing is that with 5.4.8, it seems that the project is incorrectly produced.
With 5.Y.4, you would open STM32CubeIDE and go to "File" --> "Open project from file system".
Then, you would navigate to the folder where the project has been generated and use it as the base folder for the project.
STM32CubeIDE will prompt you with two possible project. The one to choose is the the one that mentions `STM32CubeIDE` in its name. For some reason, 5.4.8 does not generate such a possibility. This is part of the issue you unveiled (thanks to you).
Then, you should have a working (at least a building) project.
Please, let me know how this is going on for your project. Whether the proposal I suits you or not, I would be very glad to know. Anyway, we'll work on the issue with MCSDK 5.4.8, but I cannot set any date for a version fixing it...
Best Regards,
Fred
2022-09-29 04:50 AM
Hello,
I cannot find an example with that name in neither MCSDK 5.Y.4 nor in 5.4.8. What version of the SDK do you use? What is the exact name of the example you are trying to setup?
Thanks a lot.
Best Regards,
Fre
2022-09-29 05:30 AM
Start by checking the include paths and the presence of the one file it complains about. If not copied into the project, check the source directories of the package and copy manually.
2022-09-30 01:27 AM
@Fred V.
I am using motor control workbench 5.4.8 and the name of the example is "Six Step drive with STSPIN3204"
2022-09-30 01:52 AM
Now I was getting these errors:
I added the new path this way:
Then, I got the following errors:
I changed the optimization level of the code:
Now, I am stuck on these errors:
These errors are coming from the following file on lines 48, 49, 50:
And these functions are properly defined in "steval-spin3204.h". This header file and associated .c file is present in the path and also I couldn't find any duplications of these functions. What could be the error?
2022-09-30 05:28 AM
OK,
Thanks for all the information. I'm going to give it a try and I'll tell you.
BR
Fred
2022-09-30 06:11 AM
Thank you very much
2022-09-30 11:16 AM
Hello again,
I think you came across an issue in the MCSDK 4.8 which I have not qualified yet. It is going to take some time to identify the issue. I'm sorry.
However, I may have alternatives for you. If you are not stuck into using MCSDK 5.4.8, maybe can you switch to using MCSDK 5.Y.4 or even MCSDK 6.0.0, both of which are available for free from st.com (https://www.st.com/en/embedded-software/x-cube-mcsdk.html).
Trying with MCSDK 5.Y.4 will provide you with an experience close to 5.4.8 in terms of tooling with the Workbench. With this version, you have two examples that target 6-Step motor drive with the STEVAL3204 inverter board:
Both are similar except that one is sensorless (the first one) while the other one relies on Hall sensors for speed and position sensing. I checked the first one which built well in the configuration that you described: STM32CubeMx 6.6.1, the (currently) latest FW version 1.11.3. My assumption is also that you use the latest STM32CubeIDE version (1.10.1).
Please, feel free to tell me if this configuration suits your needs at the moment. Note that the one you tried from MCSDK 5.4.8 is very similar to that one.
Another option for you would be to try MCSDK 6.0.0 in which Six Step is no longer provided as a set of examples but rather as a first class citizen into the MCSDK that you can configure more to your needs (especially in terms of motor parameters). The workbench interface has been fully reworked and it is the path MCSDK is taking for future releases.
Now, the way you open the project in STM32CubeIDE is not what I would advise, but the thing is that with 5.4.8, it seems that the project is incorrectly produced.
With 5.Y.4, you would open STM32CubeIDE and go to "File" --> "Open project from file system".
Then, you would navigate to the folder where the project has been generated and use it as the base folder for the project.
STM32CubeIDE will prompt you with two possible project. The one to choose is the the one that mentions `STM32CubeIDE` in its name. For some reason, 5.4.8 does not generate such a possibility. This is part of the issue you unveiled (thanks to you).
Then, you should have a working (at least a building) project.
Please, let me know how this is going on for your project. Whether the proposal I suits you or not, I would be very glad to know. Anyway, we'll work on the issue with MCSDK 5.4.8, but I cannot set any date for a version fixing it...
Best Regards,
Fred
2022-10-03 03:46 AM
HI @Fred V. , thank you for the reply.
I have shifted to motor control workbench 5.Y.4 and yes, the project built without errors. But then I was unable to connect the board with motor pilot with the error "Port open and try to configure the motor". Based on this post and the provided code in it, the board connected. However I still see some errors, as missing GUI parts and cant select control mode:
Errors in terminal of Motor Pilot:
Apart from these errors, the program worked with the hardware user buttons and thanks I was able to run some small BLDC motors.
For my main application, I have a 10 pole pair BLDC motor. Since, motor profiler cant work with this board, I manually changed the motor electrical parameters in the example project. But they don't seem to take effect and the motor doesn't run.
I have the following questions:
Can I change the motor parameters in the example project or do I need to make a new project for a different kind of motor? In the example project, there is also no option for the start up parameters.
If I start a new project, will FOC be the default control method implemented?
Just in your opinion, Is it possible to have "position control" with STEVAL3202, a bldc motor and installing hall sensors?
Thank you again.
2022-10-04 12:20 PM
Hello,
Indeed, 115200 bps on the UART link is a max at the moment with devices such as STSPINF0 and other STM32F0/G0 based MCUs. Hopefully, this may change in the future. The missing GUI parts syndrome seems linked with the errors you see in the Terminal tab: unknown registers resulting from the six-step firmware not supporting all the registers used in the FOC UI would results in making related UI widgets disappear. No more than an intuition here, we'll have to investigate this issue.
Appart from that, the UI screenshot you attached in your post does not show the Six-Step GUI application. That most certainly explains part of your problem. The Motor Pilot tool provides several GUI application tailored to specific situation (see here). At installation time, the pilot defaults to opening the FOC GUI. Since you are using a Six-Step application, you should opt for the Six-Step GUI application. To do so, disconnect from the board and select the GUI --> Load GUI menu item.
This pops a file open dialog. Use it to navigate to the place where your MC SDK installation sits and head for the the <code>Utilities\PC_Software\STMotorPilot\GUI</code> folder. There you'll find a defaultApp_6STEP.qml file that you can open.
Then, you can connect to the board again. The UI should work well now. If that is not the case, please, let us know.
About your questions:
You can modify these parameters, save the project back and generate the code by clicking on "GENERATE CODE". If you browse these parameters, you'll see the following motor parameter ones:
Some more information is available here about the modification of these parameters:
https://wiki.st.com/stm32mcu/wiki/STM32MotorControl:6-step_Firmware_Examples_User_Manual
I hope it'll help. Please, let us know how things will work.
Best Regards,
Fred