cancel
Showing results for 
Search instead for 
Did you mean: 

pulse generation

aeolia_amha
Associate II
Posted on May 19, 2010 at 08:10

pulse generation

7 REPLIES 7
filippo2991
Associate II
Posted on May 17, 2011 at 13:51

I needed something similar, In my case I solved using TIMER. Here my code:

[DEAD LINK /public/STe2ecommunities/mcu/Lists/ARM%20CortexM3%20STM32/Flat.aspx?RootFolder=/public/STe2ecommunities/mcu/Lists/ARM CortexM3 STM32/fastest way to generate output waveform&FolderCTID=0x01200200770978C69A1141439FE559EB459D758000626BE2B829C32145B9EB5739142DC17E&currentviews=122]https://my.st.com/public/STe2ecommunities/mcu/Lists/ARM%20CortexM3%20STM32/Flat.aspx?RootFolder=%2fpublic%2fSTe2ecommunities%2fmcu%2fLists%2fARM%20CortexM3%20STM32%2ffastest%20way%20to%20generate%20output%20waveform&FolderCTID=0x01200200770978C69A1141439FE559EB459D758000626BE2B829C32145B9EB5739142DC17E&currentviews=122

aeolia_amha
Associate II
Posted on May 17, 2011 at 13:51

Thanks for the reply, in your case, what you did is pwm where the duty cycle and period is set. My problem is to generate a specific number of pulses because my application is for stepper motor where I need to generate the precise number of steps. The PWM is not that important and relevant. Any tips or code on how to do it?

lowpowermcu
Associate II
Posted on May 17, 2011 at 13:51

Hi again benison,

I don't know if you have looked at the application note ''AN2820'' it is about: ''Driving bipolar stepper motors using a medium-density STM32F103xx microcontroller''

This is the link:

http://www.st.com/mcu/familiesdocs-110.html

Hope this helps.

MCU Lüfter,

be low power

aeolia_amha
Associate II
Posted on May 17, 2011 at 13:51

Thanks. I've already solved the problem, I've found a much easier way, alternating the GPIO pin as set and reset and by having a certain amount of delay for each is much easier. This way, I can control the duration of the pulse and how much pulse I wanted to produce by using for loop. If there's any question on how to do this, I'll be happy to post the code.

tuan
Associate II
Posted on June 03, 2014 at 12:29

Hi,

Can you share again code.

It is very userful for me.

Thanks

tuan
Associate II
Posted on June 03, 2014 at 12:30

Hi,

Can you share again code.

It is very userful for me.

Thanks

Posted on June 03, 2014 at 12:36

Original thread date 2010, the 2011 date is when the forum had it's last big meltdown. Assume the posters are unlikely to be here or respond.

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..