Using TIM3_CH1 to generate a delayed one-shot pulse
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2013-07-29 10:48 PM
Hi guys, it's been a few years since I've worked with the timers on these micro's and I've been rediscovering how much of a pain they can be.
Please refresh my memory so I at least know whether i'm wasting my time or not (trying to make this work)...I'm trying to set up TIM3 to generate a one-shot pulse using CH1 output (full remap to PC6)I have two options:1. A delayed single pulse on TIM3_CH1 triggered by software2. A delayed single pulse on TIM3_CH1 triggered by a rising edge on TIM2_CH2Right now, I'd like to just get &sharp1 working... Then I can work on &sharp2. So, ignoring TIM2 completely for now...Can I set up TIM3 CH1 in a one-pulse mode that I can then trigger by software(e.g. by setting an update flag etc)
? Or, do I need to use another timer channel on TIM3 to stop CH1 once it's started?In short, using a software trigger I'd like to have a delay of x ms, before a oneshot pulse y ms in duration.All the examples I've seen seem to require an external trigger to kick off the oneshot slave timer channel.Thanks all #stm32-timer-one-shot-pulse- Labels:
-
TIM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2013-07-30 4:00 AM
> All the examples I've seen seem to require an external trigger to kick off the oneshot slave timer channel.
Show us one of those examples, preferrably one which you already understand how it works. It will probably be quite simple to modify it to trigger it by software. JW- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2013-07-30 12:52 PM
Hi JW, at this point in time I'm pretty confident I can work it out myself, I just can't remember if what I'm trying to do is possible in the first place... No point spending hours trying to do something that can't be done due to technical limitations :) By examples, I mean those with the peripheral library.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2017-02-01 4:12 AM
Hi
I also have the problem, I need to generate a single pulse triggered from software not an external trigger. I see some options how to do that but I am not sure about the best way. My ideal solution would be to use the 'one pulse mode' but how to trigger that from software?
Matthias
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2017-02-01 4:46 AM
Simply set TIMx_CR1.CEN as you would if you would want to run the trigger continuously. The difference is in setting TIMx_CR1.OPM.
JW
