Hello,
Using MC9S12ZVML128_BLDC_Sensorless S/W, I tested BLDC motor by own board.
Stall error was occurred when there is load on BLDC motor.
Please refer to the attached.
stall check function is as below.
void StallCheck(void)
{
tU16 max = 0, min = 65535;
if (periodZC_F_PhA>max){
max = periodZC_F_PhA;
}
if (periodZC_F_PhA<min){
min = periodZC_F_PhA;
}
if (periodZC_F_PhB>max){
max = periodZC_F_PhB;
}
if (periodZC_F_PhB<min){
min = periodZC_F_PhB;
}
if (periodZC_F_PhC>max){
max = periodZC_F_PhC;
}
if (periodZC_F_PhC<min){
min = periodZC_F_PhC;
}
if (periodZC_R_PhA>max){
max = periodZC_R_PhA;
}
if (periodZC_R_PhA<min){
min = periodZC_R_PhA;
}
if (periodZC_R_PhB>max){
max = periodZC_R_PhB;
}
if (periodZC_R_PhB<min){
min = periodZC_R_PhB;
}
if (periodZC_R_PhC>max){
max = periodZC_R_PhC;
}
if(periodZC_R_PhC<min){
min = periodZC_R_PhC;
}
periodZcAvrg = period6ZC / 6;
if((max > (periodZcAvrg << 1)) || (min < (periodZcAvrg >> 1))){
if (stallCheckCounter < STALLCHECK_MAX_ERRORS){
stallCheckCounter++;
}
}else{
if (min < STALLCHECK_MIN_CMT_PERIOD){
if (stallCheckCounter < STALLCHECK_MAX_ERRORS){
stallCheckCounter++;
}
}else{
if (stallCheckCounter > 0){
stallCheckCounter--;
}
}
}
if(stallCheckCounter >= STALLCHECK_MAX_ERRORS){
StallError = 1;
}else{
StallError = 0;
}
}
Would you provide solution for this issue?
Thanks.
Hi,
I have a set of questions to be answered before we can work together on the solution:
1) Does your hardware provide enough power to run the motor under load?
2) Does your motor run with the devKit hardware?
3) Have you changed the application settings to accommodate your motor?
4) Does your motor start with no load?
Thank you,
Regards,
Matej