2025-08-01 4:23 AM
I have multiple issues while driving the vehicle with the MCSDK software running. It is custom hardware MCSDK6.4.0
Hall sensor based.
1. Every time i start the vehicle at the beginning it jerks and then picks up, the behavior is not predictable, but jerking is always there some times more, less and hall fault etc. Now i have tested again on the bench and captured the waveform of the phase currents
The first few steps before the sinusoidal phase currents is problematic, so if i count i get 3 jerks before the motor started running. Can i eliminate this? It always happens when i start. Does it have anything to do with hall placement angle. I have not run the Motor pilot as i don't have the setup for that. I can perform multiple iterations of trial and error for the placement angle if the above angle is a problem at present it is 30. And my forward movement and reverse does not have the same placement angle may be due to the motor design.
Next major problem is intermittent speed feedback fault i can't predict when it happens this mainly occurs when i am starting the vehicle and also intermittently. On the bench i have tried to produce the issue
Measured angle started deviating from the super angle and fault happens.
Both the above are the same scenario 0x20 fault
All the start and stop scenarios all in between i find jerks.
Starting jerk before starting.
I have taken several failure graphs, if you can suggest me the correct direction i can look into. My only question the behavior shall be predictable but it is not.
2025-09-03 3:48 AM - edited 2025-09-03 3:57 AM
As suggested i will not run the profiler under load conditions.
I am running in Torque control mode and not speed control mode and tried providing maximum torque as well, but the startup jerk is always there.
Do you recommend if i make a project with sensorless + hall as auxiliary sensor will it solve the problem of startup jerk so that i can implement it on priority?
One thing i have not did much tuning of the PID parameters, may be i have to work on that i have taken some values i am not sure if it has an impact.
2025-09-03 5:16 AM
Hello @STuser2,
In torque mode or speed mode, you can dynamically tune PID parameters through the Motor Pilot "Advanced Configuration" interface.
Using the main sensorless configuration with the Hall sensor as an auxiliary sensor use case, you can switch main/auxiliary between both sensors via Motor Pilot or with the MC_SensorSwitchMotor1()
API once the RUN state is reached.
2025-09-06 1:45 AM
Finally I figured out the Jerk issue there is a bug in the code in the file hall_speed_pos_fdbk.c
/* Discard first capture */
if (0U == pHandle->FirstCapt)
{
pHandle->FirstCapt++;
(void)LL_TIM_IC_GetCaptureCH1(TIMx);
}
we are discarding the first capture, But in the
__weak void *HALL_TIMx_UP_IRQHandler(void *pHandleVoid)
{
/* Reset first capture flag */
pHandle->FirstCapt = 0U;
}
When the load is high the Hall timer overflow is happening and the FirstCapt variable is resetting to 0 and every time the Input capture considers it as first pulse and does not process.
The above is the debug variable i have added in the code and verified that it stays in the loop. I have commented the code and it works fine. My only question is can we consider all the pulses without discarding, since i feel that one pulse also has some impact. Request ST team to confirm if the above solution is correct and i can proceed with the change and thank you for support.
2025-09-06 9:54 PM
I think the better solution will be
/* SW Init */
if (0U == hMinReliableElSpeedUnit)
{
/* Set fixed to 150 ms */
pHandle->HallTimeout = 150U;
}
increase the HallTimeout to 1000 (1Sec), since the solution from previous post has reduced the jerks but not solved completely that is because i think the other variables are also getting reset apart form
FirstCapt
testing is pending.
2025-09-08 11:21 PM
Hello @STuser2,
Thank you for your feedback.
We are attempting to reproduce this behavior and will provide an update once we have more information.