Open PeeJay opened 2 months ago
Please use our bug template when reporting bugs. You need to edit this issue to include the information requested in https://github.com/zephyrproject-rtos/zephyr/blob/main/.github/ISSUE_TEMPLATE/001_bug_report.md
This issue has been marked as stale because it has been open (more than) 60 days with no activity. Remove the stale label or add a comment saying that you would like to have the label removed otherwise this issue will automatically be closed in 14 days. Note, that you can always re-open a closed issue at any time.
While using the adc_dt sample with an Atmel SamE51 board with multiple adc inputs, I noticed that all channels were reading from the same mux input on the ADC. Inspecting adc_sam0.c reveals that the mux position is set inside of adc_channel_setup_dt, so naturally the last chanel to get setup is the one actually read, regardless of what is passed to adc_read_dt(). Having a quick look at adc_nrfx_adc.c it appears that the channels are selected inside of start_read(). If I run adc_channel_setup_dt() before adc_sequence_init_dt() then it works as expected, however that doesn't seem to be the intended behaviour.