Dear Dialog team,
I want to use ADC by differential mode, but I can't understand how to set input pins.
For example, I want to set P0_6 as positive input pin and P0_7 as negative input pin.
But I couldn't set both input pin in adc_config_t because selectable input pin is one.
adc_config_t adc_cfg =
{
.input_mode = ADC_INPUT_MODE_DIFFERENTIAL,
.input = ADC_INPUT_DIFF_P0_6, // Where can I write ADC_INPUT_DIFF_P0_7 ?
.smpl_time_mult = 2,
.continuous = false,
.interval_mult = 0,
.input_attenuator = ADC_INPUT_ATTN_NO,
.chopping = false,
.oversampling = 1
};
Could you tell me the solution?
Best Regards,
Keywords:
Device:
Hi imaizumi.k,
Thanks for your question and for your inputs. I would like to inform you that we are working on that internally, so I will get back to you as soon as possible.
Thanks, PM_Dialog
Hi imaizumi.k,
The ADC configuration structure seems to be correct. Please use the same configuration structure and pass it into adc_init(). After the call of adc_init(&adc_cfg); you should select the P0_6 as a positive input, so please add the following line:
然后,你商店uld use adc_set_diff_input() function in order to select the negative differential input channel.
Please let me know if you can use the differential with the above instruction. Any feedback or suggestion would be more than welcome!
Thanks, PM_Dialog
Thank you for your response.
But I’m worried to access register directly for setting a positive input without using API.
Do you have some plan to improve ADC API ?
Best Regards,
Hi imaizumi.k,
I have already raised it internally. Thanks for your valuable feedback.
Regards, PM_Dialog