Commit Graph

11 Commits

Author SHA1 Message Date
Hannes Weisbach c72b97d2a8 avrftdi_tpi.[c|h]: integrate avr_tpi_[program_enable,chip_erase]()
git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk/avrdude@1168 81a1dc3b-b13d-400b-aceb-764788c761c2
2013-05-06 12:50:42 +00:00
Hannes Weisbach be385b2b48 avr.c: Adds avr_tpi_program_enable
Generic function enabling external programming on TPI devices. This
function sets the required guard time (which is passed in as parameter),
checks the TPI identification register, writes SKEY command + SKEY, and
finally polls the NVMEN bit in TPISR.

avr.h: Add prototype definitions of avr_tpi_program_enable() and
avr_tpi_chip_erase().
avrftdi_tpi.c: Removes tpi_skey_cmd array, containing the SKEY command
and the SKEY bytes.
tpi.h: Adds tpi_skey_cmd array, containing the SKEY command and the SKEY
bytes, but in the reverse order of tpi_skey.

git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk/avrdude@1167 81a1dc3b-b13d-400b-aceb-764788c761c2
2013-05-06 12:49:26 +00:00
Hannes Weisbach 556b3eddb3 avrftdi: Use pgm->setpin instead of pgm->cookie->set_pin
avrftdi.c: remove set_pin init, add pgm->setpin init
avrftdi_private.h: remove avrftdi_t->set_pin member
avrftdi_tpi.c: change avrftdi_t->set_pin calls to pgm->setpin.

git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk/avrdude@1163 81a1dc3b-b13d-400b-aceb-764788c761c2
2013-05-06 11:48:08 +00:00
Hannes Weisbach 90b0a233ef avrftdi_tpi.c: Remove set_pin() to set MOSI high
This is not necessary any more, because the "frame" ends in logic 1, so
the pin is high anyway and the MPSSE keeps the pin value as long as it
is idle. Setting the pin low would cause the TPI physical layer in the
AVR part to detect a collision.

git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk/avrdude@1159 81a1dc3b-b13d-400b-aceb-764788c761c2
2013-05-03 13:01:20 +00:00
Hannes Weisbach 7e63e1babf avrftdi_tpi.c: Update I/O to pgm->cmd_tpi
All I/O of avrftdi_tpi is done in terms of pgm->cmd_tpi() calls instead
of calling avrftdi_tpi_[read,write]_byte() functions directly.

git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk/avrdude@1158 81a1dc3b-b13d-400b-aceb-764788c761c2
2013-05-03 12:58:15 +00:00
Hannes Weisbach 6a4d3d3964 Adds TPI-support for FTDI-based programmers with MPSSE
git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk/avrdude@1151 81a1dc3b-b13d-400b-aceb-764788c761c2
2013-05-02 11:07:00 +00:00
Hannes Weisbach 923aa2edab avrftdi: Set guard time to fixed 2 bits.
avrftdi_private.h, avrftdi.c: remove pdata->guard_bits refernces, since
they are no longer needed
avrftdi_tpi.c: Use fixed guard time of 2 bits, this gives 16 bits per
frame. tpi_byte2frame() and tpi_frame2byte() functions are now
symmetrical and extraction of received data in avrftdi_read_byte is less
complicted. Write the new guard time to the TPI in
avrftdi_tpi_program_enable().

git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk/avrdude@1150 81a1dc3b-b13d-400b-aceb-764788c761c2
2013-05-02 11:06:52 +00:00
Hannes Weisbach 27f7e6e5a4 avrftdi_tpi.c: Adds avrftdi_tpi_disable()
In this function the NVM enable bit in TPISR is written to zero, like
described in AVR918. The reset line is released in avrftdi_close().

git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk/avrdude@1149 81a1dc3b-b13d-400b-aceb-764788c761c2
2013-05-02 11:06:45 +00:00
Hannes Weisbach 2ce37b2895 avrftdi_tpi.c: Simplify break command by sending 16 zero bits
git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk/avrdude@1148 81a1dc3b-b13d-400b-aceb-764788c761c2
2013-05-02 11:06:37 +00:00
Hannes Weisbach a6b33b8b22 avrftdi_tpi.c: Move to new avrftdi log infrastructure
git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk/avrdude@1146 81a1dc3b-b13d-400b-aceb-764788c761c2
2013-05-02 11:06:22 +00:00
Hannes Weisbach 008ff9bb97 Adds initial avrftdi TPI support.
Device identification is possible tested under OS X 10.6.8 with an
FT4232H and ATtiny10.

git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk/avrdude@1145 81a1dc3b-b13d-400b-aceb-764788c761c2
2013-05-02 11:06:15 +00:00