ABSTRACT

This chapter provides detailed discussions about the ARM Cortex-M4 Floating-Point Unit (FPU). It introduces the single- and double-precision floating point numbers and protocols. The chapter discusses the FTP architecture applied in the Cortex-M4 MCU in detail. All control registers used for the FPU are discussed and illustrated in detail. The chapter also discusses the FPU-related API functions provided by the MSPWare Peripheral Driver Library. The default handling of the floating-point data is to perform a lazy save/restore. When an interrupt is occurs, spaces are reserved on the stack for the floating-point data but the data are not written into the stack. The Floating-Point Context Control register is used to set or return the FPU-related control data. The Floating-Point Context Address Register holds the address of the unpopulated floating-point register space allocated on an exception stack frame. A real example project is provided to illustrate how to use the FPU to perform some sophisticated floating point data operations.