Can't get serial to work

Post here first, or if you can't find a relevant section!
Post Reply
Bacab
Posts: 3
Joined: Wed Jun 24, 2020 7:40 pm

Can't get serial to work

Post by Bacab »

Hi everyone,

I feel very dumb for having such a basic issue yet I could not find a solution and I resorted to ask. I can't get my board to print anything on the serial terminal of the Arduino IDE. As far as I can tell everything is setup correctly : I can upload a blinking led code to the board and have it blinked its led, yet for some reason I can't get the serial.print command to work. No error during compilation or upload, there is just nothing printed.

The code I'm trying is the following :

Code: Select all

void setup() {
  // put your setup code here, to run once:
    Serial.begin(115200);
    pinMode(D13, OUTPUT);
}

void loop() {
  // put your main code here, to run repeatedly:
  Serial.println("Coucou");
  digitalWrite(D13, HIGH);
  delay(500);
  digitalWrite(D13, LOW);
  delay(500);
}
The code does not hang on the serial.print, it goes on and the led blinks.

I'm using the Arduino IDE (1.8.13) to program a Nucleo 64 STM32L053R8 on a windows 8.1 computer. I'm using the the STM32Core in its 1.9.0 version.

I'm using those settings :
card type : nucleo 64
board part number : Nucleo L053R8
USART support : enabled (generic serial)
USB support : CDC (generic serial supersede USART)
USB speed : Low/full
Optimize : smallest (OS default)
C runtime library : "Newlib nano (default)"
Upload method : mass storage


Thank you in advance for your help.

User avatar
fpiSTM
Posts: 542
Joined: Wed Dec 11, 2019 7:11 pm
Answers: 20
Location: Le Mans
Contact:

Re: Can't get serial to work

Post by fpiSTM »

There is no CDC on this board. Remove the usb cdc option. This is a Real uart connected to the stlink which provide a CDC.

Bacab
Posts: 3
Joined: Wed Jun 24, 2020 7:40 pm

Re: Can't get serial to work

Post by Bacab »

Thank you for you answer.
I removed the CDC option, switched to "nothing", re-compile however the issue remains.

Post Reply

Return to “General discussion”