Community
cancel
Showing results for 
Search instead for 
Did you mean: 
Altera_Forum
Honored Contributor I
777 Views

Problems 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.
0 Kudos
2 Replies
Altera_Forum
Honored Contributor I
42 Views

Look to the sources of epcs controller... 

I has the same problem too - i solve it when i find in epcs_controller.v file  

string where i saw the switch - it menas if you set address where bit 8 is 1 - you can access to epcs chip if bit 8 is 0 you can read only boot rom onchip memory.  

If you want to get more details let me know. I can send to you my sources for epcs
Altera_Forum
Honored Contributor I
42 Views

 

--- Quote Start ---  

Look to the sources of epcs controller... 

I has the same problem too - i solve it when i find in epcs_controller.v file  

string where i saw the switch - it menas if you set address where bit 8 is 1 - you can access to epcs chip if bit 8 is 0 you can read only boot rom onchip memory.  

If you want to get more details let me know. I can send to you my sources for epcs 

--- Quote End ---  

 

 

 

Hello! 

 

I have the same problem too. When i use epcs_commands.c ,i found the program stop in do/while loop. 

 

I scanned the sources of epcs_controller.v(My file name is NIOS_CPU_NIOS_EPCS.v). But I am not know how to modify to solve the problem. Could you help me how to solve this problem? 

 

Thank you!