-
Notifications
You must be signed in to change notification settings - Fork 141
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
gpio port not actually Floating #213
Comments
Hmm, what does the datasheet say? Maybe not every pin starts in floating input mode? |
@jonas-schievink I couldn't locate it in the datasheet. Sorry forgot to mention it's the 52840 DK and the pin I use is P1.08 |
Oh, I see the problem. The |
This seems to be the case for every nRF chip. I wonder why nobody hit this before. I think the proper fix would be to introduce a new "Disconnected" or "Reset" pin state and make every pin start in this state. |
I won’t be able to test it over the weekend, but next week I’ll give it a try. From looking at the change it makes a lot of sense to me. |
Got it tested, works great - thanks! |
Hi,
I'm not sure if this is expected, but it at least looks "weird" to me. The issue is that my Input, even though marked as Floating, doesn't work out of the box, only if I call
into_floating_input
explicitly on it.So, consider this code:
This work as expected (my
Tsic
takesPin<Input<Floating>>
as an argument). But if I do it like this, it compiles, but I'll never get the high and low states of the pin:Would it be possible that the port on the peripheral is neither
Floating
, norPullDown
orPullUp
but it would always have to be turnedinto
one of these types? This would make it explicit that it needs to be called, I couldn't figure out why my sensor didn't work and only stumbled on this by trial and error. Or is there something else going on that I'm missing?The text was updated successfully, but these errors were encountered: