Using USBSerial on BLACKPILL board.

For more details click on the link below:

Import programBlackpill_Hello

Using low cost Blackpill (STM32F411CEU6) boards with mbed.

Revision:
0:2912fe6f7530
Child:
1:60fefa7f384b
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/main.cpp	Sat Jan 30 11:18:14 2021 +0000
@@ -0,0 +1,29 @@
+// Blinky demo for the STM32F407VET6 boards.
+// See http://wiki.stm32duino.com/index.php?title=STM32F407.
+//
+// Use "Seed Arch Max" as target platform for the online compiler.
+#include "mbed.h"
+#include "USBSerial.h"
+
+DigitalOut  led1(LED1);
+USBSerial   usbSerial;  // connection is not blocked when USB is not plugged in
+
+/**
+ * @brief
+ * @note
+ * @param
+ * @retval
+ */
+int main()
+{
+    printf("Starting ...\r\n");
+    led1 = 1;                                           // off
+    while (true) {
+        led1 = 0;                                       // on
+        ThisThread::sleep_for(50);
+        led1 = 1;                                       // off
+        ThisThread::sleep_for(1000);
+        printf("Blink\r\n");
+        usbSerial.printf("I am a USB serial port\r\n"); // 12 Mbit/s (USB full-speed)
+    }
+}