This thread has been locked.
If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.
Part Number: TMS320F28335
I would like to know if I can change the duty cycle of PWM in the midway of an existing PWM pulse.
My Current scenario:
1. I have one PWM module configure for 50us to generate SOC
2. In 50us, I have the configuration to update the duty cycle of the second PWM module, which will generate the WPM of 200us period.
Let's say I set the duty cycle to 75% on in Time t1, i.e at 0 and then at t+50, i.e at 50us I change the duty cycle to 25% on. Will this reflect on the PWM or, it has to wait for the 200us PWM pulse to complete and change the duty cycle?
Your suggestions are appreciated.
There are shadow registers available, so that the change of duty cycle would happen on the "next" pwm cycle.
We are glad that we were able to resolve this issue, and will now proceed to close this thread.
If you have further questions related to this thread, you may click "Ask a related question" below. The newly created question will be automatically linked to this question.
Todd's answer is correct. Please enable the shadow registers, this will allow you to write to the registers at any point, then the "shadow value" that you write will take effect at a specific counter event. Usually TBCTR = Period.
In reply to Todd Anderson78572:
Thank you Todd Anderson,
I will explore and use this option.
All content and materials on this site are provided "as is". TI and its respective suppliers and providers of content make no representations about the suitability of these materials for any purpose and disclaim all warranties and conditions with regard to these materials, including but not limited to all implied warranties and conditions of merchantability, fitness for a particular purpose, title and non-infringement of any third party intellectual property right. No license, either express or implied, by estoppel or otherwise, is granted by TI. Use of the information on this site may require a license from a third party, or a license from TI.
TI is a global semiconductor design and manufacturing company. Innovate with 100,000+ analog ICs andembedded processors, along with software, tools and the industry’s largest sales/support staff.