I'm using a STM32G431KB Nucleo board (nucleo_g431kb - 170MHz) with PlatformIO & the Arduino framework.
My simple code looks like this:
void setup()
{
pinMode(PA11, INPUT);
pinMode(PA12, OUTPUT);
}
void loop()
{
if (digitalReadFast(PA_11) == HIGH) {
digitalWriteFast(PA_12, HIGH);
}
else {
digitalWriteFast(PA_12, LOW);
}
}
On pin 11 I got a well defined input signal like shown in the picture below (yellow signal). The blue signal in the picture is the one from the STM32 (pin 12).
Now the blue signal is not that defined like the yellow one. In theory, they both should be identical, shouldn't they? How do I get the output signal mirroring the input signal? The chip should have enough power. I tried a pull-down resistor, but it didn't change anything. I guess, I'm simply stupi.