Many crazy and less crazy hypotheses thrown around, but it would seem everyone, including the OP, missed the obvious!
Does anyone see something strange in the code below:
pinMode(PA12, INPUT);
[...]
digitalWriteFast(PA_12, HIGH);
and
pinMode(PA11, OUTPUT);
[...]
if (digitalReadFast(PA_11) == HIGH) {