Minimizing Bootloader Upload Delay

I like having the bootloader, as it makes it easy to re-FLASH whenever needed. But, I have an application that I want to start up fairly quickly after power-up. Obviously, I can make a modified bootloader with a reduced delay, but has anyone tested a short upload delay, to see how short it can be, and still work reliably with avrdude? Is something like 1/2 second still workable?

Regards,
Ray L.

What model of Arduino are we talking about?

Most arduino bootloaders will not delay when first powered on, so execute the sketch almost immediately. You get the delay when the board receives a reset, either from the reset button or from the usb interface.

pylon:
What model of Arduino are we talking about?

It's a custom board, but appears as a Nano, but no USB.

Regards,
Ray L.

and what bootloader do you have? how long is the waiting time? compare it to Uno.

I believe optiboot (the bootloader used on the Uno) has a 1 second delay, and that works fine for many thousands of people using that bootloader. I've never seen a report of a too short bootloader delay being found as the cause of an upload failure, though certainly we see a lot of reports of upload failures here that we never manage to solve. I wouldn't be surprised if that 1 s delay is even a bit on the conservative side, to make sure it works in all circumstances.

I modified the bootloader code to check one of the pins on boot.

If the pin is being pulled low at boot it excepts uploading the code.

If the pin is not low the program in flash executes immediately.

caseyryb:
I modified the bootloader code to check one of the pins on boot.

If the pin is being pulled low at boot it excepts uploading the code.

If the pin is not low the program in flash executes immediately.

I like that approach! I have a serial connection to the board, so I can use one of those pins, and it costs me nothing!

Thanks!

Regards,
Ray L.