Reading ADC after exactly 1.56 us
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2014-01-09 04:20 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2014-01-09 05:05 AM
This is why ADC can be triggered from timers.
JW- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2014-01-09 05:22 AM
Per your [DEAD LINK /public/STe2ecommunities/mcu/Lists/STM32Discovery/Flat.aspx?RootFolder=/public/STe2ecommunities/mcu/Lists/STM32Discovery/Timer%20value%20calculation&FolderCTID=0x01200200770978C69A1141439FE559EB459D75800084C20D8867EAD444A5987D47BE638E0F&TopicsView=https://my.st.com/public/STe2ecommunities/mcu/Lists/STM32Discovery/AllItems.aspx¤tviews=871]earlier thread, what part about the fact you can't interrupt at these sorts of rates can't you get your head around?
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-01-09 06:57 AM
The timer is not set up the way the comments suggest, please fix that so we don't have to guess what your system/attentions are.
You have TIM2 basically interrupting every 100 cycles, of 84 MHz?, or 200 machine cycles. You can't do a lot with that, but you need to be very conscious about what you're doing, and how long that takes, or could take. You need to let the HARDWARE manage high rate tasks. You make the TIM trigger the ADC You make the DMA copy the data at EOC You make the ADC sequence the channels And you service interrupt when you have dozens, or hundreds of samples to process. You'll need to evaluate the resources you have, the documented function, and if that's sufficient to do what you want, in the way that you want. If there aren't the resources, then you'll need to consider how you might address, mitigate, or adapt what you're doing so you can.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-01-09 09:09 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2014-01-09 09:30 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2014-01-10 04:25 AM
I'm not annoyed as much as I'm frustrated. I don't want to own your project, I have my degree already.
As you need to read 4 different pins in a cascade style, your option really is to program the list into the ADC and use sequence/continuous mode, and play games with the sample time, and inter-sample space setting, and bus clocks, to get the exact pacing you are looking for. You could confirm the pacing via a GPIO toggled on DMA HT and TC interrupts, and measured on a scope.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-01-10 07:05 AM
Ok, let's try playing this a different way.
Draw a system diagram for your sonar system, illustrating where these 4 analogue signals come from, what they are measuring, and what you expect the signals to look like. Are they from a delay line?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-01-12 09:28 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2014-01-13 07:10 AM
Ok, but why four separate analogue signals? Please DIAGRAM this system.
Again going to suggest to tune the clocking source, and sample time, and inter-sample time to meet your periodicity goals. Or if you don't need multiple analogue sources sample one aggressively and process the data.Up vote any posts that you find helpful, it shows what's working..