STM32 with external SRAM

classic Classic list List threaded Threaded
2 messages Options
Pito Pito
Reply | Threaded
Open this post in threaded view
|

STM32 with external SRAM

Hi, I got an STM32F103ZET6 board from ebay, and added 512kB large SRAM via the FSMC interface. The board got the pcb pads for a standard 44pin tsop Sram (ie. 10ns, 3.3V, 256k x 16, cheap) ready.

It works fine. For the eLua the variant where the external Sram would be used as the HEAP seems to me the most attractive. The board allows up to 1MB of external Sram. The speed penalty is not bad. See more on
http://www.stm32duino.com/viewtopic.php?f=28&t=1651&start=140

I've been thinking to deploy eLua on that board, with the Heap (~512kB) used for the bytecode, and the internal mcu ram (64kB) for the interpreter and buffers. The initialization of the FSMC is easy, a few lines of code.

Is there any chance to enhance the build generator such it allows inclusion of an external Sram for the Lua bytecode?
raman raman
Reply | Threaded
Open this post in threaded view
|

Re: STM32 with external SRAM


Dear Pito,

> Hi, I got an STM32F103ZET6 board from ebay, and added 512kB large
> SRAM via the FSMC interface. The board got the pcb pads for a
> standard 44pin tsop Sram (ie. 10ns, 3.3V, 256k x 16, cheap) ready.

Great!

> Is there any chance to enhance the build generator such it allows
> inclusion of an external Sram for the Lua bytecode?

The build generator can already handle this. Take for instance the
XMC4500 platform [1]. In your case, the FSMC initialization code can
be conditionally invoked in your platform_init.

You would then have to tell the build generator about your additional
SRAM in your cpu file. The Lua build file (for example, [2]) will
specify the total number of RAM blocks. The memory allocator will then
use the additional RAM for heap.

R

References:
[1]: https://github.com/elua/elua/blob/master/src/platform/xmc4000/cpu_xmc4500e144k1024.h
[2]: https://github.com/elua/elua/blob/master/boards/known/xmc4500-hexagon-sdram.lua

On 19 February 2017 at 19:39, Pito [via eLua Development] <[hidden email]> wrote:
Hi, I got an STM32F103ZET6 board from ebay, and added 512kB large SRAM via the FSMC interface. The board got the pcb pads for a standard 44pin tsop Sram (ie. 10ns, 3.3V, 256k x 16, cheap) ready.

It works fine. For the eLua the variant where the external Sram would be used as the HEAP seems to me the most attractive. The board allows up to 1MB of external Sram. The speed penalty is not bad. See more on
http://www.stm32duino.com/viewtopic.php?f=28&t=1651&start=140

I've been thinking to deploy eLua on that board, with the Heap (~512kB) used for the bytecode, and the internal mcu ram (64kB) for the interpreter and buffers. The initialization of the FSMC is easy, a few lines of code.

Is there any chance to enhance the build generator such it allows inclusion of an external Sram for the Lua bytecode?


If you reply to this email, your message will be added to the discussion below:
http://elua-development.2368040.n2.nabble.com/STM32-with-external-SRAM-tp7578599.html
To start a new topic under eLua Development, email [hidden email]
To unsubscribe from eLua Development, click here.
NAML