Altera_Forum
Honored Contributor
20 years agoProblems with EPCS controller
Greetings,
I am using SOPC builder to build a system that contains an EPCS controller. I am running a bare bones program to talk to the EPCS part natively using the functions specified in the epcs_commands.c file. The first function I call is epcs_read_status_register(). This function in turn calls alt_avalon_spi_command(). My program gets stuck in the alt_avalon_spi_command() function and does not return. Specifically here is where it gets stuck: do { status = IORD_ALTERA_AVALON_SPI_STATUS(base); } while (((status & ALTERA_AVALON_SPI_STATUS_TRDY_MSK) == 0 || credits == 0) && (status & ALTERA_AVALON_SPI_STATUS_RRDY_MSK) == 0); It never leaves this do/while loop. If I have an EPCS conrtoller and an EPCS part and am using the correct base address is there any reason that I would be having this problem? Any and all information helpful. Thanks.