Searching for an interrupt driven TCP/IP Server Example

#1

Hi,

I’m just looking for an Interrupt driven TCP/IP Server example.
But unfortunately all examples I’ve found work in polling mode.
Also a similar question in QaA from 2013 was answered like this from wiznet:

Subject: W5200 Interrupts for TCP Server
Date: 2013-04-10

Dear customer,
Thanks for your interest in W5200
I’ll have to ask with the this problem to the person in charge.
I will answer about your question to you as soon as possible.
Thanks,
WIZnet

But “soon as possible” lasts until now and nothing more happens since that answer by Wiznet!
Because of this I slowly have same doubts like the one who posted the question, whether an interrupt driven solution is even possible with the W5200?

Has any one a solution or experiences with an interrupt driven TCP/IP server solution?

Any hints and information are very appreciated …

Thanks in advance
Ralph

#2

Dear Ralph,

I apologies technical support does not have to amicably.
I will explain the interrupt driven receiving process with pseudo-code.

main()
{
     //Set interrupt
     IMR = 0x01;      // 0th Socket are set for interrupt.
     Sn_IMR = 0x04; // Set only Recv interrupt.

     while(1)
     {
       ...
       recv_proc();
       ...
     }
}

//Handler
W5200_handler()
{
   if(Sn_IR = 0x40)
   {
      flag_RECV  = 1;  // set recv flag
      Sn_IR = 0x04; // Interrupt clear   
   }  
}

//Recv precessing
recv_proc()
{
   if(flag_RECV == 1)
   {
       recv(); // TCP RECV
   ...
       flag_RECV =1; // clear recv flag
   }
}

Thanks,