I used to use Arduino and came to the STM32 world lately. The reason is that I’m lack of SRAM and need a faster processor.
I read about a post of adding external SRAM to Arduino Mega before, I remembered that expand about 50k memory to the mega. There is not a very cheap SRAM shield for sale, so I just bought a Due instead, and that also gets me a faster processor.
But the Mega size is not good for my project, I wish to use multiple small boards, not a single big one. So I came to the STM32 world lately.
I’m wondering if there is an SRAM shield or module for Bluepill or some other STM32 board not so big? Cause STM32 got a few more pins than Arduino, I guess maybe it is possible for an STM32 board 1/3 ~ 1/2 size of an Arduino Mega/Due to got an external SRAM?
—————————————————————————–
Answer:
Need Z series.
And there are small boards with an external SRAM chip onboard already.
Could search: “STM32FXXXZXXX” + “SRAM” something like that.
And this post is about how to use the external SRAM:
viewtopic.php?f=51&t=2073
64k ram
That have 1024kb of flash and 192 of RAM with CPU speed of 168MHz
and also if you don’t mind paying a little more there is this https://www.aliexpress.com/item/STM32-C … 92448.html
With 1024kb of flash and 320kb RAM + 8meg of extended RAM with CPU speed of 216MHz see pic attached of the 1 that I brought

- new.jpg (56.97 KiB) Viewed 1167 times
I think if the only things I’m concerning now is SRAM, maybe a shield or board with an external SRAM is the best option.
Keep the board small and keep the price low…
Hi, flyboy74,
I noticed the board in your hand is an F7 series. Is F7 supported by STM32DUINO Core?
https://www.ebay.com/sch/i.html?_from=R … =0&_sop=15
https://www.ebay.com/sch/i.html?_from=R … =0&_sop=15
https://www.ebay.com/sch/i.html?_from=R … =0&_sop=15
They are F103 (fully BP compatible) and give you 64k ram, DAC and other interesting features..
Maybe just using a chip like the 23LC1024 will do the trick if the access speed is not to much of an issue.
[Riva – Fri Aug 03, 2018 8:05 am] –
What data are you expecting to store in SRAM and how fast and often is it accessed.
Maybe just using a chip like the 23LC1024 will do the trick if the access speed is not to much of an issue.
That is exactly the point.
There are also some F4 boards on which you can mount extra 1Mb SRAM: https://www.aliexpress.com/item/Free-sh … 62341.html
Or get an ESP32, it has 512kB internal RAM, and you can communicate / exchange data quickly over SPI (WiFi and BT can be switched off for power saving)
EDIT
The internal RAM usage on ESP32 is limited, see this: https://esp32.com/viewtopic.php?f=19&t=5308&start=10
So you can use external RAM (eg. SPI RAM), but you will need to add your own code to page it in and out.
[human890209 – Fri Aug 03, 2018 5:11 am] –
Yes, I already order an STM32F407 and ESP32
I think if the only things I’m concerning now is SRAM, maybe a shield or board with an external SRAM is the best option.
Keep the board small and keep the price low…Hi, flyboy74,
I noticed the board in your hand is an F7 series. Is F7 supported by STM32DUINO Core?
I am new to STM32DUNIO so not sure what it supports?
If your already used to using the ESP32 there are options of ESP32 that comes with a extra 4 meg of external psRAM. I use the WROVER module to build all my boards and it has the 4meg of psRAM on it. I did have a TFT project where I was buffering 2 layers of screen a foreground and back ground so that I could put images and text on the foreground the restore what was on the back ground when I wanted to remove it.
as mentioned by others, there are (stm32f407z{e-g} type boards) that lets you solder an sram there and it uses FSMC
the typical ‘ebay’ stm32 type boards normally use the ‘smaller’ mcus skus that doesn’t sport the FSMC for cost reasons i suppose
F7 would probably work with stm’s and stm32generic core. but currently the ‘libmaple’ core hasn’t been designed around it (hence unlikely to work ‘out of box’), if one wants to venture one would need to develop the necessary additions for the f7 core
Look like switching to stronger chips or boards is the best option for me.

