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


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

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

Submitted by:  Rene Liebscher <rliebscher>
Submitted on:  Wed Dec 14 08:58:37 2011  
Category: NonePriority: 5 - Normal
Status: Ready For TestPrivacy: Public
Assigned to: Rene Liebscher <rliebscher>Open/Closed: Closed

Tue Jan 31 19:04:49 2012, comment #2:

Implemented in svn revision 1052

Rene Liebscher <rliebscher>
Project MemberIn charge of this item.
Wed Dec 14 09:28:42 2011, 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>
Project Administrator
Wed Dec 14 08:58:37 2011, original submission:


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" )

  • 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:

Rene Liebscher <rliebscher>
Project MemberIn charge of this item.


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


Depends on the following items: None found

Items that depend on this one: None found


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

    Do you think this task is very important?
    If so, you can click here to add your encouragement to it.
    This task has 0 encouragements so far.

    Only logged-in users can vote.


    Please enter the title of George Orwell's famous dystopian book (it's a date):



    Follow 5 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Tue Sep 3 20:02:22 2013rliebscherOpen/ClosedOpen=>Closed
    Tue Jan 31 19:04:49 2012rliebscherStatusNone=>Ready For Test
    Wed Dec 14 09:28:42 2011joerg_wunschAssigned tomludvig=>rliebscher
    Wed Dec 14 09:13:30 2011joerg_wunschAssigned toNone=>mludvig
    Wed Dec 14 08:58:37 2011rliebscherAttached File-=>Added buspirate.patch, #24589

    Back to the top

    Powered by Savane 3.1-cleanup1