Can the STM32 ADC do what the PIC16F ADC can do?
I have an existing design using an 8-bit PIC16F and am attempting to upgrade it to using the STM32L071, primarily due to needing more memory. This design has 6 input signals being sampled using the same ADC. One signal is an audio signal that needs to be sampled at an 8kHz rate. The other five signals are DC and their sampling rate isn't critical. With the PIC, I am using a timer to trigger ADC conversions at a 16kHz rate. The process then selects a different input upon the ADC results completion interrupt. It alternates between the audio signal and any of the other five DC signals, thus sampling the audio at an 8kHz rate. So... sample the audio, then DC1, audio, DC2, audio, DC3, etc. This has proven to be a solid process using the PIC. However, I cannot get this to work with the STM32 ADC because you cannot select or switch the input signals in this manner using the STM32 ADC. If I understand it correctly, you must pre-define all your inputs and sample them in the order they are labeled (or in reverse of that order). I am running experiments to fully understand the modes and capabilities of the STM32 ADC, but am struggling to find a way to use it for my purpose. Am I correct in my understanding? That you must pre-define the ADC inputs and can only change them by re-initializing. Can anyone with a good understanding of the STM32 ADC provide me with some direction?