Author Topic: Delay between Ethernet packets  (Read 6654 times)

DJones

  • Jr. Member
  • **
  • Posts: 2
    • View Profile
Delay between Ethernet packets
« on: February 03, 2012, 01:35:20 pm »
I am using the example ethernet bootloader firmware on a LCP2378 running at 48Mhz.  After the write command, FlashMagic proceeds to send 512 bytes, then the checksum.  Using wireshark, I see this occuring at a rate of about 20us per message.  The trouble is, the firmware is getting the checksum when it thinks it still has about half of the bytes to go.  So it is missing messages.

It does work using the ethernet bootloader tool supplied by NXP running in debug mode.  It does not work in regular mode.  I suspect that the debug mode works because it takes time to print all of the bytes to the text box on the GUI.

Could you please add a parameter that allows me to specify a delay between messages (if any)?  That would certainly help out debugging for some people (myself included), and allow lower clock frequencies on the processors.  Thank you!

Andy Ayre

  • ESAcademy Staff
  • Sr. Member
  • *****
  • Posts: 2124
    • View Profile
    • Embedded Systems Academy, Inc.
    • Email
Re: Delay between Ethernet packets
« Reply #1 on: February 06, 2012, 01:57:36 am »
Do you mean packets are arriving out of order?

Andy
Embedded Systems Academy, Inc.
support at esacademy dot com

DJones

  • Jr. Member
  • **
  • Posts: 2
    • View Profile
Re: Delay between Ethernet packets
« Reply #2 on: February 06, 2012, 10:09:04 am »
I have not noticed that they are out of order.  Right now I am assuming that they are in order.  I re-wrote the write-to-ram function so that it fills a buffer instead of calling uudecode() for every packet it received.  It worked better, but still not good enough.  Before the modification, it would get about 200-300 bytes into the 512 byte frame when it received the checksum packet.  After the modification, it would get about 300-400 bytes into the 512 byte frame when it received the checksum packet.  So it did help, but the packets are arriving faster than I can peel them off the hardware.

EDIT:
I should also point out that every other function seems to be working just fine.  Most of the other functions have a handshake process that waits for the microcontroller to respond.  The write to ram function is the only one that I have seen that sends multiple packets without an ack until the very end.
« Last Edit: February 06, 2012, 10:17:37 am by DJones »

Andy Ayre

  • ESAcademy Staff
  • Sr. Member
  • *****
  • Posts: 2124
    • View Profile
    • Embedded Systems Academy, Inc.
    • Email
Re: Delay between Ethernet packets
« Reply #3 on: February 09, 2012, 12:58:09 am »
OK, we will look into this but I can't promise a timeframe.

Andy
Embedded Systems Academy, Inc.
support at esacademy dot com

Andy Ayre

  • ESAcademy Staff
  • Sr. Member
  • *****
  • Posts: 2124
    • View Profile
    • Embedded Systems Academy, Inc.
    • Email
Re: Delay between Ethernet packets
« Reply #4 on: November 12, 2012, 04:05:20 am »
Implemented in version 6.98.

Andy
Embedded Systems Academy, Inc.
support at esacademy dot com