Professional Documents
Culture Documents
I. INTRODUCTION:
The STM32 Nucleo boards are the official Development Boards from STMicroelectronics. The
STM32 series is based on the ARM Cortex-M3 core specially designed for embedded
applications that require high performance, low cost, and low power consumption. The Boards
pinout is similar to Arduino UNO and has many other additional pins to expand performance.
This board also comes with an integrated ST-LINK/V2-1 programmer and debugger; hence it
is very easy to get started with this board. The objective of the experiment is:
1. To learn about STM32 Microcontroller.
2. To make the LED blink using ST32.
3. To Implement of a light control system using STM32.
1|Page
Experiment 2
Features:
2|Page
Experiment 2
In STMIDE, PIN D13 is defined as PA5. To specify this PIN as output, GPIO_OUTPUT have
selected.
Code: In While loop section, HAL_GPIO_TogglePin (GPIO_TypeDef *GPIOx, uint16_t
GPIO_Pin) function is used to Specifies the pins to be toggled. And HAL_Delay (uint32_t
Delay) function is provided minimum delay (in milliseconds) based on variable incremented.
3|Page
Experiment 2
The project has built and for hardware implementation the code has transfer to the Nucleo
F401-RE Board from the Debug option.
As, no board was connected yet the debug as option was showing none applicable. The specific
board shows in this section to select and upload the code.
Using this same procedure, a light-controlling system and traffic control system have
developed. Both practical and simulated outcomes are discussed in the results section.
4|Page
Experiment 2
IV. RESULTS
Practical Results:
LED Blink:
A simple circuit has been developed on a breadboard to see the LED blink. The LED was
powered by +3.3V, and to complete the circuit, the other end was grounded. The LED on the
board that is linked to PIN D13 is represented by this LED. The toggle or Blink operation of
LED has identified.
5|Page
Experiment 2
The board's Green LED was the first to activate. Red, Yellow, and Green are then displayed in
order. Each delay time has an impact on the glowing time. The circuit was running successfully
based on the function written in code file.
Simulation Results:
LED Blink & Light Control System:
6|Page
Experiment 2
Report Questions:
Traffic Control System Simulation:
7|Page
Experiment 2
VI. References
[1] NUCLEO-F401RE. (n.d.). STMicroelectronics. Retrieved October 13, 2022, from
https://www.st.com/en/evaluation-tools/nucleo-f401re.html
[2] STM32 Nucleo F401RE Development Board. (n.d.). Components101. Retrieved October
13, 2022, from https://components101.com/microcontrollers/stm32-nucleo-f401re-
pinout-datasheet
[3] STMicroelectronics STM32F401RE. (n.d.). Retrieved October 13, 2022, from
https://www.keil.com/dd/chip/7542.htm
[4] American International University-Bangladesh. (n.d.). Familiarization with an STM32,
the study of blink test and implementation of a light-controlling system using
microcontrollers.: MES Student lab manual 02.
8|Page