stm32-dc-dc logo

stm32-dc-dc

Free

STM32 based DC-DC converter

FreeFree tier
Type
Open Source

About stm32-dc-dc

This project provides the source code for an STM32F334C8T6 microcontroller based DC-DC converter. It supports buck, boost, and buck-boost (mixed) modes of operation using the high-resolution timer (HRTIM) peripheral. A PI controller regulates the output voltage, and the ADC measurements are synchronized with the PWM duty cycle to minimize noise. The firmware is developed using STM32CubeIDE and incorporates FreeRTOS for task management. The repository includes build instructions using make and arm-none-eabi-gcc, and the converter can be programmed via SWD using an ST-LINK adapter. The project is open source under the MIT license, but it has been archived and is no longer actively maintained.

Key Features

Supports buck, boost, and buck-boost (mixed) converter modes
Uses high-resolution timers (HRTIM) for precise PWM generation
PI controller for automatic output voltage regulation
ADC trigger synchronized with duty cycle to reduce measurement noise
Implemented using STM32CubeIDE and FreeRTOS
SWD programming interface compatible with ST-LINK
Open source with MIT license

Pros & Cons

Pros
  • Supports multiple converter modes (buck, boost, buck-boost) in a single firmware
  • Uses high-resolution timers for fine-grained PWM control
  • ADC synchronized with PWM to minimize noise in measurements
  • Includes a PI controller for automatic output voltage regulation
  • Open source with MIT license allows modification and reuse
  • Detailed build and quickstart instructions provided
Cons
  • Repository is archived and read-only; no further development or support
  • Limited to the STM32F334C8T6 microcontroller
  • Requires external hardware (STM32 board, ST-LINK) and soldering/assembly
  • No pre-built binaries; user must build from source using specific toolchain
  • Documentation is minimal (mainly via pull requests and README)
  • Converter control is disabled by default in main.c and must be uncommented

Best For

Embedded power conversion applications requiring multiple topologiesLearning and experimentation with STM32 HRTIM and ADC synchronizationPrototyping and testing of digitally controlled DC-DC converters

FAQ

What converter modes are supported?
The converter can operate in buck, boost, and buck-boost (mixed) mode using high-resolution timers.
How is the ADC measurement synchronized?
The ADC trigger event is synchronized with the duty cycle; measurements are taken before or after the PWM rising or falling edge to minimize noise.
What tools are needed to build this project?
You need make and arm-none-eabi-gcc. The project can also be built from STM32CubeIDE after importing the .project and .cproject files.
Is this project actively maintained?
No, the repository has been archived by the owner and is now read-only.
What type of microcontroller is used?
The project is designed for the STM32F334C8T6 microcontroller.