How to detect FPU in Cortex M?

Cortex-M processors implement the CPUID register, through which it is possible to detect information about the core: part number (e.g. Cortex M7 or M4), revision and patch level (e.g. r1p2), etc.

Is there a register or a way to detect if the FPU has been implemented by the implementer? And how to detect the type of FPU (VFPv4, VFPv5-SP or VFPv5-DP)?

best regards


  • Please have a look at

    0xE000EF40 Media and FP Feature Register 0

    0xE000EF44 Media and FP Feature Register 1

    They contains informationabout what FPU ins truction features are implemented. In latest architecture there is also a 3rd one

    0xE000EF48 Media and FP Feature Register 2

    But the CMSIS-CORE header might not have this register define yet (I haven't check).

More questions in this forum