06-28-2013 07:22 PM
Hi,I must be confused by the difference between the EPCS and parallel CFI type flash. I wrote programming software for the CFI but the EPCS API doesn't make sense to me. How do I query the system for info on the EPCS? There is only one EPCS per system but that doesn't simplify things. There is (i think) a user function, alt_epcs_flash_get_info() but its not making sense to me. Shouldn't I be able to send a pointer to an epcs flash structure to be filled out, or returned a pointer to a structure that I can read? My basic confusion is that I need to know the block size, etc. Yes, its on the data sheet but shouldn't I get this info from alt_epcs_flash_get_info() or something else. Also, the arguments for alt_epcs_flash_get_info() seem to be redundant. Thanks, greg
07-05-2013 11:46 AM
Hi,there is a struct automaically initialized on initialization of your device, just before alt_main is called i think. You'll find the init in your BSP/alt_sys_init.c in function alt_sys_init() there the MAKRO
ALTERA_AVALON_EPCS_FLASH_CONTROLLER_INIT ( EPCS_FLASH_CONTROLLER_0, epcs_flash_controller_0);should be caled, and therefore the struct epcs_flash_controller_0 is initialized. So for accesing the EPCS i use this structure, which works well for me.
07-09-2013 06:44 PM
Hi dtelrest, I was thinking the EPCS has a different software interface but I see now that it uses the same API as the CFI flash, so my existing code actually works!Thanks for the clarification!