AnsweredAssumed Answered

ADC or DMA issue with stm32f0_stdperiph_lib example

Question asked by von_ahnen.michael on Jul 30, 2012
Latest reply on Jul 31, 2012 by baird.hal.001
I am trying to run the RTC and ADC_DMA example code together on my STM320518-EVAL board.  I adjusted the code to remove the LCD display and send the ADC data output to the console.

It appears to me that some of the ADC channels are getting swapped.  The ADC reading that would have come from the potentiometer appears to be correct, it shows up in the first index of the array.

The second index, which should be the temperature sensor , appears to be reading the battery voltage (I disconnected it from the 3V rail).

The third index, which is the voltage reference appears to read correctly, it is always reading 1.3 V.

The fourth index, which is supposed to be the battery voltage, appears to be the temperature sensor.  The reading changes with the temperature of the device.

I am also confused why the ADC is configured for "ADC_ScanDirection_Backward" when the data read from the DMA is being treated like it is being read forward (ascending order).

Is this expected or is the due to the fact that I added in the RTC code or removed the LCD code?