Skip to content
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

Test gpio_basic_api hangs on cc3220sf_launchxl #22847

Closed
vanti opened this issue Feb 14, 2020 · 0 comments · Fixed by #22850
Closed

Test gpio_basic_api hangs on cc3220sf_launchxl #22847

vanti opened this issue Feb 14, 2020 · 0 comments · Fixed by #22850
Assignees
Labels
area: GPIO bug The issue is a bug, or the PR is fixing a bug

Comments

@vanti
Copy link
Collaborator

vanti commented Feb 14, 2020

Describe the bug
The test hangs in the middle of execution of test_gpio_deprecated:


OUT init a01, IN cfg 74000, cnt 2
PASS - test_gpio_callback_variants
===================================================================
starting test - test_gpio_deprecated
callback triggered: 1
INT cfg 50000, cnt 1
callback triggered: 1
INT cfg 30000, cnt 1
callback triggered: 1
callback triggered: 2
INT cfg 74000, cnt 2

To Reproduce
Steps to reproduce the behavior:

  1. cd tests/drivers/gpio/gpio_basic_api
  2. west build -b cc3220sf_launchxl -p
  3. west flash
  4. See error

Expected behavior
The test should not hang

Impact
sanitycheck fails as a result.

Environment (please complete the following information):

  • OS: Ubuntu 18.04
  • Toolchain (e.g Zephyr SDK, ...): Zephyr SDK 0.11.1
  • Commit SHA or Version used: 1736cb7
@vanti vanti added the bug The issue is a bug, or the PR is fixing a bug label Feb 14, 2020
@vanti vanti changed the title gpio_basic_api hangs on cc3220sf gpio_basic_api hangs on cc3220sf_launchxl Feb 14, 2020
@vanti vanti changed the title gpio_basic_api hangs on cc3220sf_launchxl Test gpio_basic_api hangs on cc3220sf_launchxl Feb 14, 2020
vanti added a commit to vanti/zephyr that referenced this issue Feb 15, 2020
In the gpio isr, gpio interrupts are disabled when invoking the
registered callbacks. This is unnecessary, and causes a problem if the
callback attempts to disable gpio interrupts by reconfiguring the pin
as in the test gpio_basic_api.

Fixes zephyrproject-rtos#22847

Signed-off-by: Vincent Wan <vincent.wan@linaro.org>
vanti added a commit to vanti/zephyr that referenced this issue Feb 17, 2020
Disabling gpio interrupts on the pin prior to changing its interrupt
type to level-based helps prevent spurious interrupts that would be
otherwise observed, if gpio interrupts were originally enabled when
gpio_cc32xx_pin_interrupt_configure() is invoked.

Fixes zephyrproject-rtos#22847

Signed-off-by: Vincent Wan <vincent.wan@linaro.org>
@galak galak assigned galak and vanti and unassigned galak Feb 18, 2020
@galak galak added the has-pr label Feb 18, 2020
galak pushed a commit that referenced this issue Feb 18, 2020
In the gpio isr, gpio interrupts are disabled when invoking the
registered callbacks. This is unnecessary, and causes a problem if the
callback attempts to disable gpio interrupts by reconfiguring the pin
as in the test gpio_basic_api.

Fixes #22847

Signed-off-by: Vincent Wan <vincent.wan@linaro.org>
galak pushed a commit that referenced this issue Feb 18, 2020
Disabling gpio interrupts on the pin prior to changing its interrupt
type to level-based helps prevent spurious interrupts that would be
otherwise observed, if gpio interrupts were originally enabled when
gpio_cc32xx_pin_interrupt_configure() is invoked.

Fixes #22847

Signed-off-by: Vincent Wan <vincent.wan@linaro.org>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: GPIO bug The issue is a bug, or the PR is fixing a bug
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants