Quality RTOS & Embedded Software

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




Loading

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)
*(InRoot$$Sections)
.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.

Regards.

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_sp
__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) Amazon Web Services, Inc. or its affiliates. All rights reserved.

Latest News

FreeRTOS kernel V10 is available for immediate download. Now MIT licensed.


FreeRTOS Partners

ARM Connected RTOS partner for all ARM microcontroller cores

IAR Partner

Microchip Premier RTOS Partner

RTOS partner of NXP for all NXP ARM microcontrollers

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

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

OpenRTOS and SafeRTOS