Altera_Forum
Honored Contributor
15 years agoepcs initialization hangs in an endless loop.
Hello.
I am building a Nios2 system on a Cyclone4E EP4CE30F23 using Quartus 9.1sp2. I have instantiated an epcs controller in sopc builder so that I can write to my configuration device. I specified that the controller should use the dedicated AS interface. My problem is that when the HAL initializes the epcs controller, it ultimately hangs in an endless loop because the epcs SPI port is not indicating that an SPI transmit completed. The stack trace is _start() alt_main() alt_sys_init() alt_epcs_flash_init() alt_epcs_flash_query() epcs_read_electronic_signature() alt_avalon_spi_command() The loop is in alt_avalon_spi_command() is as follows: 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); Any help with this would be greatly appreciated. Thank you Scott Wild