The TCP_SERVER issue

"Sanjay Morab" <[email protected]> Wed, 10 Sep 2008 09:32:58 +0530
Newsgroups gmane.comp.hardware.motorola.microcontrollers.coldfire
Message-ID <[email protected]>
Dear all

 

 

I am working on Device MCF52235 in which I am using Ethernet as
communication channel. Along with the communication I need to detect the
Proximity card in weigand mode. The problem I am facing is whenever the Port
is connected the TCP communication is ON , I am not able to process the
Proximity card reading. I need to read 50uSec pulse. I am using the
Coldfire_Lite_tcp_server code as is with out modification. I am calling the
card reading function in TK_ENTRY .

 

When the TCP communication is not in progress and socket is disconnected the
card reader works fine. But once the socket is connected and tcp
communication is ON card doesnot read.

 

 

 

 

TK_ENTRY(tk_emgtcpsrv)

{

   int err;

 

   while (!iniche_net_ready)

      TK_SLEEP(1);

 

   err = freescale_tcp_init();

   if( err == SUCCESS )

   {

      exit_hook(freescale_tcp_cleanup);

   }

   else

   {

      dtrap();
// emghttp_init()  shouldn't ever fail

   }

 

   for (;;)

   {

            ReadCardReaders();

      freescale_tcp_check();                                 // will block
on select

      tk_yield();                                                    // give
up CPU in case it didn't block

            

            

      if (net_system_exit)

         break;

      

   }

   TK_RETURN_OK();

}

 

 

 

Please let me know whether I am calling the function in right place?

 

Regards

Sanjay Morab