Hello!
I try USBSerial example with “blue pill” stm32 board.
https://os.mbed.com/docs/mbed-os/v6.6/apis/usbserial.html
I am import this code to Mbed online compiler, compiling and programming via st-link v2
But only “Unknown device” appear in device manager with ID USB\UNKNOWN
Whats whong with it?
Thank you!
/*
* Copyright (c) 2006-2020 Arm Limited and affiliates.
* SPDX-License-Identifier: Apache-2.0
*/
#include "mbed.h"
#include "USBSerial.h"
//Virtual serial port over USB
USBSerial serial;
int main(void)
{
while (1) {
serial.printf("I am a virtual serial port\r\n");
ThisThread::sleep_for(1000);
}
}