cancel
Showing results for 
Search instead for 
Did you mean: 

STM32L4 FreeRTOS MPU Support Question

Eric Poole
Associate
Posted on February 14, 2017 at 18:28

I read that full FreeRTOS MPU support is available on the Cortex M3, and the M4F.  The STM32L4 is advertised as being a Cortex M4 (without the 'F'), so my question is, does FreeRTOS provide full MPU support for the STM32L4?

I understand that the 'F' in M4F indicates floating point support, and there is an FPU (single precision) in the STM32L4, so I'm wondering if the single-precision limitation in the STM32L4 FPU is some kind of limitation that limits FreeRTOS MPU support including memory segment isolation for each task.

Been searching for this most of the morning, including on this forum and various FreeRTOS websites, without any luck.

Thanks for any assistance...

3 REPLIES 3
Barry.Richard
Associate III
Posted on February 14, 2017 at 22:22

The FreeRTOS MPU port is not the same as the standard FreeRTOS port.  If you are going to use it I recommend using FreeRTOS V9.0.0 as that version included some maintenance on the MPU port.  Just like when using the non-MPU version you have to pick the right port layer.  If you use a Cortex-M3 or a Cortex-M4 that does not have an FPU then use the MPU port code from FreeRTOS/Source/portable/GCC/ARM_CM3_MPU.  If you use a Cortex-M4 that does have an FPU then use the code from 

FreeRTOS/Source/portable/GCC/

ARM_CM4_MPU.

http://www.freertos.org/FreeRTOS-MPU-memory-protection-unit.html

 
Eric Poole
Associate
Posted on February 14, 2017 at 23:35

Thanks for your fast response... My question was more about FreeRTOS MPU support on the STM32L4 from any FreeRTOS version or port.  FreeRTOS literature I have seen, including the one you provided a link for (thanks), indicates that the Cortex M4F (such as the STM32Fx series) is required for MPU support, whereas the STM32L4 is advertised as a Cortex M4 (without the 'F').  This is what I'm trying to clarify... whether any version of FreeRTOS can provide protected memory spaces and MPU support with the STM32L4.

Posted on February 15, 2017 at 13:30

... whereas the STM32L4 is advertised as a Cortex M4 (without the 'F').

That is obviously an incomplete statement by the ST marketing, since the L4 does have an FPU.

It should say Cortex M4F.

And the Cortex M4F has always a single-precision FPU. No other FPU option available.

The MPU is, like the FPU, also an option of the M4 core, so not necessary present. But most implementations have one, the L4 as well.

You might learn to become more tolerant to fuzzy marketing language ... ;)