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'.