2017-07-13 09:00 AM
We are using the FOC SDK V4.3 on a STM32F302. Motor is an e-bike motor with 550W 36V 20poles, using Hall-Sensors.
System is running fine so far. But sometimes when calling the function MCI_StopMotor(mci) we experience a delay of about 20 seconds until the motor really stops and the function MCI_GetSTMState(mci) returns IDLE. The function MCI_StopMotor(mci) does return TRUE.
We call MCI_StopMotor(mci) and then (if it returns TRUE, what it always does) wait until MCI_GetSTMState(mci) returns IDLE. But this sometimes leads to long delays, as mentioned. The motor just keeps spinning with the actual speed for about 20 seconds and then stops. Of course this behaviour is somewhat critical in an e-bike application.
What can we do about this issue? It is difficult to reproduce, but it does happen from time to time.
Can anyone help?
Thanks in advance,
Martin
2017-07-18 02:34 AM
Small Update,
when the motor does not stop, the motor state reported by MCI_GetSTMState(mci) gets stuck in the state ANY_STOP.
After the mentioned delay the state changes and the motor stops.
I found, that the error is not limited to the stop command, it is just the easiest effect to observe. We are sending MCI_ExecTorqueRamp() commands every 10ms and this commands are also sometimes executed delayed, often only for a short rime, but noticable.
It seems, that somehow the execution of TSK_MediumFrequencyTaskM1() is stalled, where the internal stae machine is handled. But this can be a wrong conclusion.
I am stuck here, any suggestions how to investigate this further? I don't think that it is an error in the library. Butt what could cause this behaviour?
Best regards,
Martin
2021-06-15 01:51 AM
The question has been moved from the "Motor Control Hardware" section to the "STM32 Motor Control" section (the question is about the STM32 MC SDK).
Best regards