Skip to content

Portenta H7: Fix digital-pin-gpios - problem with digitalWrite #143

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

Merged
merged 1 commit into from
Jun 17, 2025

Conversation

KurtE
Copy link

@KurtE KurtE commented Jun 17, 2025

There was an issue, where I think I screwed up earlier and defined the pins as all GPIO_ACTIVE_LOW in the digital-pin-gpios.

With this the digitalWrites were inverted.

I was having an issue with my ILI9341 library where the CS and DC pins states were inverted.

Created simple example sketch:

void setup() {
  // put your setup code here, to run once:
  pinMode(2, OUTPUT);
  pinMode(3, OUTPUT);
  pinMode(4, OUTPUT);
}

void loop() {
  // put your main code here, to run repeatedly:
  digitalWrite(2, HIGH);
  digitalWrite(3, HIGH);
  digitalWrite(4, HIGH);
  delay(50);
  digitalWrite(2, LOW);
  digitalWrite(3, LOW);
  digitalWrite(4, LOW);
  delay(250);
}

Before these changes:
image

With these changes:
image

And simple ILI9341 driver I have for Zephyr is working again... (Was working on GIGA)

There was an issue, where I think I screwed up earlier and defined the pins as all GPIO_ACTIVE_LOW in the digital-pin-gpios.

With this the digitalWrites were inverted.
@facchinm facchinm merged commit c1c2065 into arduino:arduino Jun 17, 2025
15 checks passed
@facchinm
Copy link
Member

Thanks for the fix Kurt, much appreciated!

@KurtE KurtE deleted the PortentaH7-digitalWrite_inverted branch June 17, 2025 11:54
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

Successfully merging this pull request may close these issues.

2 participants