ADC_GRP_NUM_CHANNELS = 1
ADC_GRP_BUF_DEPTH = 1
raw ADC reading is 34 but the voltage on the pin is 1V so i would have thought the reading should be alot higher
adcStart is been called and ADC1 is enabled etc.....
conversion started using
adcStartConversion(adcp, &adcgrpcfg, samples, ADC_GRP_BUF_DEPTH);
Here is the config struct
Code: Select all
static const ADCConversionGroup adcgrpcfg = {
.circular = false,
.num_channels = ADC_GRP_NUM_CHANNELS,
.end_cb = adc_end_callback,
.error_cb = adc_error_callback,
.cfgr = ADC_CFGR_RES_12BITS,
.tr1 = ADC_TR_DISABLED,
.tr2 = ADC_TR_DISABLED,
.tr3 = ADC_TR_DISABLED,
.awd2cr = 0U,
.awd3cr = 0U,
.smpr = {
ADC_SMPR1_SMP_AN3(ADC_SMPR_SMP_47P5)
},
.sqr = {
ADC_SQR1_SQ1_N(ADC_CHANNEL_IN3)
}
};