Quality RTOS & Embedded Software

 Real time embedded FreeRTOS RSS feed 
Real time embedded FreeRTOS mailing list 
Quick Start Supported MCUs PDF Books Trace Tools Ecosystem TCP & FAT Training


Using External Memory with FreeRTOS in STM32F

Posted by Francisco Moon on March 28, 2012
I designed STM32F207ZG and I have a external SRAM with 1MBytes.

I used an example in st web-site. (FreeRTOS + lwIP)

From orginal project, I can read/write the external SRAM without runnig FreeRTOS , but I can't run my FreeRTOS kernel using external SRAM.

I modified scatter file in uVision , but it didn't work :

; *************************************************************
; *** Scatter-Loading Description File generated by uVision ***
; *************************************************************

LR_IROM1 0x08000000 0x00100000 { ; load region size_region
ER_IROM1 0x08000000 0x00100000 { ; load address = execution address
*.o (RESET, +First)
.ANY (+RO)
RW_RAM1 0x60000000 UNINIT 0x00100000 { ; RW data
heap_2.o(+RW +ZI)
RW_IRAM1 0x20000000 0x00020000 {
.ANY (+RW +ZI)

Do you have any idea to solve this problem?

Please help me...

RE: Using External Memory with FreeRTOS in STM32F

Posted by Richard on March 28, 2012
Can you clarify "can't run the kernel with external SRAM"? What in the kernel is using the external RAM rather than the internal RAM? Are the task stacks in external RAM, the kernel data, the main() stack, etc.?

If you can run a non FreeRTOS application with the external RAM then there should be no reason why you cannot run a FreeRTOS application as it would appear the external bus interface is being set up correctly (are you sure you non-FreeRTOS application is actually using the external RAM and is not contained in the internal RAM?).

The other thing to look for is that the start up code is clearing data to zero and initialising data correctly even when the data is in external RAM.


RE: Using External Memory with FreeRTOS in STM32F

Posted by Francisco Moon on March 29, 2012
Thanks a lot.
I checked the start up code. It was a mainly problem.
For using an external memory in STM32F, I have to modify it.

__initial_spTop EQU 0x20000400 ; stack used for SystemInit & SystemInit_ExtMemCtl
;__Vectors DCD __initial_sp ; Top of Stack
__Vectors DCD __initial_spTop ; Top of Stack

[ Back to the top ]    [ About FreeRTOS ]    [ Sitemap ]    [ ]

Copyright (C) 2004-2010 Richard Barry. Copyright (C) 2010-2016 Real Time Engineers Ltd.
Any and all data, files, source code, html content and documentation included in the FreeRTOSTM distribution or available on this site are the exclusive property of Real Time Engineers Ltd.. See the files license.txt (included in the distribution) and this copyright notice for more information. FreeRTOSTM and FreeRTOS.orgTM are trade marks of Real Time Engineers Ltd.

Latest News:

FreeRTOS V9.0.0 is now available for download.

Free TCP/IP and file system demos for the RTOS

Sponsored Links

⇓ Now With No Code Size Limit! ⇓
⇑ Free Download Without Registering ⇑

FreeRTOS Partners

ARM Connected RTOS partner for all ARM microcontroller cores

Renesas Electronics Gold Alliance RTOS Partner.jpg

Microchip Premier RTOS Partner

RTOS partner of NXP for all NXP ARM microcontrollers

Atmel RTOS partner supporting ARM Cortex-M3 and AVR32 microcontrollers

STMicro RTOS partner supporting ARM7, ARM Cortex-M3, ARM Cortex-M4 and ARM Cortex-M0

Xilinx Microblaze and Zynq partner

Silicon Labs low power RTOS partner

Altera RTOS partner for Nios II and Cortex-A9 SoC

Freescale Alliance RTOS Member supporting ARM and ColdFire microcontrollers

Infineon ARM Cortex-M microcontrollers

Texas Instruments MCU Developer Network RTOS partner for ARM and MSP430 microcontrollers

Cypress RTOS partner supporting ARM Cortex-M3

Fujitsu RTOS partner supporting ARM Cortex-M3 and FM3

Microsemi (previously Actel) RTOS partner supporting ARM Cortex-M3

Atollic Partner

IAR Partner

Keil ARM Partner

Embedded Artists