Forum Discussion
Altera_Forum
Honored Contributor
12 years ago --- Quote Start --- Which suggests that it is not reading and comparing the data before the erase. --- Quote End --- Well, in the source code, it is reading and comparing. But on further inspection, it looks like it's not retaining the old data. It's just trying to figure out if the caller is trying to write the same data that is already there or not to determine if it needs to erase the block. --- Quote Start --- But looking at the actual functions in the fine grained section (alt_erase_flash_block() and alt_write_flash_block()) I don't see how it automates the first two stages in that paragraph. --- Quote End --- I think you are misreading it: it is not saying that those functions do that, it is saying that you have the capability to use those functions in order to write code to perform that task. --- Quote Start --- Is there any more documentation on this other than the chapter in the Software Developer's Handbook, or could you explain this a bit more please? --- Quote End --- Probably your best bet is the source code itself. The API you are looking at is an abstract layer which the individual flash HAL components implement. So there is version of functions for EPCS, and a version of functions for CFI, ... but they look roughly the same.