Skip to content

Remote reboot #180

@Pavel-vo

Description

@Pavel-vo

Hi,

I want to upload arduino sketch over the air.
My arduino's (pro mini 8M) rx tx pins connected to bluetooth HC-05. I've made software, witch handle avrdude's events and sends special command (e.g. RESET\n). When arduino receive this command, it must reboot and wait new sketch. It works well with 1 wire connected to the RESET pin. But when I do the same without a wire, but with watchdog and when I call wdt_enable(WDTO_15MS); I don't see flashing of onboard LED. Program just restart without entering to stk500 command mode.
It would be perfect if I had something like this:

go_to_bootloader_this_time();
wdt_enable(WDTO_15MS);

But I don't know how to set MCUSR flag correct and come over this expression in optiboot.c file.

...
if (ch & (_BV(WDRF) | _BV(BORF) | _BV(PORF)))
      appStart(ch);
...

Do you have any ideas?

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions