Mastering STM32 Blackpill:- Step by Step Guide to Activate the On-Board LED by STM 32 BlackPill

by qwes11_4522 in Circuits > Microcontrollers

19 Views, 0 Favorites, 0 Comments

Mastering STM32 Blackpill:- Step by Step Guide to Activate the On-Board LED by STM 32 BlackPill

Screenshot 2024-04-15 000629.png
Screenshot 2024-04-14 195456.png

Welcome to our comprehensive tutorial on utilizing STM32CubeIDE to control the built-in LED of the STM32 Black Pill microcontroller. This meticulously crafted guide is aimed at professionals seeking a clear and concise walkthrough, enabling them to harness the full potential of the Black Pill and showcasing the versatility of STM32CubeIDE. Throughout this tutorial, we will delve into the key aspects of embedded development, including environment configuration, understanding the hardware specifics of the Black Pill, and writing efficient code to manage the LED. This foundational exercise is not only crucial for proficiency in embedded systems but also serves as a stepping stone for more advanced projects.



Supplies

To start the embedded systems programming , following are the equipment and the software installations are essential:-

  1. STM32 Black Pill
  2. STM Cube IDE
  3. STM Cube Programmer
  4. USB C Cable

Make a New Project File in STM32 Cube IDE

Screenshot 2024-04-14 201035.png
Screenshot 2024-04-14 201121.png

Go to file > New> STM32 Project >>Name the project .

Add Configurations for Your STM32 Board

Screenshot 2024-04-14 201319.png

Search for the component - STM32 F401CE6TR and click on " select the required and then click on "Next".

Configuring the Board Settings

Screenshot 2024-04-14 221134.png

configure the board as shown

the slide will open with STM32 >select the pin (13 as GPIO_output)>>then set the other settings (RCC Mode configuration>>high speed clock to cereamic /crystal response.


Configure the Clock

Screenshot 2024-04-14 222945.png

click on clock configurations and select the HSE in source MUX and system MUX then click on resolve clock issues .

Open Main.c File

Screenshot 2024-04-14 223236.png

Write the Code

Screenshot 2024-04-14 223509.png

Debug

Screenshot 2024-04-14 223632.png

Copy the Path of .elf File Generated

Screenshot 2024-04-14 234035.png

right click on project and click on show in system explorer and copy the path.

Open STMCubeProgrammer and Connect to STM Board Via Usb

Screenshot 2024-04-14 234414.png

Click on Open File and Paste the Copied Path

Screenshot 2024-04-14 234702.png

STM32 Cube Programmer

Screenshot 2024-04-14 234922.png

Change the Download Options and Click on "Start Automatic Mode "

Screenshot 2024-04-14 235056.png

Connect the STM32 Board

WhatsApp Image 2024-04-15 at 12.03.08 AM.jpeg

connect the STM32 Board with STM32 cube programmer via USB and download the file

The on Board Led Is Blinking