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

Hold GPIOs in relevant state until used #39

Open
piersfinlayson opened this issue Nov 21, 2017 · 5 comments
Open

Hold GPIOs in relevant state until used #39

piersfinlayson opened this issue Nov 21, 2017 · 5 comments

Comments

@piersfinlayson
Copy link
Owner

GPIOs are held up or down by pull-up/pull-down resistors by default. While some GPIOs do change during the boot phase and are controlled by the chip (or SDK) the others will just remain pulled up and down until we set them. We should by default leave the GPIOs in this state when we first set them so that we don't get quick switching - which is bad for example for the relay board.

@piersfinlayson
Copy link
Owner Author

piersfinlayson commented Nov 21, 2017

In otbiot designs:

  • GPIO0 up
  • GPIO2 up
  • GPIO4 up
  • GPIO5 up
  • GPIO12 up
  • GPIO13 up
  • GPIO14 up
  • GPIO15 down
  • GPIO16 up

@piersfinlayson
Copy link
Owner Author

Wemos D1 mini:

  • GPIO0 up
  • GPIO2 up
  • GPIO4 floating
  • GPIO5 floating
  • GPIO12 floating
  • GPIO13 floating
  • GPIO14 floating
  • GPIO15 down
  • GPIO16 floating

@piersfinlayson
Copy link
Owner Author

Therefore we can set the GPIOs per the otbiot designs.

@piersfinlayson
Copy link
Owner Author

Note some of these will be overridden when a pin is used for a specific purpose. On otbiot boards this is:

  • 0/2 (internal I2C bus)
  • 14 (soft reset)
  • 15 (status_led)
  • 16 (hard reset)

@piersfinlayson
Copy link
Owner Author

Other things which (may) transpire to break this:

  • calling otb_gpio_apply_boot_state from otb_main (user_init)
  • calling otb_nixie_module_init (actually doesn't but could do)

Don't want to break existing deployed GPIO based relay and nixie modules, so need to test for presence of any module.

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