I'm using STM32(generic board) and I want to control bi-color LED(common anode). STM32 pin layout and scheme is below, so please see it.
Now, in theory scheme Works, but in practice it Works halfway. Red LED is connected with
PB8 pin and green LED is connected with
Code is simple so I think that problem is not in the code. Red LED Works, but green doesn't work. If I connect green cathode with GND manually, then it Works, otherwise(with STM32) it doesn't.
Later I found that pin
Trace SWO mark(see pin layout below). I'm not completly sure what
Trace SWO means, just found that it some kind of debugigng protocol(I guess) but I can't find info can it be used for
digitalWrite purposes. Is there any way to habilitate
PB3 pin for
digitalWrite? All other pins are in use.
// DOWN digitalWrite(PB3, HIGH); digitalWrite(PB8, LOW); delay(750); // UP digitalWrite(PB8, HIGH); digitalWrite(PB3, LOW); delay(750);
R4 doesn't exist, it's mistake in scheme