I have a Arduino code working on a Adafruit Feather STM32F405 Express, and as long as I test it with Arduino serial Monitor, everything works perfect. As I want to use a serial terminal (a C# application, or the "Terminal Br@y++") through the same COM port, then I can write my commands, there are executed (output pins send expected signal), but I don't received the serial feedback.
My Arduino code :
void setup() {
Serial.begin(115200); // initialise USB Serial Port
pinMode(pumpP, OUTPUT); // Pump Pin is an output
}
void loop() {
if (Serial.available() > 0) {
command = Serial.readStringUntil('\n');
}
if (command == "do-it"){
digitalWrite(5, HIGH);
Serial.println("did it!");
}
}
In my Arduino Serial Monitor, I write "do-it", and I recieved "did it!" and I can see the Pin 5 changing level. In all serial application I could use, I can see the pin 5 changing level, but not the "did it!".
I configured Arduino as described on this Adafruit page : https://learn.adafruit.com/adafruit-stm32f405-feather-express/arduino-ide-setup [ summary: use STM32F4 library, board number = "Adafruit Feather STM32F405", USB support = "CDC ( Generic Serial supercedes USART)", upload method = "STM32CubeProgrammer (DFU)" ] And I connect the DFU pin to 3,3V during upload, and reset the board after it.
The worst in this story, is that at first time, it worked OK. Since a week or two, I don't get it to work again.