cancel
Showing results for 
Search instead for 
Did you mean: 

How to use serial communication via the USB port on NUCLEO-H755ZI-Q by Arduino IDE

Messerschmitt
Visitor

Hi, I'm new to STM32 and would like to know about serial communication
via the USB port on the NUCLEO-H755ZI-Q using Arduino IDE 2.3.6.
I've already tried the program below.
As a result, the LED (PB0) blinked, but I couldn't get serial communication with the PC to work.
Could anyone let me know how I can resolve this problem?
I apologize if the information is insufficient.

void setup() {

  pinMode(PB0, OUTPUT);
  Serial.begin(115200);
  delay(2000);
  Serial.println("START");
}

void loop() {
  digitalWrite(PB0, HIGH);
  Serial.println("LED ON");
  delay(500);

  digitalWrite(PB0, LOW);
  Serial.println("LED OFF");
  delay(500);
}


Settings on Arduino IDE
  Debug symbols and core logs: "None"
  Optimize: "Smallest (-Os default)"
  Board part number: "Generic H755XIHx"
  C Runtime Library: "Newlib Nano (default)"
  Upload method: "STM32CubeProgrammer (SWD)"
  USB support (if available): "None"
  U(S)ART support: "Enabled (generic 'Serial')"
  USB speed (if available): "Low/Full Speed"

1 REPLY 1
Matthew_
Associate II

Maybe check the pins? As far as I remember, both UART and USB have more than 1 pins for the connection. On a side note, I think it would be more convenient to use STM32CubeIDE.