Skip to content

Basic projects and sample applications with STM32 microcontrollers.

Notifications You must be signed in to change notification settings

yusufkarabocekz/STM32_Tutorials

Repository files navigation

STM32 Tutorials

Welcome to the STM32 Tutorials repository! This repository contains a series of projects designed to help you learn and master various aspects of STM32 microcontroller programming. Each project focuses on a specific concept or peripheral, providing hands-on examples and detailed explanations.

Table of Contents

  1. GPIO LED Control
  2. Interrupt-Driven LED Control
  3. ADC with Potentiometer
  4. DMA with ADC
  5. PWM LED Brightness Control
  6. Timers for LED Control
  7. UART Serial Communication
  8. I2C Communication
  9. SPI Communication
  10. RTOS with FreeRTOS

1. GPIO LED Control

Learn the basics of GPIO by toggling an LED on and off. This project introduces basic digital output control and is the foundation for more complex tasks.

  • Project Name: LED_Toggle_Button_Control
  • Description: Control LEDs using basic GPIO operations, including toggling and button-based control.

2. Interrupt-Driven LED Control

Explore the use of interrupts to handle button presses for LED control. This project teaches how to handle external interrupts efficiently.

  • Project Name: LED_Button_Interrupt
  • Description: Use interrupts to control LEDs based on button inputs.

3. ADC with Potentiometer

Use the Analog-to-Digital Converter (ADC) to read the values from the potentiometer and the LM35 sensor. This project is necessary to understand how to interface analog sensors with the STM32

  • Project Name: Potentiometer_ADC_Reader
  • Description: Read potentiometer and LM35 values using the ADC and convert them into digital signals.

4. DMA with ADC

Learn how to use Direct Memory Access (DMA) to transfer ADC data directly to memory, reducing CPU load and improving performance.

  • Project Name: DMA_ADC_Data_Transfer
  • Description: Implement DMA to handle ADC data transfer efficiently.

5. PWM LED Brightness Control

Master Pulse Width Modulation (PWM) by adjusting the brightness of an LED. This project also applies to motor control and other PWM-based applications.

  • Project Name: PWM_LED_Brightness_Control
  • Description: Control LED brightness using PWM.

6. Timers for LED Control

Use timers to control the blinking of an LED at precise intervals. This project helps you understand hardware timers and their applications.

  • Project Name: LED_Timer_Control
  • Description: Implement timers to control LED blinking intervals.

7. UART Serial Communication

Explore UART communication by sending and receiving data between the STM32 and a PC or another microcontroller.

  • Project Name: UART_Serial_Communication
  • Description: Implement UART for serial communication with external devices.

8. I2C Communication

Learn how to communicate with I2C-compatible devices such as sensors or displays. In this project, temperature, altitude and pressure data are read with the BMP180 sensor.

  • Project Name: I2C_Sensor_Reading
  • Description: Interface with I2C devices to read sensor data.

9. SPI Communication

Dive into SPI communication to exchange data with SPI peripherals such as sensors, memory modules or displays. In this project, 3 Oct acceleration data is read with the ADXL sensor.

  • Project Name: SPI_Sensor_Reading
  • Description: Implement SPI communication to interact with external devices.

10. RTOS with FreeRTOS

FreeRTOS-based project to control multiple LEDs with different blinking intervals using task scheduling. Demonstrates the basics of real-time task management in embedded systems

  • Project Name: FreeRTOS_LED_Tasks
  • Description: Manage tasks using FreeRTOS to control multiple operations in real-time.

Getting Started

To run the projects in this repository, you will need:

  • STM32CubeIDE or another compatible IDE
  • STM32 Nucleo or similar development board
  • Basic knowledge of C/C++ programming
  • Familiarity with microcontroller basics

Each project includes source code and explanations to help you understand the underlying concepts. Feel free to explore, modify, and experiment with the projects.

Releases

No releases published

Packages

No packages published

Languages