2012-07-30 11:11 AM
I am trying to run the RTC and ADC_DMA example code together on my
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?2012-07-31 09:55 AM
Except for the pot array location, this appears normal. The F0 has a different ADC from other Fx's, and will actually scan backwards. If you are still stumped, post the code.
Cheers, Hal