Generating SPWM within ADC Interrupt on F28069M Launchpad Problem

2 views (last 30 days)
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 Comments
Rolando Aguilera
Rolando Aguilera on 20 Mar 2020
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

Sign in to comment.

Answers (0)

Products


Release

R2019a

Community Treasure Hunt

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

Start Hunting!