cancel
Showing results for 
Search instead for 
Did you mean: 

Preserve CubeMX user pins when changing MC Workbench settings

DMeie.2
Senior

My current workflow is as follows:

I use the MC Workbench to create a base IOC file for our custom board, then use the CubeMX to add our own pins, periphery etc.

Now when I need to change some motor-related settings and regenerate the project in the MC Workbench, all my pins are gone in CubeMX and I have to redo everything again.

 

How do I preserve all the user pins, periphery settings etc in this case?

1 ACCEPTED SOLUTION

Accepted Solutions
cedric H
ST Employee

Hello @DMeie.2,

The IOC generated by the MC Workbench can be also loaded by the Workbench.

When you open your IOC with the workbench, the Workbench UI guarantees that only the motor algorithm can be changed. 

It is important to understand that at this stage, you cannot change anymore the topology (3-shunt /1 shunt). All the hardware parameters are frozen.

This feature has been developed exactly to fulfill the flow you described.

Regards

Cedric

 

View solution in original post

3 REPLIES 3
cedric H
ST Employee

Hello @DMeie.2,

The IOC generated by the MC Workbench can be also loaded by the Workbench.

When you open your IOC with the workbench, the Workbench UI guarantees that only the motor algorithm can be changed. 

It is important to understand that at this stage, you cannot change anymore the topology (3-shunt /1 shunt). All the hardware parameters are frozen.

This feature has been developed exactly to fulfill the flow you described.

Regards

Cedric

 

DMeie.2
Senior

Oh, I was not aware I can, or actually have to, load the IOC file.
Thanks, I'll give this a try and report back when there's issues.

A quick follow-up question related to this:
What if I need to change the motor mid-project (maybe to add one with HALL sensors), is it sufficient to load the IOC file as well or do I need the STWB6 file for this?

Well...

If your initial project does not select the Hall sensors as main sensor or auxiliary sensor, then the timer connected to your hall sensors will not be configured in the initial IOC generated by the WB. When you load it back, as only the algo parameters can be changed, there is no way to enable it afterward. Now, if you start by a Hall sensor project, you should be able to disable it afterward. Your timer will still be configured by your initial IOC, but the generated code will not make use of it. So, this way it is doable. Please note that this is not the primary intend of this feature, and you are touching an area that cannot be extensively covered by our test suite... 

Hope it is clear.

Regards

Cedric