STM32L432 serial monitor not working

Development environment specific, Arduino, Eclipse, VS2013, Em::Blocks etc
Post Reply
nedsar85
Posts: 7
Joined: Fri Aug 19, 2022 8:10 pm

STM32L432 serial monitor not working

Post by nedsar85 »

Dear all,

Problem: The serial monitor (Serial.read) is not responding to keyboard commands
Code:

char userInput;
void setup() {
pinMode(PB3, OUTPUT);
Serial.begin(9600); // Baud Rate set to 115200
}

void loop() {
userInput = Serial.read();
if (userInput == 'y') {
delay(5000);

while (true) {
digitalWrite(PB3, HIGH); // turn the LED on (HIGH is the voltage level)
delay(1000); // wait for a second
digitalWrite(PB3, LOW); // turn the LED off by making the voltage LOW
delay(1000); // wait for a second
}}}

If I run this program, it is impossible for the L432 to receive the command so the led can start blinking, however, If I remove the serial.read condition, the board gets programmed and the led blinks without issue....

I have seen that this is supposed to be fixed with release 2.3.0, but, it is not working for me, I have tried to downgrade the STM board version down to 2.0.0, but I see the same problem...

Additionally, If I remove the Nucleo L432 and replace it by any other Arduino board (changing the pin name), then, this code works perfectly...

Does anyone knows how to fix the issue?

Thanks
nedsar85
Posts: 7
Joined: Fri Aug 19, 2022 8:10 pm

Re: STM32L432 serial monitor not working

Post by nedsar85 »

Partial Solution:

I was using a wrong board configuration, I was using the board: "generic STM32L4 series", but I changed to "Nucleo32"...
Changing the configuration helps to get I/O from the serial monitor, but the board stops working randomly after some minutes...
Post Reply

Return to “IDE's”