2025-06-18 12:43 AM - last edited on 2025-06-18 1:11 AM by Andrew Neil
Hi there,
I am newbie to motor control, and I am studing how to use the excellent tool named MCSDK6.
Below is my work follows(MCU is STSPIN32G4):
1. open MCSDK6 and select my custom board and motor, generate the project;
2. open cubeMx configurate the others PINs, then generate the project;
3. write some app code;
4. i find the motor config is something wrong, so I open MCSDK6, change the config and generate the project again;
5. then I found the config in step2 is lost.
Is anything I did wrong? I think if the config could keep is better.
Thanks for you help.
Solved! Go to Solution.
2025-06-18 2:31 AM
Hello Junde,
Thank you for your post. I am sorry to inform you that this is an absolutely normal behaviour and that it can be listed as one of the limitations of our tool. When generating a Motor Control project, the WorkBench always create the .ioc file from scratch and thus any CubeMX modification is overwritten. However, user code is maintained after CubeMX generation as long as the code is located in the User Code brackets.
Thank you for your understanding.
2025-06-18 2:31 AM
Hello Junde,
Thank you for your post. I am sorry to inform you that this is an absolutely normal behaviour and that it can be listed as one of the limitations of our tool. When generating a Motor Control project, the WorkBench always create the .ioc file from scratch and thus any CubeMX modification is overwritten. However, user code is maintained after CubeMX generation as long as the code is located in the User Code brackets.
Thank you for your understanding.
2025-06-18 7:20 PM
Thank you for your reply.
I am just making sure that my process isn't something wrong.
So we'd better configure our motor-related profile in step 1 and keep it in late development.
2025-06-19 8:04 AM
Hello @Junde,
To complete Gael's answer, be aware that once you have generated your project and if you want to modify your IOC to include your own peripherals with cubeMX, you can re-load this modified motor control IOC directly with the workbench. Doing so, you will be able to change your motor control algorithm configurations, but all the parts related the hardware configs are not accessible anymore. The new generated IOC will modify only the motor control component, and will keep untouched the HW part. So your modification will be kept, but it is also the reason why when you start from a motor control IOC the workbench prevents you to do any modification related to HW config.
I hope it's clear.
Regards
Cedric