cancel
Showing results for 
Search instead for 
Did you mean: 

How to use motor without hall?

DMeie.2
Senior

Issue in short: When changing to a motor without hall, the project breaks and doesn't build anymore.

 

Full Explanation:

I started a project that uses a motor with hall sensors.
The project is set up in the MCWB to primarily use the Observer and as Auxiliary the Hall.
The project has been generated with these settings so that I have the respective timers and pins required for the hall sensing reserved and configurable.

Now my issue is that I need to use a motor without Hall sensors. This should work since the primary speed sensing method is Observer.
When I open the ioc inside the MCWB and change the motor, the configuration complains because the new motor doesn't have the Hall sensors.
Now when I disable the Auxiliary Sensor and generate the code with these settings, the project isn't buildable anymore since the Hall sensor periphery initialization code is still there, but it seems to be incomplete (defines for "M1_HALL_TIM_PERIOD" and "M1_HALL_IC_FILTER" missing, and probably more).

What would be the correct way to deal with this?
Changing a motor shouldn't cause issues like this.

2 REPLIES 2
GMA
ST Employee

Hello @DMeie.2,

As recommended in Workbench user manual, loading your MCWB1.ioc file on CubeMx tool, you can notice that in MotorControl>M1_AUXILIARY_SPEED_SENSOR is correctly set to NONE, but in TIM3 (timer user for hall sensing) is still enabled with HALL sensor parameters. Disabling TIM3 ("Clock Source" and "Combined Channels" set to disable) and generating the project via CubeMx "GENERATE CODE" will remove these errors.

The correct way is to generate projects via .stwb6 files with workbench tool (recommended way).
If you want to handle projects via .ioc files, use CubeMx tool.

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

Another ST employee recommended in my Question on how to preserve additional periphery configuration to open the .ioc in the MCWB.
As the MCWB discards all other periphery I add to my project when regenerating the .stwb6, using that for something else than initially generating the project is quite useless.

What is your recommendation in my usecase?
I need to be able to both change motor settings mid-project but also keep additional periphery that's already implemented.