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

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

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

Implemented in svn revision 1052

Rene Liebscher <rliebscher>
Project MemberIn charge of this item.
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>
Project Administrator
Wed 14 Dec 2011 08:58:37 AM UTC, 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 (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)

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

    Only logged-in users can vote.




    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.3