- sram.jpg (49.08 KiB) Viewed 614 times
But such an QSPI interface is only supported by a couple of STM32 devices such as:
AN4760 wrote:
STM32L4 Series, STM32F7 Series
STM32F446 line, STM32F469/479 line
Related documents
Available from STMicroelectronics web site www.st.com
• STM32L4x6 advanced ARM®-based 32-bit MCUs (RM0351)
• STM32F75xxx and STM32F74xxx advanced ARM®-based 32-bit MCUs (RM0385)
• STM32F446xx advanced ARM®-based 32-bit MCUs (RM0390)
• STM32F496xx and STM32F479xx advanced ARM®-based 32-bit MCUs (RM0386)
• STM32L4x6, STM32F7x5/STM32F7x6, STM32F469/STM32F479 and STM32F446 datasheets
[human890209 – Fri Aug 03, 2018 12:18 pm] –
Thanks, everyone.
Look like switching to stronger chips or boards is the best option for me.
<…>
You mentioned display screen double-buffering in psRAM but what are your SRAM requirements? I am having somewhat of a difficult time envisioning (beyond video) the concern. V-RAM can often be reduced to single-buffering by changing the screen update methodology to move out only the screen changes, but that somewhat depends on the role of the video display.
I find it difficult to make recommendations in a vacuum because often the need to move “upwards” many models in a product line is due to selecting the incorrect product in the beginning.
An example: One can use an UNO to display camera video.
Or one can use an rPi Zero: https://www.raspberrypi.org/blog/picorder/
Ray
I’m trying to make a visual editor for Arduino boards myself(very simple and basic).
I don’t compile the visual logic into scripts then upload, because I don’t know how to do that, it’s not Arduino IDE could do I guess. So I simply create some instance of function class to make up the logic. The instance is initialized when the board start and kept in SRAM for the whole lifetime cause they are not used only once, they are like global variables. I think they should be in the SRAM, and fast speed is necessary.
I tried this on Arduino boards like uno, pro mini, the number of the class instances is limited by the SRAM (about 20), which could only do very simple tasks such as Arduino examples. My target is to create about 1000 instances of function class with a 5cmx5cm board. So it’s about 2k/20*1000 100k byte SRAM I need. And I don’t think the instance could be shared, I’ve already made up my mind, won’t change my code’s strategy. So please focus on my hardware questions
That’s why I found the mysterious island of stm32duino
Because when I still using Arduino boards I read about an article about adding external SRAM with a shield to Arduino mega(8k -> 56k). But I won’t do that I bought a Due(92k) cause the shield makes it bigger, but they are 5cmX10cm which is not my target.
I look at the number of pins of my blue pill and the size of it could afford a shield, so I create this post.
the {e – 512k flash, g 1 m flash) normally denotes the flash memory but that z right in front would determine the density and pinouts of the devices, the z series has the full set of pins for FSMC and hence you would be able to ‘plug’ an sram chip directly with it
some of the boards which are a hot favourite here are the stm32f407{z}{e,g}t6 boards with a sram socket
those boards are rather common on ebay, aliexpress e.g.
https://www.ebay.com/sch/i.html?_nkw=st … =0&_sop=15
https://www.ebay.com/sch/i.html?_nkw=st … =0&_sop=15
https://www.aliexpress.com/wholesale?Se … 32f407zet6
https://www.aliexpress.com/wholesale?Se … 32f407zgt6
actually other than the ‘chinese’ manufacturers there are also other manufacturers like Olimex
https://www.olimex.com/Products/ARM/ST/
who offer some boards in those series
but some of them may not have the (empty) solder pads for an sram chip, just make sure that those have the fsmc routed to the headers so that you could bulid an ‘extension’ board with the sram chip connecting to the fsmc pins. as for me i’d try to get those with at least the solder pads done for an sram chip
the solder pads are commonly for those IS61WV51216BLL types of sram chips, they are often featured in app notes from ST e.g.
AN2784 Using the high-density STM32F10xxx FSMC peripheral to drive external memories
https://www.st.com/content/ccc/resource … 200423.pdf
but i’d think they meet certain niche use cases
even things like micropython
https://store.micropython.org/
are able to make do with the ‘higher end’ but not the {z} series stm32 soc and they do so without the luxury of additional external sram
i think that goes in a big way to significantly *reduce cost* at least the upfront purchase prices
and it also significantly *reduce size* of the boards, u’d only need to look at the micropython boards to be convinced, the headers are ‘out there’ for all your IO needs 0.1″ (2.54mm) no less for them all and it is nearly just the mcu and the GPIO pins shrink fit to the smallest possible board size with the io headers
but if you do a search for those Cortex A, RPI style clones
https://www.aliexpress.com/wholesale?ca … rchText=pi
you would easily find those with 256 MB – 4 GB of dram memories
that would be much more than simply say 512k-1m of sram
but many of those Cortex A SOCs don’t have ADC and their design (as well as the board design) and use are often not geared towards MCU style GPIO or IO intensive uses. e.g. those RPi style boards and their clones often copy the RPi 40 pin connector (it is almost deemed as a ‘standard’, the chinese clones made them pretty much with the same pinouts for SPI, I2C, UART etc and that 40 pin connector has 9 pins on GND which leaves a mere 31 pins for SPI, UART, I2C and all the rest of GPIOs and there isn’t an ADC specified in that 40 pins
The closest Cortex A ‘hybrid’ SOC that does both the ‘app processors’ as well as rather extensive GPIOs i’ve come across are the beagleboards e.g. beagle bone black
https://beagleboard.org/bone
there is sort of a ‘divide’ right there in terms of the hybrid between Cortex M and Cortex A socs
i’ve thought about say building a DAQ high speed ADC e.g. 100 msps with fast processors of the Cortex A family and in combination with that high speeds GPIOs say capable of going 100 msps – 1 gsps simultaneous multi channel aquisition with the huge dram memories of Cortex A boards
such a requirement today it seemed needs to be met with FPGAs for that purpose. or that even if the Cortex A boards meeting those specs exists they are very expensive easily running perhaps to say > usd 100 for the board with high speed ADCs etc
i think libmaple core currently won’t run on STM32F429 without significant retrofit
and the other cores e.g. STM’s stm32duino core and stm32generic cores may well run on them as they use the ST’s HAL libraries
but then for Chrom-ART DMA2D accelerator you are still on your own to implement the functionalities
videos like these show the prowess of STM’s Chrom ART hardware acceleration
i think a board that have those would be the stm32f429 discovery board
AN4943 Using the Chrom-ART AcceleratorTM (DMA2D) to refresh an LCD-TFT display on STM32L496xx/L4A6xx microcontrollers
http://comm.eefocus.com/media/download/index/id-1012528
[human890209 – Fri Aug 03, 2018 2:50 pm] –
Hi, mrburnette, you are right…
I’m trying to make a visual editor for Arduino boards myself(very simple and basic).
<…>
I tried this on Arduino boards like uno, pro mini, the number of the class instances is limited by the SRAM (about 20), which could only do very simple tasks such as Arduino examples. My target is to create about 1000 instances of function class with a 5cmx5cm board. So it’s about 2k/20*1000 100k byte SRAM I need. And I don’t think the instance could be shared, I’ve already made up my mind, won’t change my code’s strategy. So please focus on my hardware questions![]()
<…>
As you wish…
those who wants to play with external SRAM on stm32f* series boards need to go for those with stm32f(xxx, e.g.103}{z}{e,g}t6 or better stm32ff{xxx, e.g. 407){z}{e,g}t6 stm32 socs. note that the vet6 or vgt6 series is normally not adequate for the purpose, it needs to be the z{e,g}t6 series.
the {e – 512k flash, g 1 m flash) normally denotes the flash memory but that z right in front would determine the density and pinouts of the devices, the z series has the full set of pins for FSMC and hence you would be able to ‘plug’ an SRAM chip directly with it
I’ve found this board on www.taobao.com
https://item.taobao.com/item.htm?spm=a2 … t=7#detail

Its size is about 2x BP. And could order the version with 1M SRAM on the back.
I’m wondering if I can use the Extra SRAM with stm32duino core directly?
some additional work/codes would be necessary to use the sram attached on the fsmc
AN2784 Using the high-density STM32F10xxx FSMC peripheral to drive external memories
https://www.st.com/content/ccc/resource … 200423.pdf
Thanks a lot for directing me to Pito’s post. Though I never touch anything in the code with a “__” prefix. But that’s really a very good Lesson 1 for me.
Cause right now my solution is to buy a small stm32board with an extra SRAM chip on board.
I’m not to add but to buy a new board…
If any skilled member thinks there are more answers or further questions, please rename the topic.
It can be useful for other members.
only provides an empty pin pads for a IS61WV51216BLL
e.g.
https://www.aliexpress.com/w/wholesale- … 32f407zet6
i actually resorted to getting one without the sram soldered but with the empty pin pads partly due to cost and partly due to the merits of other components bundled on the board. IS61WV51216BLL as it turns out is quite easy to find on ebay, aliexpress and they are available from the ‘traditional’ sources e.g. mouser, element14, etc as well.
one of them on taobao like mentioned prior offered an option with the sram soldered
but that web is in chinese/mandarin
https://item.taobao.com/item.htm?id=566 … =20#detail
some of them selling those apparently same boards on taobao as those on aliexpress / ebay apparently offered to solder the sram chip for additional price
https://item.taobao.com/item.htm?id=557 … =20#detail
the prices as i see them from my station is in CNY and the webs are in chinese
i think it is quite likely that the vendors selling them on taobao are after all the same vendors on aliexpress, ebay.
given that, i’d guess if you shop on aliexpress, ebay etc, you may like to approach the vendors and ask about the sram soldered
some of them may just decide to offer an option with the sram soldered on those same boards perhaps for some additional costs
It can be useful for other members.
OK, I don’t have a plan of ordering one for now, cause I haven’t tested my sketch on STM32F103RE and STM32F407VE yet.
If I get one someday, I will report that.


