-
Making sinewaves with XMEGA DAC
The XMEGA is quite a leap from the "classic" AVRs. Some of the interesting features are the DAC and DMA. When combined, they can be used to generate all kinds of useful signals in the audio range.
This example uses the DAC, DMA, timer and event system to generate 1200 …
Read more... -
Git - checking JavaScript files for debugger statements
We developers, when working on a common codebase, often step on each other's toes. Recently, while debugging code of a complex application server I have been hit with JavaScript
Read more...debugger
statements placed by another developer all around, that should not get to the common branch. So what is better than … -
EFM32 Cortex-M firmware project from scratch - step by step
Most popular microcontrollers come with IDEs and tools provided by the manufacturer, like NXP, STM, TI or Silicon Labs. IDEs are commonly based on Eclipse and creating a project for almost any chip in those IDEs is usually just a click away so why would you ever want to make …
Read more... -
Git - confirmation before commit
I use Git for version control of all my projects. Every repository of course has many branches that I try to systematize like: stable, devel, experimental, per-feature etc. Many times I have run into the problem of committing my changes to the branch I did not intended to. Git shows …
Read more... -
Using the internal EEPROM of STM32L
Most STM32 microcontrollers feature an internal EEPROM. It is useful for storing settings or calibration data. Regular flash (that stores code) can also be used but the EEPROM can be updated byte-by-byte and is independent from regular flash. This may come handy during application updating, as whole flash can be …
Read more... -
Open OBD2 datalogger
This is a fully open-source car datalogger that reads engine data using the OBD2 interface in real time and stores it on an SD card. It also stores GPS data. All communication is done directly by the MCU without a translator chip like ELM327 or STN1110. The datalogger supports all …
Read more... -
Kinetis E - writing to internal flash
While working on a bootloader for a Kinetis KE06 I obviously ran in to the task of having to write the internal flash memory of the microcontroller. Freescale's driver is over 1500 lines of code, exposes every single bit of the flash controller so the simple operation of erasing a …
Read more... -
Making graphics and fonts for embedded systems
Microcontroller systems with graphical displays require a way to display text. In case of alphanumeric displays (like HD44780) it is easy - just send your ASCII bytes to the display. Graphical displays operate on individual pixels so firmware must generate the graphics and texts on the fly.
In this post I …
Read more... -
Waveshare ePaper display library
I bought a pair of ePaper displays from Waveshare with the intent to use them in a wireless sensor network for displaying slowly changing data. The reference code from Waveshare is quite clunky and not so easy to re-use so I made my own small, portable graphics library and display …
Read more... -
Hard fault in __libc_init_array
When starting my STM32 makefile project for the first time I encountered a very early hard fault in the startup code. It happened exactly when calling libc function at
1 2
/* Call static constructors */ bl __libc_init_array
The whole startup code came straight from ST so I did not suspect it …
Read more...