2018-05-09 08:50 PM
I have a question rooted in pure curiosity as I am still learning my around the STM8 MCU structure. In the general setup of the ADC, single mode conversion and software triggered, we have to call ADC_GetConversionValue(ADC1) once the ADC has finished its sampling and conversion cycles. This function should retrieve a value from the register to be saved locally. I expected this function to not take too long, but by roughly measuring the time(toggling GPIO pins around the functions and viewing on an oscilloscope) for the function to execute, I measure 5us. This becomes pretty substantial when you are trying to measure short pulse waveforms, but need a high data point collection set. Does anyone have the explanation as to why this retrieval takes that long?
2018-05-10 05:57 AM
Take a look at the source code and all your curiosity will be satisfied.