Skip to content

tests/drivers/adc/adc_api/ fails on quark platforms #12632

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
arun1joshi opened this issue Jan 22, 2019 · 5 comments
Closed

tests/drivers/adc/adc_api/ fails on quark platforms #12632

arun1joshi opened this issue Jan 22, 2019 · 5 comments
Assignees
Labels
bug The issue is a bug, or the PR is fixing a bug priority: low Low impact/importance bug

Comments

@arun1joshi
Copy link
Contributor

arun1joshi commented Jan 22, 2019

The test in tests/drivers/adc/adc_api/ fails with Assertion Failure on quark platforms.

The test is failing after this commit: 0906a51

Arch: x86, ARC
Platforms: quark_se_c1000, quark_d2000

Error on console log:
quark_se_c1000:arc

 ***** delaying boot 1000ms (per build configuration) *****
 ***** Booting Zephyr OS zephyr-v1.13.0-3318-g0906a51dac (delayed boot 1000ms) *****
 Running test suite adc_basic_test
 ===================================================================
 starting test - test_adc_sample_one_channel

     Assertion failed at ../zephyr/tests/drivers/adc/adc_api/src/test_adc.c:212: test_task_one_channel: (ret not equal to 0)
 adc_read() failed with code -5
 FAIL - test_adc_sample_one_channel
 ===================================================================
 starting test - test_adc_sample_two_channels

     Assertion failed at ../zephyr/tests/drivers/adc/adc_api/src/test_adc.c:246: test_task_two_channels: (ret not equal to 0)
 adc_read() failed with code -5
 FAIL - test_adc_sample_two_channels
 ===================================================================
 starting test - test_adc_asynchronous_call

     Assertion failed at ../zephyr/tests/drivers/adc/adc_api/src/test_adc.c:296: test_task_asynchronous_call: (ret not equal to 0)
 adc_read_async() failed with code -22
 FAIL - test_adc_asynchronous_call
 ===================================================================
 ***** delaying boot 1000ms (per build configuration) *****
 ***** Booting Zephyr OS zephyr-v1.13.0-3318-g0906a51dac (delayed boot 1000ms) *****
 Running test suite adc_basic_test
 ===================================================================
 starting test - test_adc_sample_one_channel

     Assertion failed at ../zephyr/tests/drivers/adc/adc_api/src/test_adc.c:212: test_task_one_channel: (ret not equal to 0)
 adc_read() failed with code -5
 FAIL - test_adc_sample_one_channel
 ===================================================================
 starting test - test_adc_sample_two_channels

     Assertion failed at ../zephyr/tests/drivers/adc/adc_api/src/test_adc.c:246: test_task_two_channels: (ret not equal to 0)
 adc_read() failed with code -5
 FAIL - test_adc_sample_two_channels
 ===================================================================
 starting test - test_adc_asynchronous_call

     Assertion failed at ../zephyr/tests/drivers/adc/adc_api/src/test_adc.c:297: test_task_asynchronous_call: (ret not equal to 0)
 adc_read_async() failed with code -21
 FAIL - test_adc_asynchronous_call
 ===================================================================
 starting test - test_adc_sample_with_interval
 sample_with_interval_callback: sampling 1
 sample_with_interval_callback: sampling 2
 sample_with_interval_callback: sampling 3
 sample_with_interval_callback: sampling 4
 sample_with_interval_callback: sampling 5

     Assertion failed at ../zephyr/tests/drivers/adc/adc_api/src/test_adc.c:351: test_task_with_interval: (ret not equal to 0)
 adc_read() failed with code -4
 FAIL - test_adc_sample_with_interval
 ===================================================================
 starting test - test_adc_repeated_samplings

     Assertion failed at ../zephyr/tests/drivers/adc/adc_api/src/test_adc.c:438: test_task_repeated_samplings: (ret not equal to 0)
 adc_read() failed with code -21
 FAIL - test_adc_repeated_samplings
 ===================================================================
 starting test - test_adc_invalid_request

     Assertion failed at ../zephyr/tests/drivers/adc/adc_api/src/test_adc.c:484: test_task_invalid_request: (ret not equal to 0)
 adc_read() failed with code -4
 FAIL - test_adc_invalid_request
 ===================================================================
 Test suite adc_basic_test failed.
 ===================================================================
 PROJECT EXECUTION FAILED

On quark_d2000:x86, only 2 test cases fail - test_adc_asynchronous_call, test_adc_repeated_samplings:

***** delaying boot 1000ms (per build configuration) *****
***** Booting Zephyr OS zephyr-v1.13.0-3318-g0906a51dac (delayed boot 1000ms) *****
Running test suite adc_basic_test
===================================================================
starting test - test_adc_sample_one_channel
Samples read: 0x03e4 0x0000 0x0000 0x0000 0x0000 0x0000
PASS - test_adc_sample_one_channel
===================================================================
starting test - test_adc_sample_two_channels
Samples read: 0x03ff 0x03fe 0x0000 0x0000 0x0000 0x0000
PASS - test_adc_sample_two_channels
===================================================================
starting test - test_adc_asynchronous_call

    Assertion failed at ../zephyr/tests/drivers/adc/adc_api/src/test_adc.c:296: test_task_asynchronous_call: (ret not equal to 0)
