Detailed Explanation of Exception Masking and Unmasking in Assembly Language

Detailed Explanation of Exception Masking and Unmasking in Assembly Language

Overview of Exception Masking In the x86 architecture, the Floating Point Unit (FPU) provides a set of exception handling mechanisms. By default, all floating-point exceptions are masked, which means that when an exception occurs, the processor provides a default result and continues execution without interrupting the program flow. FPU Control Word Structure The FPU control … Read more

Comparison Table of Different ARM Cortex-M Core Characteristics

Comparison Table of Different ARM Cortex-M Core Characteristics

Scan to FollowLearn Embedded Together, let’s learn and grow together We know that STM32 microcontrollers are an organic combination of ST’s peripherals and various Cortex cores from ARM.ST has produced many microcontrollers based on different Cortex-M cores. I found a comparison table of different Cortex-M core characteristics on the ARM website, and I would like … Read more

Cortex Authority Manual – Floating Point Operations

Cortex Authority Manual - Floating Point Operations

Floating Point Representation The representation of floating-point numbers follows the IEEE 754 standard, including single precision, double precision, and half precision floating-point numbers. Each floating-point number has a sign bit, an exponent, and a fraction part. Single Precision Floating Point (32 bits) Bit 31: Sign bit (0 indicates positive, 1 indicates negative). Bits 30-23: Exponent … Read more

System Initialization in Embedded Development

System Initialization in Embedded Development

12.2.5 SystemInit() List 5: 12-5: SystemInit() Swipe left or right to view the full content void SystemInit(void) {#if __FPU_USED /* Enable the FPU only when it is used. * Code taken from Section 7.1, Cortex-M4 TRM (DDI0439C) */ /* Set bits 20-23 (CP10 and CP11) to enable FPU. */ SCB->CPACR = (uint32_t) CP_MASK; #endif #if … Read more

Using the STM32F4xx Hardware Floating Point Unit in ARM MDK

Using the STM32F4xx Hardware Floating Point Unit in ARM MDK

1. Introduction Some engineers have reported that they cannot use the STM32F4xx hardware floating point unit under Keil, resulting in excessively long computation times for floating point operations. Additionally, some people are unsure how to use the complex mathematical operations available in the chip, such as trigonometric functions. This article will provide a detailed introduction … Read more