patchAVR Downloader/UploaDEr - Patches: patch #7686, Updating buspirate ascii mode to...

 
 

You are not allowed to post comments on this tracker with your current authentication level.

patch #7686: Updating buspirate ascii mode to current firmware, use AUX as clock generator, and setting of serial receive timeout

Submitter:  Rene Liebscher <rliebscher>
Submitted:  Wed 14 Dec 2011 08:58:37 AM UTC
   
 
Category:  None Priority:  5 - Normal
Status:  Ready For Test Privacy:  Public
Assigned to:  rliebscher Open/Closed:  Closed

Tue 31 Jan 2012 07:04:49 PM UTC, comment #2: 

Implemented in svn revision 1052

Rene Liebscher <rliebscher>
Group Member
Wed 14 Dec 2011 09:28:42 AM UTC, comment #1: 

Michal just told me he doesn't have access to buspirate
hardware anymore.

René can take care of it himself now. ;-)

Joerg Wunsch <joerg_wunsch>
Group administrator
Wed 14 Dec 2011 08:58:37 AM UTC, original submission:  

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


Rene Liebscher <rliebscher>
Group Member

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attached Files
file #24589:  buspirate.patch added by rliebscher (8KiB - application/octet-stream)

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by joerg_wunsch (Updated the item)
  • -email is unavailable- added by rliebscher (Submitted the item)
  •  

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

     

    Follow 5 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2013-09-03 rliebscher Open/ClosedOpen Closed
    2012-01-31 rliebscher StatusNone Ready For Test
    2011-12-14 joerg_wunsch Assigned tomludvig rliebscher
    2011-12-14 joerg_wunsch Assigned toNone mludvig
    2011-12-14 rliebscher Attached File- Added buspirate.patch, #24589

    Back to the top

    Powered by Savane 3.13-758e.
    Corresponding source code