I am trying to control a converter with four switches at a switching frequency of 100 kHz with a F28335 Experimenter Kit, but I am having some trouble to execute the control algorithm at this speed.
I have synchronized the PWMs and the ADC following the steps mentioned in this link . As in this example, my control is executed every time there is an interruption of the ADC. In addition, I toggle a GPIO inside the subsystem interrupted by the ADC in order to observe the execution time of the control subsystem. I have noticed that even though I am synchronizing the PWMs and the ADC (switching at a 100 kHz frequency), the interrupted subsystem is slower than 100 kHz. Depending on the complexity of my control, the execution of the control slows down significantly (for example when I use HRPWMs instead of normal ones).
I guess my problem is that the board is not capable of executing my control algorithm at 100 kHz, but how can I improve this behaviour?
If I cannot avoid this problem, how can I configure the synchronization so that the ADC for example interrupts every 3 or 5 PWM cycles (i.e. reducing the frequency of the control algorithm)?
I would like to know the approximate execution time of my control because some functions depend on the sampling time.
Many thanks in advance!
By the way, I am using Matlab 2015a and CCS V6 to compile and build the Simulink control.