Using Config Flash from ZPUino

Recommended Posts



I know that in general the configuration memory of FPGAs can be accessed and used with some limitations. And as the ZPUino loads it's program from the FLASH I would be very interested to know if it's possible to store and read some values from the sketch?




Share this post

Link to post
Share on other sites

Not sure exacly whay you mean by reading and writing values. Indeed you have access to the whole of the SPI flash, if that is what you ask for.


If you only need reading, you can find "smallfs" useful. It will store a bunch of files in flash easily accessible using open/fopen and similar means. Just place all files inside a folder named "smallfs" in your sketch and use SmallFS library or open/read/so on.


For more advanced uses, you can:


a) access the end of used flash from within ZPUino. That will tell you what you can or not use.

B) Use SPI communication to flash in order to read and erase/write what you want.




Share this post

Link to post
Share on other sites

Thank you Alvie. Sorry for not making my self clear. 


In the meantime I managed to access the config memory and I wrote a small library that can read and write bytes from it. Data are stored in the last sector of the memory.


Hope this can help someone else...

Share this post

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now