3

Basically, I am looking for some form of non-volatile memory – which is not an SD card. Orange Pi and others have it, but I can’t find a suitable Raspberry Pi.

Did I miss one? Are there any rumours of one in future? Could I add some via a hat?

I don’t want to use an external harddrive because of space constraints. However, I would consider an extremely small USB stick, if there is such a thing, just so long as I can read/write.

I do not need a file system, though can live with it. I am happy enough with a contiguous memory mapped array, where I write some code to read/write X bytes from address Y (which is easy enough to simulate in a file system).

I don’t need a high data transfer rate; we are speaking of a few kilobytes every few minutes at most.

If there is not a Pi specific solution, then I will close this question and ask over at hardware recommendations for a physically small USB device.

3 Answers3

3

The compute module has upto 32GB eMMC flash memory on board. You will need some form of daughter board though:

https://www.raspberrypi.org/products/compute-module-3-plus-32gb/

CoderMike
  • 6,982
  • 1
  • 10
  • 15
1

The on-board flash on the Orange Pi that you've mentioned, as far as I can tell, is just a NOR FLASH chip on the SPI bus. I don't see why you couldn't do the same to add FLASH to your Raspberry Pi, I'm not aware of any HATs or module boards to do this but I've not looked for one either. As an example the Orange Pi Zero comes with a Winbond W25Q128FVSIG fitted giving you 16Mbytes of FLASH.

If speed and so on is not an issue then you can simply use the GPIO library of your choice to access it from userspace however there's an overlay that will add the chip as a MTD that you can then access and manipulte: jedec-spi-nor. Obviously you'd need to check that the chip you're using is compatible with that driver though.

Roger Jones
  • 1,494
  • 7
  • 14
  • Upvote for some fantastic information which I am sure is very valuable - to others. Alas, I am a mawg of very little brain, and despite *cough* decades as a professional embedded software developer am not too comfortable with hardware (as strange as that sounds). Even soldering is beyond me :-\ – Mawg says reinstate Monica Feb 28 '19 at 13:16
  • Thanks for the feedback. It's a shame but I can't seem to find a HAT with a FLASH chip on it but I did start to think, some HATs have EEPROMs fitted on the second I2C bus to identify themselves (https://pinout.xyz/pinout/pin27_gpio0#). If you only want a few tens of bytes then that might be a hackable option although it may not work at all (https://raspberrypi.stackexchange.com/questions/50348/what-are-the-id-eeprom-pins-and-what-can-they-be-used-for) – Roger Jones Feb 28 '19 at 13:28
0

In the end, I am using tiny USB sticks, like this one

enter image description here

$9.90 for 32gB from Amazon USA (much cheaper from Ali Express)

I know that I wanted a solution that was not an SD card, which this effectively is.

But, it's small, cheap, separate from the SD card that holds the o/s. Plus, it is removable, indeed hot-swappable, while the Pi is running. That wasn't an original part of the question, but has shown itself to be a bonus.