This repository contains the source code for the MCU Peripheral Drivers development project. Visit the "MCU Peripheral Drivers" section on my website for more details: https://jackklee.com/mcu-peripheral-drivers.
- Developed MCU peripheral drivers (GPIO, SPI, I2C, USART) from scratch on the STM32F407G-Discovery board, along with comprehensive test applications to ensure their reliability and applicability for real‐world projects
- Used STM32CubeIDE for software development, a logic analyzer for testing, and the on‐board ST‐LINK/V2 debug circuitry for debugging
- Please see the LCD Digital Clock project to observe how these drivers are utilized in a real-world embedded systems project
- Operating system: Ubuntu 22.04 LTS
- Integrated Development Environment (IDE): STM32 CubeIDE Version 1.10.1
- Application layer consists of test applications designed to verify the proper functionality of the GPIO, SPI, I2C, and USART peripheral drivers for the STM32F407xx MCU.
- Hardware abstraction layer includes the device-specific header file for STM32F407xx MCU, along with the GPIO, SPI, I2C, and USART peripheral drivers. This layer provides the application layer with a range of APIs to control the respective MCU peripherals.
-
Driver layer (Peripheral drivers)
- Device header: stm32f407xx.h
- GPIO driver: stm32f407xx_gpio_driver.h, stm32f407xx_gpio_driver.c
- SPI driver: stm32f407xx_spi_driver.h, stm32f407xx_spi_driver.c
- I2C driver: stm32f407xx_i2c_driver.h, stm32f407xx_i2c_driver.c
- USART driver: stm32f407xx_usart_driver.h, stm32f407xx_usart_driver.c
-
Application layer (Test applications)
- The following example is taken from one of the I2C peripheral driver tests. For additional tests on various other MCU peripheral drivers, please visit the MCU Peripheral Drivers section on my notebook.