trigger adc after counter is reached
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2016-03-21 3:50 PM
Hello there,
I was wondering either in STM32F4 it is possible, to get a similar functionality to C2000 one, that can trigger an ADC conversion after certain counter valueon a timer is reached, like here:https://www.dropbox.com/s/d6lonep1m3i5x4d/Zrzut%20ekranu%202016-03-21%2023.48.06.png?dl=0
(point CA, middle). In stm34f4 I am using center aligned pwm mode. I can trigger ADC each time timer starts counting up/down or both. But I need to trigger the adc when the counter is halfway down or up. Is there a way to do this? I would appreciate all help. #timer #adc #synchronization- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2016-03-23 8:57 AM
But can a channel from another timer be slaved to this channel? So lets say TIM1 OC1 triggers interrupt and it makes TIM5 OC3 channel start counting?
The clocks on the chip are synchronous. You could set up another timer that gets reset by the master at it's update, you set the slave timer to count at a comparable rate, and use that to manage the phase angle of the trigger. You have a common understanding of what zero is.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
‎2016-03-23 10:43 AM
Hi Bremen,
In fact those are the capture/compare events (occurs when there is a match between CCRx and counter value) and I am talking about the update event ( which occurs on the counter overflow). So if you take a look to the table of ADC external trigger , you find both ( TIMx_CHx_envent and TIMx-TRGO event ). The second will serve your need.Please, try to apply the recommendations already mentioned and come back if it is not OK for you.
-Hannibal-
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2016-03-23 10:48 AM
Ok, I get it now. Ill try it tommorow and post back. Thank you very much.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2016-03-24 12:27 AM
I am trying to make the configuration now. I am trying to enable TIM1 trgo to trigger and injected channel conversion, but It doesnt seem to work (injected channel conversion interrupt is not triggered). Are there any other considerations taht has to be taken when using injected channel?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2016-03-24 7:14 AM
Hi Bremen,
Please, try to share your code (Timer configuration , ADC configuration ..clock ..) to figure out what you have missed. -Hannibal-- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2016-03-25 12:02 AM
I think I got it now, I had some config errors and now its ok. Thank you very much for help guys, your help is priceless.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2016-03-25 3:29 AM
Hi Bremen,
It's nice to hear that. Keep up the good work. -Hannibal-
- « Previous
- Next »