Hello,
could you please provide more specific parameters for ADC than those given in QCA4010 System-on-Chip Device Specification
especially:
how the 1LSB is expressed in input voltage,
valid voltage ranges for conversion
impedance of an ADC input (I guess this might a capacitive one and dynamic depending sample rate)
proper order of initialization and calibration, so far I am using:
A_STATUS status; status = qcom_adc_init((A_UINT8)GAIN_SCALE_1V8, (A_UINT8)12, ADC_FREQ_31P25_KHZ, (A_UINT8)SINGLE_ENDED, FALSE); if (status) {A_PRINTF("# Adc init failed %d\n", status); return;} status = qcom_adc_calibration(12, SINGLE_ENDED); if (status) {A_PRINTF("# Adc calibration failed %d\n", status); return;} status = qcom_adc_config(1, HW_TRIGGER_TIMER, 0, adcChannelsConfig, adcChannelsCount); if (status) {A_PRINTF("# Adc config failed %d\n", status); return;} status = qcom_adc_dma_config(0, adcChannelsCount); // no threshold, just one sample per channel if (status) {A_PRINTF("# Adc dma config failed %d\n", status); return;} status = qcom_adc_timer_config(10, TIME_UNIT_10MS); if (status) {A_PRINTF("# Adc timer config failed %d\n", status); return;}
it does not return an error, but I am not confident with the conversion results.
Best regards