patchAVR Downloader/UploaDEr - Patches: patch #7244, TPI bitbang implementation

 
 

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

patch #7244: TPI bitbang implementation

Submitter:  Darell Tan <geekman>
Submitted:  Thu 15 Jul 2010 04:30:05 PM UTC
   
 
Category:  None Priority:  5 - Normal
Status:  Done Privacy:  Public
Assigned to:  joerg_wunsch Open/Closed:  Closed

Tue 23 Aug 2011 09:07:27 PM UTC, comment #4: 

Thanks for your great work!  Committed in r976.

I couldn't get my "ponyser" programmer to talk to an ATtiny10,
but my (parallel-port based) "bsd" one does, so I think all
is fine.

Joerg Wunsch <joerg_wunsch>
Group administrator
Thu 18 Aug 2011 02:27:49 PM UTC, comment #3: 


> Yes it should work on parallel bitbang adapters too, as long as > they implement the getpin, setpin, and highpulsepin functions.


That's the case, see par.c.  You might want to fill in the

pgm->cmd_tpi        = bitbang_cmd_tpi;

line there as well.

> Where should I document this?


In doc/avrdude.texi, somehow in the verbal description of
the -P option.

> It should work like any other bitbang programmer, except that > the MISO and MOSI pins should connect to TPIDATA, with MOSI through a 1k resistor.


This information could go into the "Troubleshooting" section,
which (despit its name) more and more becomes a kind of FAQ.

Joerg Wunsch <joerg_wunsch>
Group administrator
Thu 18 Aug 2011 03:05:28 AM UTC, comment #2: 

Yes it should work on parallel bitbang adapters too, as long as they implement the getpin, setpin, and highpulsepin functions.

Where should I document this? It should work like any other bitbang programmer, except that the MISO and MOSI pins should connect to TPIDATA, with MOSI through a 1k resistor.

The wiring diagram looks something like this:
http://irq5.files.wordpress.com/2010/07/attiny10-bitbang-prog.png

Darell Tan <geekman>
Wed 17 Aug 2011 02:36:03 PM UTC, comment #1: 

Cool!

Curious, shouldn't this also work on parallel bitbang adapters,
as the entire bitbanging is abstracted inside AVRDUDE?

Somehow, I think the new feature should be mentioned in the
documentation as well.

Joerg Wunsch <joerg_wunsch>
Group administrator
Thu 15 Jul 2010 04:30:05 PM UTC, original submission:  

I have implemented the TPI protocol for serial bitbang programmers.

The code requires some work, so I'm posting what I have here. Please do let me know what changes need to be made so I can clean it up.

The first logical step was to implement pgm->cmd_tpi() for the serialbb programmer.

Code added in avr.c should somehow use the OPCODE structs, but I'm not sure what's the best way to change it since the read & write opcode do not contain the address but rely on a separate set-address opcode. Another opcode that's out of place is the SKEY instruction, which requires an operand of 8 bytes. This definitely cannot fit into the 32-bit "instruction format" defined.

The serialbb also does not implement a paged_load function, but TPI is faster when reading in blocks, therefore the code was inserted in avr_read & avr_write.

Constants in tpi.h (there is no tpi.c) should be somehow moved into the AVRPART struct, but TPI has so far been in a single product line, the ATtiny4/5/9/10 which share the same I/O addresses.

Darell Tan <geekman>

 

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

Attached Files
file #23833:  updated-tpi-bb.patch added by geekman (21KiB - application/octet-stream - added cmd_tpi in par.c and added connection instructions to the "Troubleshooting" section)
file #20985:  avrdude-tpi-bb.patch added by geekman (18KiB - application/octet-stream - Initial patch)

 

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 (Posted a comment)
  • -email is unavailable- added by geekman (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
    2011-08-23 joerg_wunsch StatusNone Done
        Assigned toNone joerg_wunsch
        Open/ClosedOpen Closed
    2011-08-18 geekman Attached File- Added updated-tpi-bb.patch, #23833
    2010-07-15 geekman Attached File- Added avrdude-tpi-bb.patch, #20985

    Back to the top

    Powered by Savane 3.13-cf05.
    Corresponding source code