spi ram

Discuss development of drivers for external hardware and components, such as LCD screens, sensors, motor drivers, etc.
Target audience: Users and developers of drivers.
Post Reply
Posts: 5
Joined: Tue Apr 07, 2015 8:32 am
Location: sunny Madrid, Spain.

spi ram

Post by kdv » Wed Oct 28, 2020 6:48 pm

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.

User avatar
Posts: 2065
Joined: Tue Aug 08, 2017 1:57 am
Location: Sydney, Australia

Re: spi ram

Post by jimmo » Thu Oct 29, 2020 12:06 am

That's very neat! A good simple alternative to dealing with sdram (if your situation suits the constraints). Nice one!

Post Reply