cancel
Showing results for 
Search instead for 
Did you mean: 

Connecting a DRAM to an STM32

ISeed
Senior

Hello, all!

I need to explore an option to connect a DRAM to an MCU, and still ahve at least 40 PIOs and 16 AIOs left. and would like your input:

  1. Is there a comprehensive tutorial on how to connect and use a DRAM with an STM32?
  2. Any specific keywords I should include when looking for a suitable STM32 to comnnect a DRAM to?
  3. Any recommendation for an MCU that has a DRAM port and at least 40 PIOs and 16 AIOs left?

Thanks in advance!

8 REPLIES 8
MikeDB
Lead

How big a DRAM are you talking about ? If not in the gigabits there may be alternatives that are easier to connect.

Alternatively look at the STM32MP1, but not sure if it would have the pins left that you need as I've never looked at it in detail.

ISeed
Senior

Hi Mike! Thanks for the quick reply!

The DRAM is 16-Mbit.

MikeDB
Lead

ok just beyond a serial SRAM or FRAM then, unless you don't mind using four of them. Best bet is probably the MP1 or any other Cortex-A processor then which can address gigabytes.

Alternative is to build a DRAM controller with an FPGA,

MikeDB
Lead

Thinking more, how busy is your MCU ? You could implement the DRAM refresh using a timer interrupt.

ISeed
Senior

I better present the problem properly:

I need to connect a vga camera for taking pictures, which are stored and later sent to a remote server.

I have an SPI flash memory.

I need to be sure that I can save images to the flash memory fast enough before I get the camera buffer overrun (the camera itself is not chosen yet, I need to be prepared).

The image will be up to 640*480 = 308KB.

One solution is having an MCU with a large enough RAM, but those are expensive, going 7+ USD.

Another solution is having a DRAM, saving everything into it, and then reading out of it into the flash, once the image finished transferring.

If the 16Mbit DRAM is problematic, I suppose I can go as low as 4Mbit (which is 512Kbit, which should fit the image)

MikeDB
Lead

If it's going into an out of the flash, why not just use a faster flash.

But aren't you going to wear it out quite quickly ?

ISeed
Senior

The flash is not a problem - the system only snaps 2 pictures a day, the flash is 8MB and has 100K write cycles.

The only problem is reading the data fats enough.

After further discussion, I understand that DRAM is too unstable for us, so I suppose I'm down to SRAM or a large enough RAM (or maybe another option I'm not seeing?)

What STM32?

Check the STM32F429I ​or STM32F469 DISCO board schematic showing SDRAM implementation. Review relevant Reference Manuals.

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..