We have upgraded the community system as part of the upgrade a password reset is required for all users before login in.

Arduino-Dock-2 ATmega328P Boot Time

  • On an Arduino Uno R3 the boot time (Time from power applied to the setup function running) is 3 seconds, however the Arduino Dock 2 boot time for the ATmega328P chip is between 10-13 seconds.

    Has anyone had any success in reducing this boot up time? What is causing the delay? Is it waiting for a serial connection to the Omega?

    Why this matters to me: I am using a momentary switch to turn the board on and off. Pressing and holding the power button for 3 seconds (until the 328P boots up and sets an output pin high in the startup function) is very reasonable.... pressing and holding the power button for 10-13 seconds is way too much time to be holding the power button with the end user thinking there is nothing happening.

  • @Jon-Gordon said in Arduino-Dock-2 ATmega328P Boot Time:

    What is causing the delay?

    The Arduino Dock 2 MCU_RESET circiut:
    Where - as you know - OM_IO19 is GPIO19, SW7 is the MCU_RESET BUTTON and the MCU_RESET line goes to the /RESET pin of ATmega328P.
    It's (T2, R2, R3) needed when Omega (avrdude) wants to do something the MCU or if the user wants to reset the MCU using some program,
    and it causes that unpleasant "side effect" during Omega2(+)'s boot time - I think not fully intentionally by Onion's engineers / programmers (ie. accidentally ;-).
    So - for example - you should put a jumper between GPIO19 and the R2 resistor.

    IMHO some jumpers are missing from the Arduino Dock 2 by design - this is one of them.

  • @György-Farkas I'm assuming you mean break the connection between OM_IO19 and the R2 Resistor (or just remove the resistor)
    That doesn't really seem feasible, as the R2 resistor is mounted underneath the omega2+ mount, so If I wanted to reprogram the MCU via wireless in the field, it wouldn't work as expected (no mcu reset from omega)

    BUT to confirm it is the Omega2+ holding things up, firing up the arduino dock 2 without the Omega2+ module installed, greatly increases the MCU boot time... to about 3 seconds.

  • @Jon-Gordon Here you are some possibilities to proof this concept:

    1. solder two wires with a normally closed switch / jumper to R3 and open it if you want to flash the MCU
    2. build a socket "sandwich": Omega2(+) --- a socket --- another socket without GPIO_19 pin --- the original socket on the Arduino Dock 2 (from top to down) and to wires with a normally open switch / jumper and close it if you want to flash the MCU
    3. remove R2 - solder two wires instead with a normally open jumper and close it with 1kOhm if you want to flash the MCU

    About the 3 seconds - an interrupt driven assembly program would be definitely faster than any Arduino sketch - I think.

  • @György-Farkas Thanks again for replying! About the 3 seconds... it is desired and acceptable, having to hold the momentary switch down for 3 seconds to turn on/off the device ensures that it is not turned on or off accidentally. (This project is being run from a battery) I'm just a little annoyed that it takes LONGER than 3 seconds (10-13) to boot up the MCU.

    I agree your suggestions would work, but I would like to avoid having to make hardware changes to the board... in case this project happens to be manufactured in any considerable number. (The arduino dock is mounted on a pcb, so I was kind of hoping there would be a hardware fix that I could make to MY pcb to fix this... without resorting to altering the Arduino Dock board)

    I wonder if anything could be done in the Omegas boot code to pull pin 19 low sooner in the boot sequence or if is something that can't be avoided due to the Omegas internals.

Looks like your connection to Community was lost, please wait while we try to reconnect.