One pulse generator on STM32L052
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2014-12-05 4:46 AM
Hi family,
I am trying to generate a determined width pulse in one GPIO pin with STM32L052C uC and I am thinking to do this with One pulse mode timer.- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2014-12-09 9:21 AM
Does anyone knows how to configure it without Timer 2 trigger just only by software??
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2014-12-09 11:35 AM
I don't understand what do you want to achieve. Try to rephrase your question.
JW- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2014-12-09 12:54 PM
I want to generate a single pulse with a delay, just it
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2014-12-09 1:08 PM
With a delay, or with a width? You're not explaining this very well, and I'm not sure how the input capture sees the negative pulse, or how you'd know what state it's going to be before it happens.
You can use Input Capture to catch the phase of an edge, you can use another CCRx compare setting to get to the 175+256us point, interrupt, get the state, drive the pin, and advance the CCRx to the 175+256+256us point.Up vote any posts that you find helpful, it shows what's working..
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2014-12-09 1:16 PM
Stop or reset the timer if not after system reset, set it for the required output channel to appropriate PWM mode (the one which sets output high when timer value is higher than compare value), enable the output of that channel, set compare value to the required delay, set autoreload value to sum of delay and pulse length, set one-pulse mode; and then simply enable the timer when the starting event happened.
If you want to start autmatically on a capture event on different channel of the same timer (or, more precisely, when the pin corresponding to that channel goes to active level), then set that channel as source for slave trigger (in TIMx->SMCR.TS, only channels 1 or 2 as TI1FP1 or TI1FP2 (or TI1F_ED), in TIMx->SMCR.SMS set Trigger mode and *don't* enable the timer. JW- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2014-12-09 1:43 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2014-12-09 1:48 PM
Ok, well this would appear to be an ideal time for you to get some practical experience about how the chip behaves.
Up vote any posts that you find helpful, it shows what's working..
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2014-12-09 2:09 PM
I would like to setup Timer21 channel 2 to generate this kind of feature
