Y
Y
Yaroslav2015-09-29 00:51:10
Microcontrollers
Yaroslav, 2015-09-29 00:51:10

STM32F103. What is in the DR register before the end of the conversion?

There is an MK STM32F103 and its built-in ADC. It has a DR register, where the ADC puts the result of the conversion. Here we start the next transformation and while we are waiting for the result, we can do whatever we want. Here is the question - what is going on in the DR register at this time? Does the previous transformation lie there, or do the values ​​of successive approximations go over there? Is it possible to run the transformation and then pick up the result of the previous one? And then writing to the array takes as much as 100 nanoseconds (I'm in shock!) And doing this between conversions is losing speed (and messing around with the RAP for the sake of a dozen samples is stupid). I did not find the answer in the datasheets and appnotes.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
E
Eddy_Em, 2015-09-29
@Eddy_Em

and fiddling with the RAP for the sake of a dozen samples is stupid

What nonsense? I even use for one PDP transformation: a circular buffer of 9 values, which is filled slowly. As soon as I need to get a value in the ADC, I do a median filtering of this buffer and get a more or less smooth value.
And in general, no need to sweat. There is no "garbage" in DR. Checked: say, in a downhill chronometer, I simply run a continuous conversion, which updates the values ​​\u200b\u200bof different ADC channels via DMA, and when necessary, I take these values ​​directly. In a similar thing, where only 1 channel was needed, I just contacted DR directly!

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question