Summary
Calling digitalWrite() for PC_2 with a boolean true/false causes PA_8 to be toggled instead.
Calling digitalWrite() for PC_2 with a LOW/HIGH works as intended.
Hardware
Board: Portenta H7
Core Version: Arduino-Mbed 4.4.1
Arduino IDE Version: 2.3.7
Arduino IDE CLI Version: 1.3.1
Steps to reproduce
Attach an oscilloscope or logic analyzer to the following pins:
- PA_8 / D6 / PWM_0
- PC2_C / A2 / ADC A2
- PC2 / A4 / ADC A4
- PC2 / D10 / SPI1_CIPO
and run the following code
void setup()
{
pinMode(PC_2, OUTPUT);
}
void loop() {
digitalWrite(PC_2, false);
delay(1000);
digitalWrite(PC_2, true);
delay(1000);
}
My logic analyzer gives the following output:
Compare this to the following functional code:
void setup ()
{
pinMode(PC_2, OUTPUT);
}
void loop ()
{
digitalWrite(PC_2, LOW);
delay(1000);
digitalWrite(PC_2, HIGH);
delay(1000);
}
Which gives the following output

Expected Behavior
Using true/false instead of LOW/HIGH should be equivalent.
MOST IMPORTANTLY: doing so should absolutely not affect a different pin number on a different GPIO port altogether.
Actual Behavior
Using true/false instead of LOW/HIGH on one port + pin has no effect on the intended port + pin but does have an effect on a different GPIO port + pin.
Summary
Calling digitalWrite() for PC_2 with a boolean true/false causes PA_8 to be toggled instead.
Calling digitalWrite() for PC_2 with a LOW/HIGH works as intended.
Hardware
Board: Portenta H7
Core Version: Arduino-Mbed 4.4.1
Arduino IDE Version: 2.3.7
Arduino IDE CLI Version: 1.3.1
Steps to reproduce
Attach an oscilloscope or logic analyzer to the following pins:
and run the following code
My logic analyzer gives the following output:
Compare this to the following functional code:
Which gives the following output

Expected Behavior
Using true/false instead of LOW/HIGH should be equivalent.
MOST IMPORTANTLY: doing so should absolutely not affect a different pin number on a different GPIO port altogether.
Actual Behavior
Using true/false instead of LOW/HIGH on one port + pin has no effect on the intended port + pin but does have an effect on a different GPIO port + pin.