Home|Embedded Systems

Everything related to embedded systems: microcontrollers, firmware, practical examples, hardware related tips, etc.

Aligned and Unaligned Memory Access

Unaligned memory access is the access of data with a size of N number of bytes from an address that is not evenly divisible by the number of bytes N. If the address is evenly divisible by N, we have aligned memory access. We can express this as Address/N, where Address is the memory address

2020-07-19T16:56:39+03:00By |Categories: Embedded Systems|Tags: , |0 Comments

Little-Endian vs Big-Endian in Embedded Systems

To better understand the concept of little-endian and big-endian formats we first have to look at how memory is accessed. The memory space of a microprocessor is expected to be byte-addressable. When a CPU has a 32-bit address bus this means that it can access a total of 232 addresses each with a size of

2020-06-07T21:07:09+03:00By |Categories: Embedded Systems|Tags: , |0 Comments

Prusa i3 MK3S Filament Sensor rev. 0.4 and FW 3.9.0

In the latest firmware release (at the time of writing this article) Prusa Research added a feature for filament sensor recognition (available for i3 MK3S only). Essentially the printer can tell when then filament sensor is disconnected and can interrupt the print and wait for user action. More details can be found in their GitHub

2020-05-31T12:47:21+03:00By |Categories: Embedded Systems, How To|Tags: |0 Comments

Prusa i3 MK3/MK3S Backlight Control in FW 3.9.0

Prusa has introduced a new firmware version for their line of 3D printers. One of the cool new features is the capability to control the display's backlight intensity from the settings menu. There is a big chance that this option will not work if your 3D printer was produced early 2019 or before. The reason is

2020-05-26T17:55:12+03:00By |Categories: Embedded Systems, How To|Tags: |0 Comments

Communication Between RTOS Tasks

Real-time operating systems (RTOS) allows us to develop complex embedded systems. By using self-contained tasks (threads) each with their own context we can implement programs with multitasking behavior using a single CPU. Passing information between these tasks (inter-task communication) is an important aspect when designing an embedded application using an RTOS. We can say that

2020-05-19T19:02:24+03:00By |Categories: Embedded Systems|Tags: , |0 Comments

Peripheral Access Layer for Microcontrollers

The peripheral access layer is a layer of the firmware that provides access to the registers of a microcontroller's peripheral units. It has to be easy to use, well structured, and efficient. This layer is part of the software packages every microcontroller vendor provides for free with their Software Development Kits (SDK) and Integrated Development

2020-04-26T14:42:59+03:00By |Categories: Embedded Systems|Tags: , |0 Comments

Direct Memory Access (DMA) in Embedded Systems

Direct Memory Access (DMA) is a process of transferring data from one memory location to another without the direct involvement of the processor (CPU). The main benefit of using DMA is more efficient data movement in the embedded system. Principle of Operation There are many different types of DMA implementations, some of them for very

2020-04-15T20:59:18+03:00By |Categories: Embedded Systems|Tags: |0 Comments

RTOS: Mutex and Semaphore Basics

Designing an embedded system that employs a real-time operating system (RTOS) with multitasking behavior means that there will be resources that must be shared between the tasks. These shared resources (e.g peripheral modules, data structures, communication interfaces, etc.) by their nature do not support multiple concurrent accesses. Accessing them without any rules in place may

2020-03-16T06:18:21+02:00By |Categories: Embedded Systems|Tags: , , |0 Comments

Exception Context Switching on ARM Cortex-M

This article is a natural extension on the topics we covered in Function Calls on ARM Cortex-M Microprocessors. Due to the hardware specifics of the Cortex-M architecture, there is actually a lot of common in how function calls and exceptions are handled. The good thing for us as developers is that all exception handlers can

2020-02-24T07:20:40+02:00By |Categories: Embedded Systems|Tags: , |0 Comments

STM32 Bootloader Design – Part 3

Here is the bootloader code, let's go through it and explain it step by step: /* Includes ------------------------------------------------------------------*/ #include "main.h" #include "flash.h" #include "srecord.h" #define USER_APPLICATION_BASE_ADDRESS 0x8004000U uint8_t srec_data[16]; void __svc(1) EnablePrivilegedMode(void ); void __SVC_1 (void){ __disable_irq(); __set_CONTROL((__get_CONTROL( ))& 0xFFFFFFFE); // enter priv mode __enable_irq(); } static void BootJump(uint32_t *Address) { /* 1. Make sure,

2020-02-17T18:37:00+02:00By |Categories: Embedded Systems|Tags: , |0 Comments
Go to Top