Page 1 of 1

spi ram

Posted: Wed Oct 28, 2020 6:48 pm
by kdv
FYI: driver for external qspi ram.

Perhaps a small explanation.
I needed more ram than available, so I unsoldered an spi flash chip from a board, and soldered an spi ram in its place.
Wrote a small driver; implemented a module for reading and writing bytes() and bytearray() to the spi ram.
memory-mapping the ram also works. stm32 memory-mapping gives read access only, as it was designed for XIP using spi flash.

- If the cpu runs at 216 MHz, you probably want to clock the qpsi interface at 72 MHz.
- If you are going to read and write 1kbyte pages, you can clock at 108 MHz.

What doesn't work?
- block devices. drivers/memory/spiflash.c tries to send commands that make sense for flash memory, but that are not implemented in spi ram. So no block device for the moment.

Re: spi ram

Posted: Thu Oct 29, 2020 12:06 am
by jimmo
That's very neat! A good simple alternative to dealing with sdram (if your situation suits the constraints). Nice one!