avrdude-dev
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [avrdude-dev] Butterfly proposal: Exit upgrade function


From: Martin Thomas
Subject: Re: [avrdude-dev] Butterfly proposal: Exit upgrade function
Date: Thu, 5 Feb 2004 02:12:02 +0100

> > >> What do you think about adding a new exitspec to the -E option
> > >> to stop avrdude from sending this final 'E'? What would be a
> > >> good name for it? "-E noexitupgrade" or "-E stayupgrademode" is
> > >> IMHO much too verbose. Any suggestions?
> > >
> > >How about "-E reset" and "-E noreset"? This is not technically
> > >correct, but describes the behaviour.
> > >
> > >Cheers
> > >  Jan-Hinnerk
> >
> > For the preinstalled Butterfly bootloader the term reset would be
> > "technically correct" the bootloader issues a watchdog reset
> > when it receives an "E" since the BOOTRST fuse is blown
> > the BF restarts it's bootloader.
> 
> > So yes, option -E noreset would be a nice feature if someone
> > programs the flash and the eeprom in separate AVRDUDE
> > calls. Although I'm not sure if this would work with the current
> > (4.3.0) Butterfly programmer init.
> 
> Well, it would be a bad idea to do it this, because the effect would 
> be the reverse compared to PPI-programmers.
> 
> "reset" means that the device stays in reset after programming so the 
> application is not executed. While "noreset" means that the main 
> application starts.

I may not get you right. So the following might not fit to your remark:

So "reset" in avrdude-"standard" means "keep the  reset pin low". To keep 
the application from running. On the Butterfly the application won't start 
anyway since the users has to push the joystick up to exit the bootloader 
and jump to the application. 

"noreset" in avrdude-standard means "release the reset pin" and let
the device start. This won't work on the Butterfly either because of the
described behaviour. 

So, yes: the BF standard should be "noreset". Which would mean: send an
"E" on exit to mimic the default avrdude options and let the device
start in the "usual" way.

Whatever option gets choosen: the default option (no command line option)
should be that "E" is sent on avrdude exit. If not, this may cause some 
confusion and "support requests" if avrdude exits and the Butterfly does 
not react when the joystick is pushed up .

It might me easier (development and usage) to ignore the reset option with the 
Butterfly.

/*
 Usual scenario: Users uploader the hex-file, wait for avrdude  to complete 
 the transfer and push the Butterfly's joystick "up" (=jump to 0x0000) to see 
 if the application works. 

 If the Butterfly does not receive an "E" after flash upload  it stays in "910 
mode" 
 and waits for other commands from UART.  The loop where the joystick 
 position gets read is independant from the 910 command interpreter  loop. 
Because 
 of BOOTRST the BF jumps to the Bootloader. In the preloaded application
 the selection Options/Jump to Bootloader issues as WD reset. In the Bootloader
 the BF goes to sleep, the joystick is connected to ExtINT pins. If the joystick
 is pushed up: jmp 0x0000, if joystick is pressed the BF tries to sync
 with the flash-software (AVRPROG or avrdude/butterfly via RS232. After a 
 handshake it breaks from the joystick-loop and enters the "infinite" command-
 parser-loop. Exit from this loop is via WD-reset on "E" send via RS232
*/

Martin




reply via email to

[Prev in Thread] Current Thread [Next in Thread]