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

[gen3] hal: fix gpio glitch #2787

Merged
merged 1 commit into from
Jun 21, 2024
Merged

Conversation

XuGuohui
Copy link
Member

Problem

pinMode(pin, OUTPUT_OPEN_DRAIN) or pinMode(pin, OUTPUT_OPEN_DRAIN_PULLUP) cause I/O glitch.

Solution

When configuring a pin as OUTPUT_OPEN_DRAIN or OUTPUT_OPEN_DRAIN_PULLUP using pinMode(), it sets the output value to 1 to release the pin control.

Steps to Test

Flash the following test app and use logic analyzer or oscilloscope to monitor the state of the pin being configured

Example App

#include "application.h"

SYSTEM_MODE(SEMI_AUTOMATIC);

void setup() {
    delay(5s);
    pinMode(D0, OUTPUT_OPEN_DRAIN); // or OUTPUT_OPEN_DRAIN_PULLUP
}

void loop() {
}

References

N/A


Completeness

  • User is totes amazing for contributing!
  • Contributor has signed CLA (Info here)
  • Problem and Solution clearly stated
  • Run unit/integration/application tests on device
  • Added documentation
  • Added to CHANGELOG.md after merging (add links to docs and issues)

@XuGuohui XuGuohui marked this pull request as ready for review June 21, 2024 01:41
@scott-brust scott-brust merged commit 5009ff5 into develop Jun 21, 2024
13 checks passed
@scott-brust scott-brust deleted the fix/sc124967/pin-mode-glitch branch June 21, 2024 16:07
@scott-brust scott-brust mentioned this pull request Jul 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants