Forum Discussion
Altera_Forum
Honored Contributor
15 years agoURGENT: Flash memory
Hello. I am doing a project regarding DMA. However I need to use flash memory on the DE2 Board. I have done the instantiation for the flash but I cannot use because it always return zero for the func...
Altera_Forum
Honored Contributor
15 years agoIf the very first function alt_flash_open_dev fails, the problem is not with application code,
unless you mistyped the device name However I'd use the define provided by system.h instead of "/dev/ext_flash"; I think in your case is it is EXT_FLASH_NAME Some points you can check: 1. Are you sure the flash memory is working? Can you test it with another sample application provided with the DE2 board? 2. Manually test the flash memory I suppose this is a parallel CFI flash. So you can write the autoselect sequence at EXT_FLASH_BASE and check if you can read vendor and product ID. 3. Debug into alt_flash_open_dev and find out where it fails. Compile all the project in debug mode, place a breakpoint on this function and step into it until you get to a 'return error'