AnsweredAssumed Answered

FOC calculation vs PWM reload

Question asked by Peter Kostadinov on Apr 2, 2020
Latest reply on Apr 6, 2020 by xiangjun.rong

Hi All,


I need to execute FOC control calculations once per two PWM reloads. In demo project there are these definitions:

#define M1_PWM_FREQ (10000) /* PWM frequency - 10kHz */
#define M1_FOC_FREQ_VS_PWM_FREQ (1) /* FOC calculation is called every n-th PWM reload */
#define M1_SLOW_LOOP_FREQ (1000) /* Slow loop frequency */


To change M1_FOC_FREQ_VS_PWM_FREQ value to 2 is definitely not enough.

What are necessary steps to be done in order FOC calculations to be executed rare than PWM reloads?


Best Regards,