avrdude-dev
[Top][All Lists]
Advanced

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

[avrdude-dev] [patch #7686] Updating buspirate ascii mode to current fir


From: Rene Liebscher
Subject: [avrdude-dev] [patch #7686] Updating buspirate ascii mode to current firmware, use AUX as clock generator, and setting of serial receive timeout
Date: Wed, 14 Dec 2011 08:58:38 +0000
User-agent: Mozilla/5.0 (Windows NT 5.1) AppleWebKit/535.2 (KHTML, like Gecko) Chrome/15.0.874.121 Safari/535.2

URL:
  <http://savannah.nongnu.org/patch/?7686>

                 Summary: Updating buspirate ascii mode to current firmware,
use AUX as clock generator, and setting of serial receive timeout
                 Project: AVR Downloader/UploaDEr
            Submitted by: rliebscher
            Submitted on: Mi 14 Dez 2011 08:58:37 GMT
                Category: None
                Priority: 5 - Normal
                  Status: None
                 Privacy: Public
             Assigned to: None
        Originator Email: 
             Open/Closed: Open
         Discussion Lock: Any

    _______________________________________________________

Details:

Hi, 

this patch adapt the ascii mode of the buspirate programmer to work with
current firmware (5.10). (The mode command is now a lower case 'm' and also
some answers from the bus pirate also use lower case.)

Furthermore it allows (only in ascii mode) to set the buspirate's AUX output
to a choosen frequency (-x cpufreq=<125..4000> [kHz]) which can be used as
clock input (mcu pin XTAL1) for old devices (8515) or when you have set wrong
fuses so your device needs now an external clock.
 
Another change is the possibility to set the serial receive timeout using an
extended parameter (-x serial_recv_timeout=<1...> [ms]). Each time avrdude
wait for a prompt from buspirate it has to wait the serial receive timeout
because the prompt is not a complete line which ends with \n but with '>'. The
prompt will awaited after each command in ascii mode (the binary mode does at
least some basic device checking in ascii mode.) The default value of the
timeout is 100ms. I had never problems reducing this timeout to 10ms, but the
operations are much faster (especially if using ascii mode).

Following measurements show the difference if just doing the initialization of
the programmer without an mcu connected: (On Windows you better apply "patch
#7680 Fixing timeout problem in ser_recv in ser_win32.c"
https://savannah.nongnu.org/patch/index.php?7680 )

* 100ms timeout, original code without patch #7680:
** binary mode :        0m20.329s
** ascii mode :         4m11.766s

* 10ms timeout, original code without patch #7680:
** binary mode :        0m3.984s
** ascii mode :         0m39.515s

* 100ms timeout, patched code according patch#7680:
** binary mode :        *0m1.156s*
** ascii mode :         *0m3.547s*

* 10ms timeout, patched code according patch#7680:
** binary mode :        *0m1.047s*
** ascii mode :         *0m1.313s*

As you can see the ascii mode is speed up a lot, and this example does not
really transmit larger amounts of data.

Command line was:

$ time ../avrdude -c buspirate -p m8 -P com7 -x ascii -x
serial_recv_timeout=10

Detecting BusPirate...
**
**  Bus Pirate v3b
**  Firmware v5.10 (r559)  Bootloader v4.4
**  DEVID:0x044F REVID:0x3043 (24FJ64GA002 B5)
**  http://dangerousprototypes.com
**
BusPirate: using ASCII mode
BusPirate is now configured for SPI
avrdude.exe: initialization failed, rc=-2
             Double check connections and try again, or use -F to override
             this check.


avrdude.exe done.  Thank you.


real    0m1.313s
user    0m0.015s
sys     0m0.031s





    _______________________________________________________

File Attachments:


-------------------------------------------------------
Date: Mi 14 Dez 2011 08:58:37 GMT  Name: buspirate.patch  Size: 8kB   By:
rliebscher

<http://savannah.nongnu.org/patch/download.php?file_id=24589>

    _______________________________________________________

Reply to this item at:

  <http://savannah.nongnu.org/patch/?7686>

_______________________________________________
  Nachricht geschickt von/durch Savannah
  http://savannah.nongnu.org/




reply via email to

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