Open Brooce opened 5 years ago
Correct, updating the configuration will stop the motor. I will look into it and see if I can fix it in a clean way. For now you can start it again immediately after updating. You still need to call mc_interface_set_configuration() as the new parameters won't be used otherwise. Best is probably to update mcpwm_foc_set_configuration() to only stop the motor if parameters have changed that require that.
Hi @vedderb (and others),
If I understood your post from https://github.com/vedderb/bldc/issues/63 well, changing configuration with _COMM_SET_MCCONFTEMP shouldn't stop the motor (unless I set the store flag) - see exact quote at the bottom.
In reality, however, it does. It seems like the problem is in _commands_processpacket() (https://github.com/vedderb/bldc/blob/master/commands.c#L790), where _mc_interface_setconfiguration() function is called that stops PWM via _mcpwm_foc_setconfiguration() (the same way of action as for any other change in configuration). The question is, is it a bug or a feature? Can I safely remove this call and just update the values on-the-go? Won't it interfere with how the motor is driven?
Best regards Jakub
Your original post (for reference):