Month: March 2018

STM32 Programming Entry

For the STM32 family of microcontrollers a number of different support libaries are available: Cortex Microcontroller Software Interface Standard (CMSIS), Standard Peripheral Library (SPL), Hardware Abstraction Layer (HAL).

CMSIS (by ARM) is basically just a bunch of header files with common defines for all registers of the microcontroller and its periperal devices. There are no API functions or drivers included at all. The CMSIS gives the programmer the most control and performance, but requires the most work.

SPL (by ST Microelectronics) consists of libraries allowing to use peripheral devices of the STM32 microcontroller much easier and abstracting away most of the wiggle work of register bits. The SPL is officially obsolete and will no longer be supported or maintained.

HAL (by ST Microelectronics) is the most recent library to support STM32 microcontrollers. It’s similar to SPL but offers some advanced features. Code written for HAL is supposed to be easily portable between different microcontrollers. On the other hand performance may not be at maximum since a lot of different hardware is supported by the same functions/API.

There is also a new thing called the Low Layer Library (LLL). The LLL defines different abstraction layers and allows the programmer to decide how much low level control she wants to take.

For more details check out the articles below.


More Windows 10 Issues

On my new Windows 10 installation I came across a few more issues:

LibreOffice did have a nasty offset where the mouse pointer would click way above where it was pointing. The solutions to this bug was to disable OpenGL rendering as described here.

Another bad experience was with VirtualBox which would sometimes boot up virtual machines with corrupted graphics where nothing is readable or even recognizable. The solution to this behavior seems to be to set the “Override high DPI scaling behavior” setting to “Application”; the setting can be found by right clicking on the VirtualBox shortcut/executable > Properties > Compatibility > Override high DPI scaling behavior. I found the solution here.

USBasp in Windows 10

Unfortunately Windows 10 does not accept the standard drivers for the USBasp programmer. The reason is that the drivers have no valid signature from Microsoft (as required by Windows 10).

The only way around this problem seems to be to temporarily disable signature checking and then install the drivers (if you are fine with the security risk). This is described in detail here.