https://github.com/stm32duino/Arduino_C ... 1236/files
The new variant mostly works but I'm having trouble with Serial2 RX. I'm not sure if it is a hardware fault / soldering fault / or pin setup fault.
I have an ftdi / usb dongle connectd to PB4 (RX) and PB3 (TX) (which matches pins in disco https://www.st.com/resource/en/user_man ... ronics.pdf)
Serial2.print() works. Serial.read() does not. I'm not suprised read does not work because when I attach an oscilloscope to PB4 I can see this feeble attempt at going LOW when I press a character on my computer serial monitor: When I detach PB4 from ftdi it has no problems going low. It feels like PB4 has a massive pullup that the FTDI can't defeat.
Code is embarasingly simple:
Code: Select all
#include <Arduino.h>
void setup() {
Serial.begin(9600);
delay(1000);
Serial.println("starting");
}
void loop() {
delay(20);
Serial.print(".");
if (Serial.available()) {
Serial.print("+");
Serial.println(Serial.read());
}
}
Code: Select all
Starting
.......