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

[TOPIC-GPIO] mcux driver problems with pull configuration #19969

Closed
pabigot opened this issue Oct 20, 2019 · 3 comments
Closed

[TOPIC-GPIO] mcux driver problems with pull configuration #19969

pabigot opened this issue Oct 20, 2019 · 3 comments
Assignees
Labels
area: GPIO bug The issue is a bug, or the PR is fixing a bug

Comments

@pabigot
Copy link
Collaborator

pabigot commented Oct 20, 2019

gpio_basic_api currently passes on the topic branch, but #19553 has not yet been merged. What it does is make sure that gpio_pin_interrupt_configure() is not invoked from gpio_pin_configure() unless the flags include either enabling or disabling interrupts.

If gpio_pin_interrupt_configure() is not invoked from gpio_pin_configure() gpio_mcux starts to fail gpio_basic_api because in some way the pull flags are not being set properly:

NOTE: cannot configure pin as disconnected; trying as input

    Assertion failed at ../src/test_gpio_port.c:389: check_pulls: (raw_in() not 
equal to false)
physical pull-down does not read low
FAIL - test_gpio_port

This can be demonstrated in the current topic branch by removing the pass-through to gpio_pin_interrupt_configure() and running the test (which is not supposed to depend on any legacy processing of interrupt-related flags in gpio_pin_configure().

#19847 does not fix this problem.

@pabigot pabigot added bug The issue is a bug, or the PR is fixing a bug area: GPIO labels Oct 20, 2019
@mnkp
Copy link
Member

mnkp commented Oct 20, 2019

@pabigot Could you introduce a delay between the call to gpio_pin_configure and the moment you attempt to read out pin input level. The pull up resistors have typically large values, if there is any capacitance attached to the pin it will take a moment for the value to change.

@pabigot
Copy link
Collaborator Author

pabigot commented Oct 20, 2019

Thanks; I've verified that the problem does disappear with a delay before reading the signal.

@pabigot
Copy link
Collaborator Author

pabigot commented Oct 22, 2019

Should be resolved.

@pabigot pabigot closed this as completed Oct 22, 2019
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

No branches or pull requests

3 participants