set the phase offset epwm using c2000 F28379D
61 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
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 comentarios
Respuestas (3)
deiaaldeen
el 26 de Oct. de 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 comentarios
Vishwa
el 20 de Abr. de 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 comentarios
Vishwa
el 27 de Mayo de 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
el 27 de Feb. de 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 comentarios
PAULRAJ
el 30 de Mayo de 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.
Ver también
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!