embeddedartistry / athena-bootloader

An AVR Arduino bootloader that supports uploads over Ethernet (via TFTP) and Serial.
GNU Lesser General Public License v2.1
12 stars 5 forks source link

Performance Improvement: W5500 #18

Closed phillipjohnston closed 2 years ago

phillipjohnston commented 4 years ago

From the original project:

I don't now if there is a difference, but with W5500, I was able to upload a 250k sketch to mega2560. it was so slow, so I reduced the #define TFTP_PACKET_DELAY to 20 ms. worth trying, I think..

Note from the author:

With W5500 there is a possibility that you could remove the delay completely as it is. You don't encounter these issues with it because W5500 increments its socket buffer pointers internally, unlike W5100 and W5200.

Response from the issue filer:

in my tests i was able to go down to 5 ms with W5500.. I didn't try less that this

phillipjohnston commented 4 years ago

For the logic, we want the delay to be removed for W5500. It should be kept for other Wiznet shields.

hagaigold commented 2 years ago

We already know that the delay is not really needed for W5500. My guess the delay was put there because of issue #19 (for W5100 & W5200).

from the code:

// FIXME: is this right after all? smaller delay but
// still a delay and it still breaks occasionally
_delay_ms(TFTP_PACKET_DELAY);

the code was "breaks occasionally" and the delay was added to "fixed" it... Removing the delay (or decreasing it to a very small value) should be tested after #19.