AnsweredAssumed Answered

Can an F0 be configured to capture X adc samples from a single channel after an EXT trig?

Question asked by williams.darcy.001 on Oct 6, 2016
Latest reply on Oct 10, 2016 by FTITI.Walid
I was able to achieve something similar on the F1 by using the ADC in discontinuous mode and specifying ranked regular conversions of the same channel up to 16 times.

Using this method, an external trigger (e.g. TIM OC) could be used to capture X conversions of a single channel every time the external trigger fired.  Great!

Can I do this with the F0?  I have a 70-200 microsecond window in which I need to take about 8 samples of a single channel.  In 12 bit mode, with a 71.5 cycle conversion, that takes 5.11us (let's round to 5us).  I want to ignore the first 15-20us of my minimum 70us pulse.  The way I would have done this on the F1 is to DMA capture 20us + 40us of samples in to a circular buffer only big enough to hold the last 40us (i.e. so a total of 12 conversions, in to an 8 sample circular buffer).  After the conversion has taken place, I can then inspect the buffer to retrieve the samples taken in the window between 20 and 60 micro seconds.  Great!

Can I do anything like this on the F0?  It seems I can start the DMA conversion on a single channel, but that there isn't a way to say "Do it 12 times only, then stop".  

I can sample 16 different channels once each then stop...  but not the same channel 16 times.

I could conceivably use the falling pulse edge to 'stop' the conversion but there isn't a method to do that either from what I can see.

Have I missed something in the manual, or is this just a pitfall of the reduced functionality on the F0?

Thanks all!