Forum Discussion
Altera_Forum
Honored Contributor
14 years agoIf you browse the JS28F256P33 datasheet you will see a couple of seconds may be required for erasing the memory. I think alt_write_flash will erase a block at a time, so you need typically 1.6s. Then, the programming time for 128KB in single word mode (I assume this is what HAL driver uses) is about 5.9s.
With some extra time due to code and function calls, you obtain your measured 8 seconds, if I calculated correctly. If you always need to write the full 128KB content you can greatly improve performance by writing your own flash programming function which exploits full chip erase (typ 0.85s) and programming 32 word buffers (need less than 1s for 128KB).