stimmer:
The line adc_init(ADC, SystemCoreClock, ADC_FREQ_MAX, ADC_STARTUP_FAST); sets the prescal value - there is also ADC_FREQ_MIN and you can pass any value in between.
There is something I am missing.... if I want to set up an effective 20kHz or 50 KHz sampling rate using this method, what should I write?
The line adc_init(ADC, SystemCoreClock, 50000, ADC_STARTUP_FAST); feels wrong since ADC_FREQ_MIN is 1000000
Thank you