Hi,
In my digital power converter, I'm using DCL libraries. I use DCL_runPID_C4 and DCL_runClamp_C1 for anti-windup reset. I'm calling PID update function at every 100msec in order to tune it.
If I don't call update function at every 100msec task, my power converter works stable.
If I call update function at every 100msec task, my power converter gets unstable in time. It seems that something change behind.
I'm using fupdate function in order not to break any ISR.
During Init I use below function:
I call below function at every 100msec task;
Even if I don't change any PID parameters, update function at above is called.
1) Could you please review my code and if any fix required comment please?
2) I actually don't know why setting DRV_EPWM_SWITCHING_FREQUENCY for css->T. Do I need to call it again at 100msec task? Please, comment on purpose.
3) I use ADC prescaler and get into ISR routine at 50kHz. However, Fpwm =100kHz. Which value should I use for DRV_EPWM_SWITCHING_FREQUENCY for css->T?
Thanks in advance.