set the phase offset epwm using c2000 F28379D
56 views (last 30 days)
Show older comments
Hi,
I'm trying to set the phase shift if ePWM (1, 2, 3) to 0, 120 , 240 deg using ePWM block but I don't know why it is not working properly it provides wrong phase shift in scope. I would appriciate if any one can help. simple model is attached
Thanks
0 Comments
Answers (3)
deiaaldeen
on 26 Oct 2023
hello sir,
I want to do phase shift between the two legs of full brige inverter. I did exactly what you did but still no phase shift. could you please post your file or teach me ?
0 Comments
Vishwa
on 20 Apr 2023
For counting mode set to up-down, phase shift should be given with respect to time period of 2*20e3. Since the timer period is only the period of up-counter/down-counter.
Above pics shows ePWM blocks configurations and the waveforms as seen from scope using external mode.
Hope it helps.
3 Comments
Vishwa
on 27 May 2023
Sure,
You can follow these steps to visualize ePWM signals in Simulink:
- Under Model Settings > Hardware Implementation > Target Hardware Resources > ePWM; find which GPIO Pins your ePWM channels are multiplexed to (you can set your preferred applicable GPIO Pins here also). Refer to below figure.
- Add a Digital Input block, this block can configure a GPIO Pin as an input pin. We will use these GPIO Input pins to receive signals from ePWM output pins. In the Digital Input block, configure pin 8, 14 and 15 as Input pins. See below figure.
- Now on the launchpad, short the ePWM MUXed GPIO Pins to the GPIO Input pins using jumper cables. In this particular case, I would have shorted GPIO 0 with GPIO 8, GPIO 2 with GPIO 14 and so on.
- Under Model Settings > Hardware Implementation > Target Hardware Resources; check External Mode settings.
- On Simulink Run the model on hardware using "Monitor and Tune".
Now you should be able to visualise the signals either on scope or on Data Inspector. Please refer to the following documentation for reference: Signal Monitoring and Parameter Tuning over XCP on Serial - MATLAB & Simulink (mathworks.com)
Good luck!
Regards,
Vishwa
Cristina
on 27 Feb 2024
Hi, I have tried to see a PWM signal following the above steps but when simulating I get a 0 signal all the time.
I attach screenshots
I have connected pin 40 to pin 74 which are the GPIO0 and GPIO14 pins.
I know that the "ePWM" block is well configured because I have been able to see the output signal with an oscilloscope, so I think the problem is in executing these steps.
I hope you can help me, thank you in advance.
2 Comments
PAULRAJ
on 30 May 2024
first, try to run your model on external mode using 'monitor and tune' option. if you are able to do that, then you can see the output waveform in the matlab scope. check for the jumper connection to enable the USB/UART serial connectivity.
See Also
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!