Reading analog values with STM32F4 (ADC)

For some reasons, there is no simple guide on how to use the ADC of STM32F4, which is widely used in the STM32F4 Discovery Evaluation board. Here I use the GCC ARM toolchain with eclipse. Start STM32CubeMX which is available for nearly all platforms (Linux/Mac/Windows). Create a new…