WestfW / OptiLoader

Arduino sketch for burning new bootloaders
198 stars 105 forks source link

Page commit speed improvement #3

Open Extent421 opened 12 years ago

Extent421 commented 12 years ago

if you replace the

``` delay(100 in the commit function with: while(spi_transaction(0xF0, 0, 0, 0) == 0xFF){}; to poll the RDY/BSY flag of the micro, you can increase your write speed by about 6x, shaving off 1.5 seconds on a bootloader sized write. The same thing works on the chip erase delay, shaving off about another 90ms

WestfW commented 12 years ago

Noted. I'm not sure I need the 1.6s back; that would make it what, 3.5s total instead of 5s ?

Extent421 commented 12 years ago

I should correct myself, a safer check would be "& 1" rather than "== 0xFF"

Stock programming speed is approx 2.3 seconds, by polling BSY (and with some minor tweaks to the power up timing) you can bring cycle time down to .75 sec (including the .2 sec cooldown)

For someone bootloading a series of chips it's the difference between "click, wait, wait, wait, swap" and "click, wait, swap" Outside of that there isn't really any reason to do it but principal.

However if you were ever make a version to program a 2k bootloader (like maybe the SD card reading one) I would estimate it would be the difference between a 2.3sec program time and 8.1 sec