Part Number: TMS320F28335
Other Parts Discussed in Thread: C2000WARE
Dear Community members,
I posted a thread some days ago related to my EPWM, ECAP and pid routine code implementation where EPWM is a major concern. This thread was resolved and my code is working too for a task.(Please find the code below). This time I need to change a little bit.
Firstly I want the ePWMA & ePWMB to be run fiirst for some time around 2-3 sec,
Then it must shift to my NORMAL WORKING CODE which is running good (where eCap takes the signal from the function generator in terms of Period or duty cycle and then it process the while loop for my pid routine code in the main function and then generates the ePWM signals accordingly at one time).
The reason for doing this is to generate a startup ePWM signals for 2-3 sec first without capturing signals so that the connected hardware will run smoothly for some time and then after 2-3seconds, the startup signal should STOP and start taking the signals from the functions generator using eCap.
Problem is that I am confused where I should add this startup ePWM routine code in my main function (I guess just after the Setup_ePWM1(); Line 85) and then put some delay for 3 seconds, After this delay, startup ePWM routine code will never run again because the startup signal would have initialized the connected hardware and then it must move/shift to my normal working code for further instructions(ecap>pid_while_epwm all at one time). (Remember: this startup signal must run one time and it shouldn't be executed again.)
For delay, I guess delay(...); is used in terms code.
Working Code is attached here:
Please suggest accordingly
Kind Regards
Arsalan
