2012-07-14 05:22 AM
I have been griping about a problem in the Std Peripheral Library whereby a ADC common init structure was not completely initialized in the examples provided.
The most recent F4 library Version V1.0.1 dated 28 December 2011 now has the statement: ADC_InitStructure.ADC_ExternalTrigConv = ADC_ExternalTrigConv_T1_CC1; which fixes the problem. Note that even if you are not using an external trigger by using the statement: ADC_InitStructure.ADC_ExternalTrigConvEdge = ADC_ExternalTrigConvEdge_None; the ADC_InitStructure.ADC_ExternalTrigConv statement is still needed to initialize that structure member to something in the valid range, otherwise strange results like 16 bit conversions occur. The T1_CC1 initialization is equivalent to initializing the structure member to 0. Cheers, Hal