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

Submitted by:  Darell Tan <geekman>
Submitted on:  Thu 15 Jul 2010 04:30:05 PM UTC  
 
Category: NonePriority: 5 - Normal
Status: DonePrivacy: Public
Assigned to: Joerg Wunsch <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>
Project AdministratorIn charge of this item.
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>
Project AdministratorIn charge of this item.
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>
Project AdministratorIn charge of this item.
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>

 

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
  • -unavailable- added by joerg_wunsch (Posted a comment)
  • -unavailable- added by geekman (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 23 Aug 2011 09:07:27 PM UTCjoerg_wunschStatusNone=>Done
      Assigned toNone=>joerg_wunsch
      Open/ClosedOpen=>Closed
    Thu 18 Aug 2011 04:59:34 PM UTCgeekmanAttached File-=>Added updated-tpi-bb.patch, #23833
    Thu 15 Jul 2010 04:30:05 PM UTCgeekmanAttached File-=>Added avrdude-tpi-bb.patch, #20985

    Back to the top


    Powered by Savane 3.1-cleanup1