Generating SPWM within ADC Interrupt on F28069M Launchpad Problem

7 次查看(过去 30 天)
Hello everyone,
I am having a trouble using embedded coder for automatic code generation. I am using the C2000 TI F28069M launchpad board and planning to run three level SPWM on it. So far when the "SPWM model" is placed outside any block or subblock, the generated code runs on a timer interrupt at the frequency specified on the sine wave block and the generated PWM pulses seem okay. However when I put the "SPWM model" inside the ADC Interrupt (triggered by ePWM module at 30KHz), then the pulses are not okay. I've been checking the generated code and the only difference seems to be on the sine computation. Other thing Im changing inside the ADC Interrupt is the sine wave block sample time as inherited and I have configured the model to run at discrete time of 1/30e3.
Please any help on this, as I would like to run the SPWM inside the ADC interrupt.
Thanks
Rolando
  3 个评论
Rolando Aguilera
Rolando Aguilera 2020-3-20
Hey everyone,
I was able to solve the problem by checking the following example: c28035solar_inverter.slx (Photovoltaic Inverter with MPPT Using Solar Explorer Kit)
The idea is to create a sine look up table and problem solved.
Thanks,
Rolando

请先登录,再进行评论。

回答(0 个)

产品


版本

R2019a

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by