SDRAM module

General discussions and questions abound development of code with MicroPython that is not hardware specific.
Target audience: MicroPython Users.
Post Reply
OutoftheBOTS_
Posts: 610
Joined: Mon Nov 20, 2017 10:18 am

SDRAM module

Post by OutoftheBOTS_ » Wed Mar 27, 2019 9:12 pm

Does anyone know if this really cheap 32meg SDRAM module can be made to work on a STM32 MCU https://www.aliexpress.com/item/256Mbit ... 83b54ebd0b

User avatar
pythoncoder
Posts: 3455
Joined: Fri Jul 18, 2014 8:01 am
Location: UK
Contact:

Re: SDRAM module

Post by pythoncoder » Fri Mar 29, 2019 10:35 am

If you're talking about increasing heap memory the answer is no. The necessary hardware interface is unavailable.

[EDIT]Apologies for the noise. I was unaware of the FSMC.
Peter Hinch

User avatar
marfis
Posts: 189
Joined: Fri Oct 31, 2014 10:29 am
Location: Zurich / Switzerland

Re: SDRAM module

Post by marfis » Fri Mar 29, 2019 1:37 pm

Not too sure but STM32’s FMC peripheral does have support for SDRAM

it is apparently supported / enabled in some of the boards, e.g here
https://github.com/micropython/micropyt ... oard.h#L97

but I havent tried it. The comment indicates it can be used for heap.

OutoftheBOTS_
Posts: 610
Joined: Mon Nov 20, 2017 10:18 am

Re: SDRAM module

Post by OutoftheBOTS_ » Sat Mar 30, 2019 8:17 am

I have used the FMSC peripheral to write to the RAM of a TFT in 16bit parallel in C. See this code https://github.com/OutOfTheBots/ili9341_16bit_touch was part of the development for this video https://www.youtube.com/watch?v=H51OzQl3BC8&t=8s

Do you know for sure if the FSMC will support SDRAM or only SRAM and PSRAM??

User avatar
marfis
Posts: 189
Joined: Fri Oct 31, 2014 10:29 am
Location: Zurich / Switzerland

Re: SDRAM module

Post by marfis » Sat Mar 30, 2019 8:20 pm

According to the reference manual for the F7:
https://www.st.com/content/ccc/resource ... 124865.pdf

page 307,
The FMC functional block makes the interface with: synchronous and asynchronous static memories, SDRAM memories, and NAND Flash memory
and
Interface with synchronous DRAM (SDRAM/Mobile LPSDR SDRAM) memories
The micropython repository supports the STM32F7 discovery kit: https://www.st.com/en/evaluation-tools/ ... overy.html it includes 128 MBits of SDRAM. FMC is enabled in mpconfigboard.h, so it should run out of the box.

OutoftheBOTS_
Posts: 610
Joined: Mon Nov 20, 2017 10:18 am

Re: SDRAM module

Post by OutoftheBOTS_ » Sat Mar 30, 2019 9:40 pm

Thanks a lot this answers my question.

Not that I need 32meg of SDRAM it would be an interesting learning curve for me to buy 1 of these cheap modules and made it work :)

User avatar
marfis
Posts: 189
Joined: Fri Oct 31, 2014 10:29 am
Location: Zurich / Switzerland

Re: SDRAM module

Post by marfis » Sun Mar 31, 2019 1:10 pm

made it work
i‘d also be interested if this is going to work, let me know how it has turned out.

Post Reply