Nios® V/II Embedded Design Suite (EDS)
Support for Embedded Development Tools, Processors (SoCs and Nios® V/II processor), Embedded Development Suites (EDSs), Boot and Configuration, Operating Systems, C and C++
12618 Discussions

"Simple Socket Server" demo code stop after display "simple socket server starting up

Altera_Forum
Honored Contributor II
1,111 Views

Dear Friend's 

 

i am using DE2_115 board and over that i am running simple socket server example, i just strip out LED and 7-Seg Show Task's from my Code and compile it but when i run this peace of code, it stuck after display "simple socket server starting up". nothing else happen afterword. 

 

 

regards 

 

kaushal
0 Kudos
5 Replies
Altera_Forum
Honored Contributor II
374 Views

You must write 1 to the edge capture bit in order to clear irq.  

Then the correct command in irq handler should be: 

IOWR_ALTERA_AVALON_PIO_EDGE_CAP(LOAD_BASE, 1); 

Probably the problem is simply here: irq is not cleared, thus keeps on retriggering and your code gets stuck.
0 Kudos
Altera_Forum
Honored Contributor II
374 Views

 

--- Quote Start ---  

You must write 1 to the edge capture bit in order to clear irq.  

Then the correct command in irq handler should be: 

IOWR_ALTERA_AVALON_PIO_EDGE_CAP(LOAD_BASE, 1); 

Probably the problem is simply here: irq is not cleared, thus keeps on retriggering and your code gets stuck. 

--- Quote End ---  

 

 

 

Hello Cris72, 

 

I have do the change as you suggest, but it stiil stuck at same place....no change ...!!
0 Kudos
Altera_Forum
Honored Contributor II
374 Views

Sorry, I suggested IOWR_ALTERA_AVALON_PIO_EDGE_CAP(LOAD_BASE, 1) 

but actually you should use IOWR_ALTERA_AVALON_PIO_EDGE_CAP(LOAD_BASE, 0xf) 

since I see you are using all 4 PIO inputs and the previous one would reset only irq for first button. 

This must be changed both in irq handler and before alt_ic_isr_register calls. 

Let me know if this way it works
0 Kudos
Altera_Forum
Honored Contributor II
374 Views

Hello Cris72, 

 

I have put IOWR_ALTERA_AVALON_PIO_EDGE_CAP(LOAD_BASE, 0xf) , but still it stuck at same point......!!! 

 

but when i increase the data cache from 8 kb to 32 kb it start working and come up to my code area. 

 

still it is not taking interrupt. 

 

please look at the print screen of my project. 

 

regards 

 

kaushal
0 Kudos
Altera_Forum
Honored Contributor II
374 Views

i am taking LOAD pulse as an interrupt

0 Kudos
Reply