Hi guys, I have modified my code, I removed PWM interrupt, and now Im using ADC interrup, in Continuous Loop mode each time that ADC do a conversion Interrupt is generated when the 2nd and 4th words are written to the buffer, in the interrupt service routine I load the ADC result to Duty Cycle register, I did some test using a pot, now my ADC is working correctly, 0.5 V = 10% Duty Cycle in PWM, so 5 Volts = 100 % Duty Cycle PWM, Im loading the 10 ADC result bits to 10 resolution bits from PCPWM (duty cycle registers), Im using Digital Scope, when I get the PWM output the signal stay some seconds, after I luse the PWM signal, after some second the signal come back, after the signal down, after back, etc...
Im getting the correctly variable PWM output but the signal isnt constant, and its not good to use in a DC-DC converter, I need dont luse my PWM output.
I think the ADC interrupt is the trouble because I luse the PWM output, I hope u can help me guys thank for ur help and time.
I have uploaded my new code.
Regards.
Tom.




Bookmarks