zephyriot / zephyr-issues

0 stars 0 forks source link

ADC: ADC fails to work when fetch multiple sequence entries #1352

Open nashif opened 7 years ago

nashif commented 7 years ago

Reported by Qiu Peiyang:

Configuration

arc Quark Se Devboard Unified Bug detailed description =================== ADC fails to work when fetch multiple sequence entries. But the same configuration works when sequence entry is 1. Steps to Reproduce ================== 1. Download and unzip the attached case. 2. source zephyr-env.sh 3. make BOARD=quark_se_c1000_ss_devboard -C test_adc_multiple_sequences/test_adc_resolution_12bits Expected Result ============= ADC will fetch value successfully Actual Result ========== ADC fails to fetch value. (Imported from Jira ZEP-1482)
nashif commented 7 years ago

by Qiu Peiyang:

nashif commented 7 years ago

by Qiu Peiyang:

The same configuration may work when SAMPLE_WITH is configured to other values. However I cannot find the connections between these failure and success.

nashif commented 7 years ago

by Qiu Peiyang:

Another question, we can configure the cfg.window during runtime, which is adc_seq_entry.sampling_delay, why we are not allowed to configure cfg.resolution during runtime ? This doesn't make sense, and we may need to use different sample width in one APP.

nashif commented 7 years ago

by Mark Linkmeyer:

Fixing incorrect priority

nashif commented 7 years ago

by Andy Ross:

Can you clarify? What does "multiple sequence entries" mean? What does "fails to fetch value?" mean?

Are you getting a runtime error? Or are you getting a value read that doesn't seem to correspond to the voltage on the pin? Can you be explicit about exactly how you tested, and what was connected to the analog input?

nashif commented 7 years ago

by Qiu Peiyang:

Hi Andy Ross

There is a struct "adc_seq_table" which defines a list of sequence entries used to execute a sequence of samplings. This case uses two sequence entries in a sequence table and wants to return 2 samples from two specific channels which are channel 10 and channel 11. I connect GPIO_SS_AIN_10 and GPIO_SS_AIN_11 to 3.3V and try to fetch data from the pins, but the case fails to fetch samples and return error code "EIO". But if I modify the case and just want to fetch sample data from channel 10, then the case can pass.

nashif commented 7 years ago

by Andy Ross:

Is this maybe a duplicate of GH-3330 (suspected code generation problem)? Can you try the workaround there?