lwip-users
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

RE: [lwip-users] Xilinx lwIP raw-api beginner question


From: Pisano, Edward A
Subject: RE: [lwip-users] Xilinx lwIP raw-api beginner question
Date: Thu, 24 May 2007 16:32:39 -0000

Hi Erik,
The problem you describe sounds very similar to the problem I had when I
first attempted to run the raw_api XiLinx example.  The solution was
that the sample code assumed a polling design, whereas my MicroBlaze
architecture had the EMAC configured for interrupts.  As such, I needed
to also register the XEmac_IntrHandlerFifo function to be called when
the ethernet controller notified EMAC that a message was incoming.  I
put this call right before the call that registers the
"mytimer_int_handler" like you have in your code.

   /*
    *Register XEmacHandler with interrupt controller
    *This is the FIFO-based interrupt handler
    */
   XIntc_RegisterHandler(XPAR_OPB_INTC_0_BASEADDR,
 
XPAR_OPB_INTC_0_OPB_ETHERNET_0_IP2INTC_IRPT_INTR,
                         (XInterruptHandler)XEmac_IntrHandlerFifo,
                         xemacif_ptr->instance_ptr);

Of course, you'll need to change the constants to the names used in your
architecture.

Also, running lwip-debug for STDOUT messages has unpredictable effects
on lwIP performance.  It has to do with how the UART is a synchronous
device.  When strings are sent to it, processing is held up until the
string output is complete.  This can results in lwIP not being able to
service things as quickly as it should. I use STDOUT very sparingly when
network traffic is underway.

Xemacif_input is still a polling function.  The Ethernet controller to
the EMAC core may be interrupt driven.  But the EMAC to lwIP interface,
via xemacif_input, is polled.  That's what your mytimer_int_handler
helps to make happen. 

Regards, Ed (a.k.a.-Paisan)
-----Original Message-----
From: address@hidden
[mailto:address@hidden On Behalf Of
Erik Jagre
Sent: Wednesday, May 23, 2007 11:57 PM
To: address@hidden
Subject: [lwip-users] Xilinx lwIP raw-api beginner question

Hi, I am a lwIP beginner and have some questions about getting a raw-api
application up and running on a Xilinx Spartan-3E 1600E MicroBlaze
Development Kit.

I have tried to run the xilinx reference design xapp663 (echo server)
but without success. It seems like my design never takes care of
incoming traffic. When I try to connect to my echo-server with telnet
ARP requests are sent to the development board. But my design never
replies.

I have tried to use the lwip-debug feature, but my program gets stuck
during the call to netif_add (this does not happen without the
lwip-debug feature activated). A print-out is made that confirms that
the IP address has been set but after that the program stops and the
program counter is set to 0x00. This makes me belive that my call to
netif_add is not done in the right way. How is netif_add used correctly?
What preparations need to be done before calling it?

I am also curious about how xemacif_input(default_netif) works. Is this
the call that takes care of all incoming traffic? Or is another call
needed to take care of ARP requests?

My code is included in the zip-file.

Grateful for any suggestions or ideas.

Regards 
Erik




reply via email to

[Prev in Thread] Current Thread [Next in Thread]