Black Pill miss alignment between PB12 ~ PB15 and PB_12 ~ PB_15
Posted: Sun Sep 12, 2021 9:44 am
There is miss alignment between PB12 ~ PB15 and PB_12 ~ PB_15 for black pill.
Value for PB12 ~ PB15 is 27 ~30
Value for PB_12 ~ PB_15 is 28 ~ 31
It can be test by
The result shown here
I also print out the PB_11, however Black Pill FC411CE does not have PB11 on the board as shown in the picture below.

I try to directly call the 'PB11', but it got error here
So 'PB_11' here might be the one cause the problem. Moreover the later pin will probably also been affected, haven't tested yet.
My computer development environment is: Windows 10 19043.1165, arduino IDE 1.8.16, core 2.0.0, upload method SWD through ST-LINK
Value for PB12 ~ PB15 is 27 ~30
Value for PB_12 ~ PB_15 is 28 ~ 31
It can be test by
Code: Select all
void setup(void) {
Serial1.begin(9600);
}
void loop() {
Serial1.print(PB12);
Serial.print("\t");
Serial1.print(PB13);
Serial.print("\t");
Serial1.print(PB14);
Serial.print("\t");
Serial1.println(PB15);
Serial1.print(PB_12);
Serial.print("\t");
Serial1.print(PB_13);
Serial.print("\t");
Serial1.print(PB_14);
Serial.print("\t");
Serial1.println(PB_15);
Serial1.println(PB_11);
delay(1000);
}

I try to directly call the 'PB11', but it got error here
Code: Select all
test_pin:20:19: error: 'PB11' was not declared in this scope; did you mean 'PB_11'?
20 | Serial1.println(PB11);
| ^~~~
| PB_11
exit status 1
'PB11' was not declared in this scope; did you mean 'PB_11'?
My computer development environment is: Windows 10 19043.1165, arduino IDE 1.8.16, core 2.0.0, upload method SWD through ST-LINK