Introduction: LED BLINKING USING STM32 CUBE IDE

STM32 is a microcontroller just like Arduino Uno and Rasberry pi which is considered an industry standard.

The microcontroller is a kind of integrated circuit chip, which uses VLSI technology to integrate the central processing unit CPU, random access memory RAM, read-only memory ROM, various I/O ports, interrupt systems, timers with data processing capabilities, counter and other functions (may also include display drive circuit, pulse width modulation circuit, an analog multiplexer, A/D converter, and other circuits) into a silicon chip to form a small and complete microcomputer system. Because 8-bit single-chip microcomputers have a simple internal structure, small size, and low cost, they are widely used in some simpler controllers. Common 8-bit microcontrollers mainly include Intel's 51 series, Atmel's AVR system, Microchip's PIC series, TI's MSP430 series, and so on.

Supplies

  1. STM 32 BOARD
  2. USB TYPE C CABLE

Step 1: Intalling STM 32 Cube IDE

Download the STM 32 cube IDE in order to perform this task

The file can be downloaded from the following link:

https://github.com/eziya/STM32_HAL_I2C_HD44780/blob/master/Src/liquidcrystal_i2c.h


Step 2: MAKING THE FILE

As we head into programming in the CUBE IDE head over to the top left and create a new STM32 project by clicking on "FILE" and then "NEW" then after on new "STM32 Project"

Step 3: SETTING PIN CONFIGURATION

Once the file is created select the required STM board and then after set the pin configuration as shown.

(In this task we set the pin 13 as the required pin because in the STM board pin 13 is built in LED)

Step 4: CLOCK CONFIGURATION

In any synchronous circuit, clock frequency plays an integral part thereby we set the frequency as shown in order to execute the task.

Step 5: Generating the Code

One of the major advantages of using STM32 IDE is that the code is automatically adjusted according the the clock configuration and then we just have to make a little bit of changes using the required syntax.

The code we require is:


Step 6: Using the Binary File

One of the tricky part is that we will require the binary file i.e. .elf file.

For that, we simply open the .elf file created in the system explorer by Right clicking on the project and clicking on show in system explorer and copying the path on the STM32Cube PROGRAMMER.

Step 7: EXECUTION!!

In the last step we just need to connect the STM32 Board with the system and upload the code to get the required results.

Step 8: Result

Finally after completing all the steps we will see that the LED on the STM board will blink with a delay of 1 second.


There we go, we have reached the end of the program and got the required result.