1 1
Matthai

Read/Write to SPI flash?

Recommended Posts

OrangePi Zero has (according to specifications) 2Mb SPI flash.

 

Sorry for my newbie question, but how is it possible to write there some file and read it later? Or at least some data (string)?

Share this post


Link to post
Share on other sites
1 hour ago, Matthai said:

how is it possible to write there some file and read it later? Or at least some data (string)?

Normally, this SPI Flash is used to contain U-Boot for people that wish to boot from USB, either a dongle or an HDD.

If you don't need that, Yes, you can still use the SPI Flash to save data in it, but not as a filesystem with files.

There are some libraries that manage to send commands to flash certain amount of bytes or send "erase page" command, etc ...

 

But, btw, what is your "use-case" exactly ? It is more easy to write directly on your SDCard, right ?

Share this post


Link to post
Share on other sites

The idea is to have WifiAP, which connects to VPN. Software on a SD card would be generic, but VPN keys/paswords would be written on a SPI flash.

Share this post


Link to post
Share on other sites

Is it possible to connect that with VeePN service? Now I am using VeePN just in order to receive access to blocked content like websites, games, media, music, some streaming TV apps like Netflix, etc. But, of course, if you need VPN for serious tasks you have to use more serious approach with SD cards.

Share this post


Link to post
Share on other sites
On 3/10/2019 at 3:04 PM, martinayotte said:

Normally, this SPI Flash is used to contain U-Boot for people that wish to boot from USB, either a dongle or an HDD.

If you don't need that, Yes, you can still use the SPI Flash to save data in it, but not as a filesystem with files.

There are some libraries that manage to send commands to flash certain amount of bytes or send "erase page" command, etc ...

 

Should also note that most SPI-NOR flash parts have a very limited write cycle count compared to NAND (naked or SD/eMMC) - it's an order of a magnitude less...

 

should add that typically NOR is an MTD device, so a file system that is appropriate (jffs/jffs2 or ubi/ubifs) is needed...

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
1 1