adc_read_async() failed with code -22
FAIL - test_adc_asynchronous_call
===================================================================
***** delaying boot 1000ms (per build configuration) *****
***** Booting Zephyr OS zephyr-v1.13.0-3318-g0906a51dac (delayed boot 1000ms) *****
Running test suite adc_basic_test
===================================================================
starting test - test_adc_sample_one_channel
Samples read: 0x03e4 0x0000 0x0000 0x0000 0x0000 0x0000
PASS - test_adc_sample_one_channel
===================================================================
starting test - test_adc_sample_two_channels
Samples read: 0x03ff 0x03fe 0x0000 0x0000 0x0000 0x0000
PASS - test_adc_sample_two_channels
===================================================================
starting test - test_adc_asynchronous_call

    Assertion failed at ../zephyr/tests/drivers/adc/adc_api/src/test_adc.c:296: test_task_asynchronous_call: (ret not equal to 0)
adc_read_async() failed with code -22
FAIL - test_adc_asynchronous_call
===================================================================
starting test - test_adc_sample_with_interval
sample_with_interval_callback: sampling 0
sample_with_interval_callback: sampling 1
sample_with_interval_callback: sampling 2
sample_with_interval_callback: sampling 3
sample_with_interval_callback: sampling 4
Samples read: 0x03fc 0x03fd 0x03fb 0x03fe 0x03ff 0x0000
PASS - test_adc_sample_with_interval
===================================================================
starting test - test_adc_repeated_samplings

    Assertion failed at ../zephyr/tests/drivers/adc/adc_api/src/test_adc.c:437: test_task_repeated_samplings: (ret not equal to 0)
adc_read() failed with code -22
FAIL - test_adc_repeated_samplings
===================================================================
starting test - test_adc_invalid_request
Samples read: 0x03ff 0x0000 0x0000 0x0000 0x0000 0x0000
PASS - test_adc_invalid_request
===================================================================
Test suite adc_basic_test failed.
===================================================================
PROJECT EXECUTION FAILED
@arun1joshi arun1joshi added the bug The issue is a bug, or the PR is fixing a bug label Jan 22, 2019
@nashif nashif added the priority: low Low impact/importance bug label Jan 29, 2019
@cinlyooi-intel
Copy link
Contributor

cinlyooi-intel commented Feb 19, 2019

quark_se_c1000_ss_devboard:arc for commit cf94d68 has same failure. Did not check adc_read() return code

@cinlyooi-intel
Copy link
Contributor

quark_d2000_crb:x86 for commit cf94d68 has same failures

@nashif nashif assigned dcpleung and unassigned nashif Mar 5, 2019
@nashif
Copy link
Member

nashif commented Mar 5, 2019

@dcpleung you had dealt with the ADC for quark recently, can you please take a look?

dcpleung added a commit to dcpleung/zephyr that referenced this issue Mar 14, 2019
The logic in sampling is incorrect. The code sets up the hardware
to do multiple conversions, but in reality, each call is simply
one conversion. So fix it.

Fixes zephyrproject-rtos#12632

Signed-off-by: Daniel Leung <[email protected]>
dcpleung added a commit to dcpleung/zephyr that referenced this issue Mar 14, 2019
Since commit 0906a51, the driver
fails the test: tests/drivers/adc/adc_api. Some of the workflow
turns out to be incorrect (e.g. not doing dummy conversion after
getting out of deep power down, and not clearing interrupt status
bits). So take some time to overhaul the driver. Also rename
the driver to adc_intel_quark_se_c1000_ss because the inner
working of this driver is tied to Quark SE C1000 SoC.

Fixes: zephyrproject-rtos#12632

Signed-off-by: Daniel Leung <[email protected]>
@cinlyooi-intel
Copy link
Contributor

Reproduce on

  1. quark_d2000:x86, and
  2. quark_se_c1000:arc

for Commit ID: 96235c5

andrewboie pushed a commit that referenced this issue Mar 21, 2019
Since commit 0906a51, the driver
fails the test: tests/drivers/adc/adc_api. Some of the workflow
turns out to be incorrect (e.g. not doing dummy conversion after
getting out of deep power down, and not clearing interrupt status
bits). So take some time to overhaul the driver. Also rename
the driver to adc_intel_quark_se_c1000_ss because the inner
working of this driver is tied to Quark SE C1000 SoC.

Fixes: #12632

Signed-off-by: Daniel Leung <[email protected]>
@arun1joshi
Copy link
Contributor Author

verified ok on commit [cf91f8c]

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug The issue is a bug, or the PR is fixing a bug priority: low Low impact/importance bug
Projects
None yet
Development

No branches or pull requests

4 participants