top of page

STM32F4 LIBRARY

STM43F4 Library GitHub - Drivers and unit tests for the STM32F4 

​

STM32F4 Test Code GitHub - Application test code using the STM32F4 driver library

​

For a long time I've wanted to become proficient with embedded software, however, when I set out to start learning about this I quickly found that I had very little understanding of what was going on underneath the hood of an embedded system. I wasn't satisfied not knowing how the code I wrote was translating into real world inputs and outputs. I also felt like I lacked the ability to write and structure my code for larger software projects beyond simple prototypes. As a result, I chose to dive deeper into embedded systems by creating my own library for a microcontroller of my choice. I wanted to choose a device that has lots of capability and is well documented so I could learn and be able to use the device for my future projects. For these reasons I chose to use an STM32F4 on a NUCLEO development board.

 

Embedded software covers a wide range of topics so I had to define my scope of work based on my interests and goals. I decided that very low level work such as defining register addresses and setting up clock speeds was not what I wanted to focus on so I let STM32CubeMX generate that code for me. Instead, my work started with creating drivers for various protocols and hardware features, then writing device drivers and other software tools I wanted to use in my projects.

​

Some of the devices I've written drivers for include:

  • Bidirectional Brushless ESC

  • HC-05 Bluetooth module

  • HD44780U screen + PCF8574 I2C module

  • Micro SD card (HW-125 SD card adapter)

  • LSM303AGR 6-axis magnetometer and accelerometer

  • SAM M8Q GPS

  • MPU-6050 6-axis accelerometer and gyroscope

  • nrF24L01 RF transceiver

  • WS2812 LEDs (Neopixels)

​

Some of the protocols, hardware features and software tools I've written drivers for include:

  • ADC

  • DMA

  • GPIO

  • I2C

  • Interrupts

  • SPI

  • Timers

  • UART

  • Linked Lists

  • Switch debouncing

​

I've learned a lot from making this library such as how to write embedded code in C/C++, device communication and data handling, software testing, and how to structure and manage a code base. I plan to continuously build this library as more devices, protocols and software tools are needed for my projects.

© by Sam Donnelly

  • LinkedIn
  • github
  • Instagram
bottom of page