Skip to content

Small demo firmware programs for "Black Pill" board with STM32F411CEU6 MCU using mbed. Each branch has a different demo project.

Notifications You must be signed in to change notification settings

SpotlightKid/mbed-blackpill-demos

Repository files navigation

Black Pill mbed LED Switch Example

A simple example firmware for the "Black Pill" board based on an STM32F411CEU6 MCU using mbed OS.

We will use GCC ARM on the command line on Arch Linux.

This basic example toggles the on-board LED on and off on each USER button press.

Compilation

export PROFILE=develop
./build.sh

See also these notes on setting up your mbed development environment on Arch Linux.

Flashing

  • Connect USB.
  • Press and hold BOOT0, then press NRST, release NRST, release BOOT0.
export PROFILE=develop
./flash-dfu.sh

and confirm with 'y'.

If firmware doesn't start successfully, dis- and reconnect USB and try again.

See also these more detailed notes.

Connections

None.

The example used the on-board blue LED (connectd to pin PC_13) and the USER switch (connected to pin PA_0).

Notes

  • The LED pin is active HIGH.
  • You may notice some bouncing of the USER button. De-bouncing button presses will be adressed in the next example.

References

About

Small demo firmware programs for "Black Pill" board with STM32F411CEU6 MCU using mbed. Each branch has a different demo project.

Topics

Resources

Stars

Watchers

Forks