cancel
Showing results for 
Search instead for 
Did you mean: 

Migrating from STM32F2 to STM32F4

kruzicka
Associate II
Posted on June 11, 2014 at 10:58

Hello,

I can't found a guideline for migrating from STM32F2 (207) to STM32F4 (429) on st.com. I find only STM32F1 to F2 or F4

Has anyone docs or note about it? Or some reference to doc...

Are there any different between Cortex M3 and Cortex M4? For FreeRTOS programming

Thanks a lot for an answer
4 REPLIES 4
chen
Associate II
Posted on June 11, 2014 at 11:24

Hi

I do not know if there is a porting guide.

''Are there any different between Cortex M3 and Cortex M4?''

The main (and possibly only) difference between Cortex M3 and M4 is the floating point unit, the M3 does not have one.

''For FreeRTOS programming''

I do not think FreeRTOS knows or cares about the FP unit. This will mainly affect your compiler settings.

I cannot comment on the difference between STM32F2 (207) and STM32F4 (429)

Posted on June 11, 2014 at 11:41

>> ''Are there any different between Cortex M3 and Cortex M4?''

> The main (and possibly only) difference between Cortex M3 and M4 is the floating point unit, the M3 does not have one.

Other relatively major difference may be the maximum HCLK and related issues (e.g. APB dividers).

JW

ivani
Associate II
Posted on June 11, 2014 at 12:58

''For FreeRTOS programming''

I am not using FreeRTOS but for sure it has Cortex M4F port.

jpeacock2399
Associate II
Posted on June 11, 2014 at 16:05

There are minor differences in the RTC but if you aren't using subsecond you can ignore those. 

The HSE and HSI oscillator rate is higher so your PLL intermediate calculations will change.  The PLL VCO can run at higher frequencies.

For the SYSTICK timer in FreeRTOS you may need to adjust the setting for the base tick rate.  This depends on the external crystal and SYSCLK frequencies.  Look in the port.c and port.h files.

FreeRTOS has options on how to handle context switching if you use floating point.  Ideally you restrict float to a single task so you don't have to save the FPU context on the stack.  Or you can use a mutex to serialize access to the FPU among several tasks.

Another change you might want to look at is moving the FreeRTOS heap to CCM.  That reduces contention with DMA and SRAM1 access.

  Jack Peacock