I need to write a flash memory from a non-boot tile. I now realize that flashlib only writes the boot tile.
Is there some source available to read / write flash in XC that I can modify to fit to save coding time?
Flash Library available for non-boot tile?
-
- Respected Member
- Posts: 283
- Joined: Fri Mar 19, 2010 4:49 am
-
- XCore Expert
- Posts: 589
- Joined: Wed Feb 29, 2012 10:03 am
Hi,
Writing to the flash memory can only be done on the tile where the flash pins are physically connected. To do otherwise you have to implement your own mechanism to get the data from the other tile to the tile that can write the flash.
Sethu.
Writing to the flash memory can only be done on the tile where the flash pins are physically connected. To do otherwise you have to implement your own mechanism to get the data from the other tile to the tile that can write the flash.
Sethu.
-
- Respected Member
- Posts: 283
- Joined: Fri Mar 19, 2010 4:49 am
Great comment. My design has multiple flash chips. Each tile has a connected flash chip to store local configuration data (not program) for that tile only. Greatly simplifies the software architecture.
I've looked at the specs for the flash chip, and it doesn't look to bad to write routines. But if the flashlib source was available I could speed up the process.
I've looked at the specs for the flash chip, and it doesn't look to bad to write routines. But if the flashlib source was available I could speed up the process.
-
- Respected Member
- Posts: 279
- Joined: Fri Dec 11, 2009 1:34 pm
-
- XCore Expert
- Posts: 844
- Joined: Sun Jul 11, 2010 1:31 am
You can have a look at http://git.infradead.org/users/segher/o ... EAD:/spi.c, maybe it can help you. Pure C code, 25Mbps, one particular flash device hardcoded (M25P IIRC). There also is a project on github that does something similar.
-
- Respected Member
- Posts: 283
- Joined: Fri Mar 19, 2010 4:49 am
Great! Thanks all.