[Top][All Lists]
[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 05:59:56 +0100 |
> On Thursday 05 February 2004 02:12, Martin Thomas wrote:
>
> > /*
> > 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 */
>
> Do I get this right?
> - If you don't send the "E" you can only enter the program by powering
> down and then pressing a button.
Yes, powering down or "hardware reset"
> - If you send the "E" you still have to press the button (it is a
> joystick, AFAIK) to start the program?
Yes, "E" does a WD reset, which means "restart bootloader", Exit
from Bootloader is joystick up (wake up from sleep in the preinstalled
application is the same so the user does not notice the difference)
> - If you send the "E" you have to press another button to be able to
> connect to the bootloader once again?
Yes, if there was no js-"up" after "E" the bootloader is active and
awaits handshake only if "enter" is pressed.
> I don't have a butterfly, but your text and the bootloader source code
> look like this is how it works ;-(
It's a little strange but the firmware is "tuned" to save battery power.
I've ported the bl to avr-gcc but it doesn't make sense to adopt
avrdude/butterfly.c to another bootloader than the preinstalled one.
Martin