I, too have had latency issues, and added a 24 bit delay counter right after the first jump. I set the jump vector at location 0 to jump past the end of MCLoader, pause for awhile, then jump to the beginning of MCLoader. That improved the reliability of my loads, since I use only a two-wire setup (I don't control MCLR), and bootload only on power-up.
I also modified the loader to change MCLR to a "normal" input, and then check the status of that pin before running the bootloader. If the pin was LOW, jump to the bootloader. If the pin was high, go to the bootloader's vector location and jump directly to the program without trying the bootloader. It was a "write protect" function.




Bookmarks