This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

LPC2378 :Integeration of USB CDC with Ethernet Http Demo code

Hi Friends,

I am using the LPC2378 processor.

I have the USB CDC example code and Http Demo example code.

Both codes are working well in alone.
i want to integrate the USBCDC code and the Http code.

so i integrate the both code and connect the USB cable with the PC.

The USBCDC code is working well.

The problem is when i connect the Ethernet LAN cable i am not able to access the web page means i am not able to ping the address.I am getting the message "The connection has timed out".

Is this both USBCDC and http code wont work together?
should i disable any interrupt routine in the USB or http code?

please help me to solve this problem?

with regrads,
Murthy.R

Parents
  • "when i connect the Ethernet LAN cable i am not able to access the web page means i am not able to ping the address."

    The first thing to do is to confirm that the USB interrupt actually disturbs the TCP/IP stack process.

    a) Is the TCP/IP stack works without USB connection?
    b) First, connect USB cable to PC. After 20-30 sec, connect LAN cable. Does the TCP/IP stack work?
    c) First, connect LAN cable to PC and run the TCP/IP process. Then connect USB cable.

    If a) and b) works, but c) doesn't, it suggests the USB interrupt may disturb the stack. Otherwise, there is another problem on your code, such as initialization of the stack, or flag handling for common process between TCP/IP and USB. In the real application, your code has to work on all of above conditions.

    If it is proved that the USB interrupt actually disturbs TCP/IP stack, (I don't think so :-) ), apply nesting interrupt and give the higher priority to the TCP/IP than USB.

    USB supports intrinsic flow control mechanism on the hardware level without any intervention of the firmware, though Ethernet doesn't on the hardware layer. Then, USB allows less priority than TCP/IP stack.

    USB retries communication while the device is busy (NAKing) without error. The shortest timeout on the USB process is 50 ms of control transfer over the default endpoint. The timeout of the bulk endpoints of CDC is determined by the host app over serial API.

    Tsuneo

Reply
  • "when i connect the Ethernet LAN cable i am not able to access the web page means i am not able to ping the address."

    The first thing to do is to confirm that the USB interrupt actually disturbs the TCP/IP stack process.

    a) Is the TCP/IP stack works without USB connection?
    b) First, connect USB cable to PC. After 20-30 sec, connect LAN cable. Does the TCP/IP stack work?
    c) First, connect LAN cable to PC and run the TCP/IP process. Then connect USB cable.

    If a) and b) works, but c) doesn't, it suggests the USB interrupt may disturb the stack. Otherwise, there is another problem on your code, such as initialization of the stack, or flag handling for common process between TCP/IP and USB. In the real application, your code has to work on all of above conditions.

    If it is proved that the USB interrupt actually disturbs TCP/IP stack, (I don't think so :-) ), apply nesting interrupt and give the higher priority to the TCP/IP than USB.

    USB supports intrinsic flow control mechanism on the hardware level without any intervention of the firmware, though Ethernet doesn't on the hardware layer. Then, USB allows less priority than TCP/IP stack.

    USB retries communication while the device is busy (NAKing) without error. The shortest timeout on the USB process is 50 ms of control transfer over the default endpoint. The timeout of the bulk endpoints of CDC is determined by the host app over serial API.

    Tsuneo

Children