Single Phase Inverter C2000

I have a Single phase Inverter designed in simulink. The code starts as soon as the microcontroller gets powered up, Is there a option to trigger the whole thing after some GPIO trigger ?
So the flow will be, The microcontroller will wait after power up, as soon as the Gpio trigger the sine wave generation starts.
Adding the whole thing into a Sub-System and trigger it with a gpio is not working.

6 Commenti

Now, i put the Sine wave function to a Sub-system, and added a Function Call block,and triggering it with a GPIO Rising Edge interrupt. So far its working , there is no sine wave Pulses when microcntroller starts.
But the system works momentarily whenever there's a Rising edge interrupt on that GPIO pin.Then its stops, and the ePWM blocks output a Fixed duty cycle based on last received CMPA value.
I have added the model also for better understanding.
Gowtham
Gowtham il 4 Ott 2023
Hello Harsh,
I kindly recommend reaching out to MATLAB support to resolve the issue.
So Now i can start the Sinwave generation on a full bridge by using a Hardware GPIO Interrupt. So i just a wrote a basic funtion with some sin & gain blocks to generate 50HZ sine wave. Here's the how its designed.
  1. So the hardware Interrupt block trigger a constant to enable signal.
2.
That enable signal calls a Sine wave generation function & ePWM blocks of C2000 Processors.
3.
And here is the Sinewave generation block.
4. And here is the final result. As soon as the Rising edge(GPIO) interrupt (Yellow) hits the Microcontroller, The sine wave (50Hz Green) starts. Blue - PWM pulses for Mosfet.
5. But here is the catch or the issue i am facing.
As we can see ferom below picture the PWM pulses starts after around 30uS of the Hardware rising edge interrupt.
6.
But in another statup, we can see that it starting after 130uS later.
So my question is "How to make it uniform" ? So im every startup it starts after same time ?
Sayan
Sayan il 31 Ott 2023
Is not the varying time of starting the sinosoidal PWM due to the different values of reference sinosoidal signal at the time of interrupt ?

Accedi per commentare.

Risposte (0)

Richiesto:

il 28 Set 2023

Commentato:

il 31 Ott 2023

Community Treasure Hunt

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

Start Hunting!

Translated by