Forum Discussion
Altera_Forum
Honored Contributor
20 years ago<div class='quotetop'>QUOTE </div>
--- Quote Start --- I'm trying to get the alt_write_flash and alt_erase_flash functions working. When I try to open the FLASH device specified in my system.h using the alt_flash_open_dev function it always returns 0 (device not opened). From what I can tell the LLIST that is supposed to have the registered flash components in it is empty. How do I correctly register my flash device (a standard AMD CFI flash)? Do I have to write the low level read and write routines or are these already done somewhere in the HAL libraries? Is there a complete example somewhere that shows the process of registering a FLASH device, creating the low level code (sending command words to erase/write flash, etc) and using it with the alt_flash functions? Thanks, Nathan[/b] --- Quote End --- My guess here is that the function alt_flash_cfi_init is failing, there are many reasons this could happen, but mainly it tends to be broken hardware, or a non CFI compliant flash chip. Your best way forward is to stick a breakpoint in this function step through and find where the problem lies. If this function succeeds it adds the flash part to the list of flash devices. There is an example in the Memory Test example. You should not need to modify the low level code to send commands, this should work with CFI flashes.