Verify the timing of the half-bridge outputs at the pins without requiring a charge controller, where a wrong timer configuration could destroy the power stage. The outputs of the half bridge are wired to two input capture channels of a 32-bit timer (TIM2 or TIM5) on a Nucleo-G474RE board. As both channels share the same counter, the edges of the high-side and low-side signals can be put into chronological order to measure: - frequency and duty cycle (incl. duty cycle limits) - dead time at both switching transitions of each period - overlap of high-side and low-side on-time (shoot-through) - output states when stopped and with forced low-side switch The test covers the advtim (TIM1), gptim (TIM3) and HRTIM drivers with separate overlays. It requires the half_bridge_loopback fixture, so it is only built in CI and run with a twister hardware map on a board with the loop-back wiring. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Libre Solar Charge Controller Firmware
This repository contains the firmware for the different Libre Solar Charge Controllers based on Zephyr RTOS.
Coding style is described here.
Development and release model
The main branch is used for ongoing development of the firmware.
Releases are created from main after significant updates have been introduced to the firmware. Each release has to pass tests with multiple boards.
A release is tagged with a version number consisting of the release year and a release count for that year (starting at zero). For back-porting of bug-fixes, a branch named after the release followed by -branch is created, e.g. v21.0-branch.
Documentation
The firmware documentation including build instructions and API reference can be found under libre.solar/charge-controller-firmware.
In order to build the documentation locally you need to install Doxygen, Sphinx and Breathe and run make html in the docs folder.
License
This firmware is released under the Apache-2.0 License.