snurce / optiboot

Automatically exported from code.google.com/p/optiboot
0 stars 0 forks source link

Ho to disable "Adaboot no-wait mod"? #41

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
Subj

so, i need enter to bootloder by power up

thx

Original issue reported on code.google.com by redso...@mail.ru on 30 Jun 2011 at 1:45

GoogleCodeExporter commented 8 years ago
Not an actual bug in optiboot, and no code changes to the repository are 
anticipated.  However, you should be able to do this by changing the code at 
the start of main() from:
  // Adaboot no-wait mod
  ch = MCUSR;
  MCUSR = 0;
  if (!(ch & _BV(EXTRF))) appStart();
To something like (untested!):
  // Enter bootloader expect on WDT timeout
  ch = MCUSR;
  MCUSR = 0;
  if ((ch & _BV(WDRF))) appStart();

(this is supposed to say: start the app only if the reset reason was a watchdog 
timeout.)

Original comment by wes...@gmail.com on 30 Oct 2011 at 7:28