Forum Discussion
Altera_Forum
Honored Contributor
12 years agoYou need to make sure that you are writing to a different flash sector from those that are loaded at boot time.
When I looked through the altera flash driver code it really wasn't the functions I was looking for! The internal low-level functions might be useful, but the outer level ones the application is expected to use are hopeless. Apart from all the extra layers of code, the big fubar is that it won't let you write to part of a flash sector without erasing the entire sector. It really should allow the write if the old data is all 0xff (more particulary if the write only needs to clear bits), otherwise you need a 128k memory block to do your own RMW cycle. If you have to use internal memeory that is a lot of the devices memory.