5

I know this is a "contemporary" question, but I think it's a useful one to aggregate some knowledge. What are some currently available microcontrollers that sport a hardware floating point unit (i.e. that aren't going to cost me a huge RAM footprint to do floating point math emulation)?

vicatcu
  • 22,499
  • 13
  • 79
  • 155
  • 1
    @LeonHeller couldn't you say that about anything? – vicatcu Mar 01 '13 at 16:13
  • This question is off topic, but in addition to what Gustavo said, some of the Analog Devices DSPs have floating point capability. What is it that you need to do that requires floating point *hardware*? I have used floating point a few times on integer processors by doing it in firmware. – Olin Lathrop Mar 01 '13 at 16:19
  • @OlinLathrop floating point emulation eats up a lot of RAM in my experience... I thought such an aggregation of would be of general interest to our community, I don't mind being wrong though. – vicatcu Mar 01 '13 at 16:26
  • The implementations I have seen, and certainly my own FP routines for the PIC 16, 18, and dsPIC don't use much RAM. The issue is that they take up some program memory (ROM) space, and of course are much slower than native hardware FP operations. However, I have used FP math for PID control loops down to 1 ms loop time. In one project I had two nested PID controllers using FP on a PIC 16F877 with 8 ms loop time. – Olin Lathrop Mar 01 '13 at 17:58
  • @OlinLathrop You rock, well done! Is your code on Git-Hub? – vicatcu Mar 01 '13 at 18:20
  • 2
    I don't know what Git-Hub is, but my FP routines are included in the PIC Development Tools release at http://www.embedinc.com/pic/dload.htm. Look for files with "FP" in their names in the SOURCE > PIC and SOURCE > DSPIC directories after installation. – Olin Lathrop Mar 01 '13 at 19:05

1 Answers1

7

The Cortex-M4 devices include a FPU. Some of them are:

  • ST Micro: STM32F3 and STM32F4
  • TI: Stellaris LM4F
  • NXP: LPC4300
  • Freescale: Kinetis K

[Edit]

Just because they include an FPU doesn't mean the support all floating point instructions. Make sure to check the microcontroller's information to see what might be missing.

Gustavo Litovsky
  • 7,619
  • 3
  • 25
  • 44