Navigation Menu

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

Fix ESP8266 GPIO0 Pullup Validation #2572

Merged
merged 2 commits into from Oct 21, 2021
Merged

Conversation

OttoWinter
Copy link
Member

@OttoWinter OttoWinter commented Oct 21, 2021

What does this implement/fix?

ESP8266 does have a internal pullup resistors on pin GPIO0 that can
be toggled. But GPIO16 doesn't have any. I'm not sure whether there was a reason for this,
but from all reference material I could find it's like this:

  • GPIO 0-15 support internal pullups, but not pulldowns
  • GPIO 16 supports internal pulldown, but not pullup

Worth mentioning however is that GPIO0 usually has additional pullups anyway, because that's one of the strapping pins during boot and must be held high during that time.

Section 4.1 ESP8266EX Datasheet: https://espressif.com/sites/default/files/documentation/0a-esp8266ex_datasheet_en.pdf
TTAPA github guide: https://tttapa.github.io/ESP8266/Chap04%20-%20Microcontroller.html

Fixes esphome/issues#2574

Types of changes

  • Bugfix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Other

Related issue or feature (if applicable): fixes

Pull request in esphome-docs with documentation (if applicable): esphome/esphome-docs#

Test Environment

  • ESP32
  • ESP32 IDF
  • ESP8266

Example entry for config.yaml:

# Example config.yaml

Checklist:

  • The code change is tested and works locally.
  • Tests have been added to verify that the new code works (under tests/ folder).

If user exposed functionality or configuration variables are added/changed:

ESP8266 _does_ have a internal pullup resistors on pin GPIO16 that can
be toggled. But GPIO16 doesn't have any. I'm not sure whether there was a reason for this,
but from all reference material I could find it's like this:

- GPIO 0-15 support internal pullups, but not pulldowns
- GPIO 16 supports internal pulldown, but not pullup

Section 4.1 ESP8266EX Datasheet: https://espressif.com/sites/default/files/documentation/0a-esp8266ex_datasheet_en.pdf
TTAPA github guide: https://tttapa.github.io/ESP8266/Chap04%20-%20Microcontroller.html
@OttoWinter OttoWinter added this to the 2021.10.1 milestone Oct 21, 2021
@project-bot project-bot bot added this to Needs Review in ESPHome Dev Oct 21, 2021
@probot-esphome
Copy link

Hey there @esphome/core, mind taking a look at this pull request as it has been labeled with an integration (esp8266) you are listed as a code owner for? Thanks!
(message by CodeOwnersMention)

@OttoWinter OttoWinter changed the title Correct ESP8266 GPIO0 Pullup Validation Fix ESP8266 GPIO0 Pullup Validation Oct 21, 2021
ESPHome Dev automation moved this from Needs Review to Reviewer Approved Oct 21, 2021
@OttoWinter OttoWinter merged commit 7f34561 into dev Oct 21, 2021
ESPHome Dev automation moved this from Reviewer Approved to Done Oct 21, 2021
@OttoWinter OttoWinter deleted the correct-esp8266-gpio0-pullup branch October 21, 2021 10:23
OttoWinter added a commit that referenced this pull request Oct 21, 2021
@OttoWinter OttoWinter mentioned this pull request Oct 21, 2021
@github-actions github-actions bot locked and limited conversation to collaborators Oct 23, 2021
ESPHome Dev automation moved this from Done to Reviewer Approved Sep 23, 2023
ESPHome Dev automation moved this from Reviewer Approved to Done Sep 23, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
Development

Successfully merging this pull request may close these issues.

GPIO Pin 0 does not support Pullup mode
2 participants