Git Product home page Git Product logo

Comments (2)

eeFLis avatar eeFLis commented on June 4, 2024 2

Hi. Yes that makes sense to me THX. By the way great library saves a lot of time.

from ubxlib.

RobMeades avatar RobMeades commented on June 4, 2024

Hi there, and thanks for spotting this. You're quite right that the value of driveMode ends up being different when the VInt GPIO pin is set, depending on whether there was a pinEnablePower pin defined; a somewhat dangerous optimised construction on my part. I think the flow goes like this:

  • the initial default for pullMode at the start of the function is U_PORT_GPIO_PULL_MODE_NONE,
  • if there's a pinPwrOn it becomes U_PORT_GPIO_PULL_MODE_PULL_UP,
  • if there's a pinEnablePower it becomes U_PORT_GPIO_PULL_MODE_NONE,
  • for the final case, if there's a pinVint, it's not touched, so it will be whatever it was due to the presence of pinPwrOn or pinEnablePower.

Now we only have a single board on our test system with a pinEnablePower, so the vast majority of cases we test will have pinVInt set to U_PORT_GPIO_PULL_MODE_PULL_UP.

[caveat: I'm not a HW engineer!]

And that seems wrong to me. VInt is simply being monitored, it should not be pulled anywhere. Not that it seems to make a difference in our cases but it might in other HW setups.

To cut this rambling story short: I will test a change which explicitly sets all the goldarned IO config lines before each call to uPortGpioConfig(); certainty much better than optimisation in this case. And for the pinVint case the pull mode will be U_PORT_GPIO_PULL_MODE_NONE. Does that make sense to you?

from ubxlib.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.