Follow our illustrated blog on Embedded Software Architecture

How to build a hybrid solar/wind energy harvester?

Archives for December 2013

How procedural code evolves to object-oriented code

Introduction Most (real :-)) embedded software is written in C. Although C is a general-purpose procedural programming language, it is perfectly possible and useful to write object-oriented code in it. Object-orientation – well, GOOD object-orientation – allows for better code maintenance by managing code complexity. Actually, there are two ways to manage software complexity: abstractions, […]

Share

Painless CRC for your embedded device

We cannot take credit for any of the code – which is public domain – but we found it to be so valuable that we dedicate this blog post to it. A CRC or cyclic redundancy check algorithm is used to detect errors or changes in raw data. It is good at detecting unintentional changes […]

Share

Dual channel power switching: testing different PWM configurations

Switching power between battery and dump load is an important functionality of a charge controller. Switching fast by means of PWM allows for efficient battery charging: the battery (bank) is charged with an appropriate algorithm (bulk, absorption, float, pulse) while unnecessary energy is diverted to a dump load. Since relays are not well-suited for fast PWM switching, […]

Share

STM32 bootloader

Flashing via USART Most STM32 devices have an on-board (first-level) boot-loader (see Table1 of AN2606 for an overview of supported devices). The boot-loader allows developers to flash MCU’s internal ROM memory via SPI, CAN, USB, I2C etc. but for our project we want to connect via USART to the STM32 MCU. The USART protocol that is […]

Share