Forum Discussion
Altera_Forum
Honored Contributor
20 years agoFlash EPCS access problem
Hi, I'm trying to write my FPGA configuration file on its EPCS16 flash using Nios processor. The final goal is to use Uart/Usb/Ethernet communication to download the FPGA configuration file...
Altera_Forum
Honored Contributor
20 years agoHi Jérôme,
> I can't write a block entirely (65536 bytes, I don't have enough memory to store such amount of > datas), so I would like to write only part of a block, You can write as little as you like -- but no more than the page size. > The problem is that each access with 'alt_write_flash' function seems to erase the entire > block/sector of the flash Correct. You can either erase a single sector, or the entire device. There's no way to erase anything smaller than a sector. > Is there a solution to my problem ? If you need to preserve some data in the sector, you need to: read--modify--erase sector--write sector. If you don't have enough memory (RAM) to read an entire sector, you'll need to be creative. You could try reserving a sector to hold a copy of the original sector while you perform the update. It's very not pretty -- but it can work. Regards, --Scott