cancel
Showing results for 
Search instead for 
Did you mean: 

MC_DURATION Fault in B-G431B-ESC1 software

SRedd.5
Senior III

I am getting the fault of MC_DURATION after running for few seconds in my customized board but software is same as B-G431B-ESC1. I am not sure why this error is happening, any advise? I have changed the REGULATION_EXECUTION_RATE to 2 from 1 assuming the FOC execution rate is fast so that the FOC is executed after 2 PWM cycles.

1 ACCEPTED SOLUTION

Accepted Solutions
Gael A
ST Employee

Hello SRedd.5,

The MC_DURATION error occurs when the system does not manage to determine the next duty cycle before the next PWM cycle starts. It means that your PWM cycle are too short.

You can solve this by reducing your PWM, or increase your EXECUTION_RATE. The execution rate is the rate at which the determination of the new duty cycle is executed. An execution rate of 2 means the duty cycle will be calculated every 2 PWM cycle. Which means the firmware will have more time to determine the next PWM cycle.

Alternatively, you can sometimes tackle this issue by changing your IDE optimization to fast or speed if it not already the case.

Hope this will help,

Best Regards,

Gaël A.

If you agree with my answer, please consider accepting it by clicking on 'Accept as solution'.

Hope this will help,
Gaël A.

View solution in original post

4 REPLIES 4
Optician
Associate III

Hi. You refer to "software is same as B-G431B-ESC1" but where do I find this ST software please?. It is not in V6 examples and early example will not load in the current software. Can you point me to a download please?. Many thanks.

Gael A
ST Employee

Hello SRedd.5,

The MC_DURATION error occurs when the system does not manage to determine the next duty cycle before the next PWM cycle starts. It means that your PWM cycle are too short.

You can solve this by reducing your PWM, or increase your EXECUTION_RATE. The execution rate is the rate at which the determination of the new duty cycle is executed. An execution rate of 2 means the duty cycle will be calculated every 2 PWM cycle. Which means the firmware will have more time to determine the next PWM cycle.

Alternatively, you can sometimes tackle this issue by changing your IDE optimization to fast or speed if it not already the case.

Hope this will help,

Best Regards,

Gaël A.

If you agree with my answer, please consider accepting it by clicking on 'Accept as solution'.

Hope this will help,
Gaël A.

I have enabled CAN with highest priority of 0 and sub priority of 0 without much thought, may be that is causing the issue, i will try to change the interrupt priority similar to UART in the reference project as 3, 1 and check if the issue will be resolved. I have already optimized to fast.

SRedd.5
Senior III

I am really sorry it is not MC_DURATION fault but it is MC_START_UP fault, it is start up fault, it may be because the motor is not connected, i was trying to rectify hardware, I will try connecting the motor and see if the issue resolves.