Cortex-M3 Flash Memory Limitations and Workarounds

The Cortex-M3 processor has some limitations when it comes to its internal flash memory. While the amount of flash available is generally sufficient for most applications, developers may run into issues as their code size increases. Additionally, there are some quirks with how the flash memory is accessed and erased that need to be accounted…

Binary Image Files vs Formatted Firmware Files

Binary image files and formatted firmware files are two common file types used for storing and distributing firmware updates. The main difference is that binary image files contain the raw binary code of the firmware, while formatted firmware files have additional metadata and structure around the firmware binary. What are Binary Image Files? Binary image…

How to Find Valid vs Invalid Addresses for Your Cortex-M3 Microcontroller?

When working with a Cortex-M3 microcontroller, it is crucial to understand how to differentiate between valid and invalid addresses. This will allow you to properly utilize the address space and avoid accessing restricted or non-existent memory locations which could lead to crashes or undefined behavior. Generally, valid addresses fall within mapped regions of memory while…

Memory Addressing on Cortex-M3 Microcontrollers

The Cortex-M3 is a 32-bit processor core designed by ARM to target microcontroller applications. It features a 3-stage pipeline, memory protection unit, and support for Thumb-2 instruction set which combines 16-bit and 32-bit instructions for improved code density. The Cortex-M3 implements the ARMv7-M architecture and includes features like bit-banding to allow atomic bit manipulation using…

Soft Float vs Hardware Floating Point Tradeoffs on Microcontrollers

When designing a microcontroller system that requires floating point math, engineers must choose between implementing floating point operations in software (soft float) or hardware (hardware floating point unit). This article examines the tradeoffs between these two approaches to help guide the decision. Soft Float With soft float, floating point operations are implemented in software routines…

Options for Floating Point Math on Cortex M Without FPUs

For Cortex M chips without a dedicated floating point unit (FPU), performing floating point math operations efficiently can be challenging. However, with the right software libraries and techniques, it is possible to do floating point math on Cortex M CPUs lacking an FPU. This article explores the options and tradeoffs for implementing floating point math…

When to Use Hardware vs Software Floating Point with Arm Cortex M?

When deciding whether to use hardware or software floating point with Arm Cortex M processors, there are a few key factors to consider. Hardware floating point support provides faster floating point math performance, while software floating point gives more flexibility and portability. The choice depends on the application requirements and constraints. Introduction to Floating Point…