2019-09-04 08:41 AM
Hi,
when generating code with Motor Control Workbench for the B-G431B-ESC1 there is no code generated for CAN or PWM. Pin assignment in CubeMX is also missing.
Is the B-G431B-ESC1 not supported in Motor Control Workbench, yet?
Kind Regards,
Jay
Solved! Go to Solution.
2019-09-24 12:57 AM
Hello Jay,
There are two things you should pay attention to. The first one, is to click on update button at project generation window. The second one is to keep the same name as us. When you save your project, you can change only the path.
We are working to get rid of these limitations, but for your understanding, for the ESC example we already provide the IOC in the installation path, and we copy & update it with your new motor parameters, it is why it is important to click on update button. Otherwise, the workbench re-generate an iOC from scratch without the PWM input control.
I advise you to re-do the exercice in an empty folder, without changing the project name, and clicking on update button (instead of "generate").
Regarding the compilation flow, even if cubeIDE is not working out of the box yet, a workaround is proposed in the Release note, section :" Working with STM32CubeIDE for Motor Control projects"
Hope it helps
Cedric
2019-09-20 06:59 AM
Hello Jay,
The B-G431-ESC1 is fully supported from the 5.4.1 release.
To be able to use the PWM to control your motor, you must start from the exemple, and not from a new project from scratch.
( CAN is not developed yet ).
Doing this, you will see that the pin PA15 called M1_PWM_INPUT is present in your cubeMX file.
Best Regards
Cedric
2019-09-23 09:26 AM
Hello Cedric,
thank you for your help. I missed the G431B-ESC example in workbench, thanks for the hint.
Unfortunately the described workflow (readme from the example) does not create a complete .ioc file. PA15 configuration is still missing. Looking at the generated source code the expected configuration would be TIM2_CH1/CH2 in slave input capture mode. But as far as I can see TIM2 is never setup. I do not have Keil or IAR installed, so I cannot check if the generated code would compile and run. (I am using TrueStudio or CubeIDE 1.0.2.)
I used MCSDK Workbench 5.4.1, CubeMX 5.3.0 to generate the code for IAR or Keil. No error messages while generating.
Kind Regards,
Jay
2019-09-24 12:57 AM
Hello Jay,
There are two things you should pay attention to. The first one, is to click on update button at project generation window. The second one is to keep the same name as us. When you save your project, you can change only the path.
We are working to get rid of these limitations, but for your understanding, for the ESC example we already provide the IOC in the installation path, and we copy & update it with your new motor parameters, it is why it is important to click on update button. Otherwise, the workbench re-generate an iOC from scratch without the PWM input control.
I advise you to re-do the exercice in an empty folder, without changing the project name, and clicking on update button (instead of "generate").
Regarding the compilation flow, even if cubeIDE is not working out of the box yet, a workaround is proposed in the Release note, section :" Working with STM32CubeIDE for Motor Control projects"
Hope it helps
Cedric
2019-09-28 05:40 AM
Hello Cedric,
yes, it helped!.
After selecting "Update" instead of "Generate", in the generate window, the .ioc file is created as expected. It is even clearly documented in the readme-file. I must have over-read that.
Thanks for your help!
Kind Regards,
Jay
2021-06-21 11:22 PM
The question has been moved from the section "Motor Control Hardware" to the "STM32 Motor Control" section (the question is about the STM32 MC SDK).
Best regards
2023-08-02 04:16 PM
Hello,
I have a similar issue but I can't find the update button, only the generate button on mc workbench 6.1.2, do we still need the update button in the newer version ?
Thank you
Maxime