2013-01-15 11:43 PM
Hello
I am new to the PWM programming , I need to generate pulses of different types in a particular pattern say 80--50--20 % duty cycle consecutively at different frequencies. I am using STM32F05XXX board. Any inputs in this regard could be of great help. #pwm #pwm #pwm2013-01-15 11:52 PM
''pulses of different types''
Please explain what you mean by that? What, exactly, do you mean by the ''type'' of pulse?2013-01-16 01:09 AM
Hi Neil
I mean pulses with varying duty cycle, usually we get the pulses with a fixed duty cycle but i need to vary the duty cycle for every pulse. The pulse should be somewhat like shown in the attached file. Thanks and Regards Sajeed ________________ Attachments : Pulses.txt : https://st--c.eu10.content.force.com/sfc/dist/version/download/?oid=00Db0000000YtG6&ids=0680X000006HzkQ&d=%2Fa%2F0X0000000bQs%2FJet8LsIFcH99K.zjo8mPYWE.lwsNteZP_wCdU7LO7hM&asPdf=false2013-01-16 04:15 AM
I suggest to retrieve the STM32F0 discovery firmware, and have a look at the example in:
...\STM32F0-Discovery_FW_V1.0.0\Project\Peripheral_Examples\TIM_PWM_Output
2013-01-16 05:07 AM
You should be able to change the CCRx registers (aka TIM_Pulse) at the Update interrupt to modulate the width. On the F1 it was also possible to use DMA to load TIM registers at the update, but requires you to pick appropriate resources.
2013-01-17 09:01 PM
Hi Clive
Thanks for your valuable suggestion , it worked for me. Thanks again Sajeed