Copy user-file from EPCS4 to SDRAM
I boot both configuration and NIOS software from a EPCS4. Works fine, the flash programmer is doing a great job. I also define a character set (pixel map) that resides in the 8th (and upper) 64K block of my EPCS4, and the programmer says everything is OK. The only thing left to do is copy that datablock to SDRAM after booting the NIOS. I went through the HAL and found two macros that perform the initialization of the EPCS flash controller interface: ALTERA_AVALON_EPCS_FLASH_CONTROLLER_INSTANCE(name,dev) and ALTERA_AVALON_EPCS_FLASH_CONTROLLER_INIT(name, dev). The dev struct is filled with all the right numbers and I found that very encouraging. However the alt_epcs_flash_read(alt_flash_dev* flash_info, int offset, void* dest_addr, int length) also defined by the HAL gets stuck somewhere and does not exit. After debugging I found that a alt_avalon_spi_command is taking care of the communication with the EPCS instead of the - maybe obsolete - ASMI interface? Is this correct? And if it is, does anybody have some idea of why alt_epcs_flash_read locks up? Thanks in advance for any help.....