Using USBSerial on BLACKPILL board.

For more details click on the link below:

Import programBlackpill_Hello

Using low cost Blackpill (STM32F411CEU6) boards with mbed.

Files at this revision

API Documentation at this revision

Comitter:
hudakz
Date:
Thu Feb 11 06:28:02 2021 +0000
Parent:
1:60fefa7f384b
Commit message:
USBSerial on BLACKPILL (STM32F411CE) board.

Changed in this revision

main.cpp Show annotated file Show diff for this revision Revisions of this file
mbed-os.lib Show annotated file Show diff for this revision Revisions of this file
--- a/main.cpp	Sat Jan 30 11:20:01 2021 +0000
+++ b/main.cpp	Thu Feb 11 06:28:02 2021 +0000
@@ -2,7 +2,7 @@
 #include "USBSerial.h"
 
 DigitalOut  led1(LED1);
-USBSerial   usbSerial;  // connection is not blocked when USB is not plugged in
+USBSerial   usbSerial;
 
 /**
  * @brief
@@ -13,11 +13,11 @@
 int main()
 {
     printf("Starting ...\r\n");
-    led1 = 1;                                           // off
+    led1 = 1;                        // The onboard LED is active when digital output is 0
     while (true) {
-        led1 = 0;                                       // on
+        led1 = 0;                    // turn the LED on
         ThisThread::sleep_for(50);
-        led1 = 1;                                       // off
+        led1 = 1;                    // turn the LED 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)
--- a/mbed-os.lib	Sat Jan 30 11:20:01 2021 +0000
+++ b/mbed-os.lib	Thu Feb 11 06:28:02 2021 +0000
@@ -1,1 +1,1 @@
-https://github.com/ARMmbed/mbed-os/#cf4f12a123c05fcae83fc56d76442015cb8a39e9
+https://github.com/ARMmbed/mbed-os/#0c6753bb821612eb72b5f682aed7ffcc98e80a1f