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

Weird input behaviour with PINMUX_GPIO #208

Open
StjerneIdioten opened this issue Aug 1, 2021 · 0 comments
Open

Weird input behaviour with PINMUX_GPIO #208

StjerneIdioten opened this issue Aug 1, 2021 · 0 comments

Comments

@StjerneIdioten
Copy link

Describe the bug
I use the rc_pinmux_set() to set some of the SPI pins to regular GPIO as well as using it for some of the normal GPIO pins as well to set pull-ups. Now the strange thing is that if I chose either PINMUX_GPIO_PU or PINMUX_GPIO_PD as the mode there is no problem, everything works as expected when I read the inputs. But if I chose PINMUX_GPIO then some of the pins are stuck to only reading 0.

I am using GPIO1_25, GPIO1_17, GPIO3_20, GPIO3_17, SPI1_MOSI, SPI1_MISO, SPI1_SCK, SPI1_SS2 and out of those SPI1_MOSI, GPIO1_17, GPIO3_17 are not reading anything but 0 unless I activate the internal pull-ups/downs.

To Reproduce
Set the before mentioned pins to PINMUX_GPIO as well as initialize them as input using rc_gpio_init(), if you read them they only return a 0. If you instead enable pull-ups/downs with the pinmux, then they work as expected.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant