* avrdude.conf.in: use @HAVE_LINUXGPIO_BEGIN/END@ and
@HAVE_LINUXSPI_BEGIN/END@ brackets around respective config
snippets; values were already set in configure.ac.
* linuxspi.c (linuxspi_open): Provide a reasonable (for the
Raspberry Pi) default for the -P option
* avrdude.1: Extend linuxspi documentation
* doc/avrdude.texi: (Dito.)
git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk/avrdude@1496 81a1dc3b-b13d-400b-aceb-764788c761c2
Submitted by Alex Sverdlin:
* linuxspi.c (linuxspi_reset_mcu, linuxspi_open): Since Linux
v5.10 GPIO ABI Version 1 is optional and depends on
CONFIG_GPIO_CDEV_V1.
git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk/avrdude@1495 81a1dc3b-b13d-400b-aceb-764788c761c2
Submitted by Alex Sverdlin:
* linuxspi.c (linuxspi_open): Clear the inversion mask on request
and set default state to avoid short glitches on the GPIO line.
git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk/avrdude@1494 81a1dc3b-b13d-400b-aceb-764788c761c2
Submitted by David Mosberger-Tang:
* ft245r.c (ft245r_set_bitclock): add workaround for
FT245 hardware bugs in bitclock setting
Correct baud rate calculation (multiplying with factor of 2 was wrong)
and add compile-time workaround for FTDI chips suffering for the
variable pulse-width errata. The workaround entails always running
the chip at 3MHz and stuffing the channel with repeated bytes to
achieve the desired baudrate.
This has no effect on programming speed. Note, however, that now a
baudrate option -b750000 has to be used to achieve maximum speed.
(Option enabled by default now.)
git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk/avrdude@1488 81a1dc3b-b13d-400b-aceb-764788c761c2
Submitted by David Mosberger-Tang:
* ft245r.c: Remove the reader thread (also removes
patch #9079)
Eliminate separate reader thread by tracking how many bytes are queued
in the FTDI chip's RX FIFO and reading those bytes when it fills up
(since in synchronous bitbang mode, the chip won't send any more bytes
until it has space in the RX FIFO). This reduces TPI programming time
by another 33%.
Since write data is now queued as much as possible, we need flush this
queued data (a) before reading and (b) before sleeping. For the
latter case, a new helper function ft245r_usleep() is introduced.
git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk/avrdude@1487 81a1dc3b-b13d-400b-aceb-764788c761c2
Submitted by David Mosberger-Tang:
ft245r.c (set_pin, ft245r_open): use
ft245r_send_and_discard() so ft245r_in can go away
git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk/avrdude@1486 81a1dc3b-b13d-400b-aceb-764788c761c2
Submitted by David Mosberger-Tang:
Optimize TPI programming speed by reducing number of USB reads.
Specifically, when writing to the FTDI chip (without needing the data
it accumulates), simply increment a count of how many bytes the next
read should ignore. Thus, if there is one or more write followed by a
read, we only need to read from the device once.
Improves TPI programming speed by another factor of 2.
git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk/avrdude@1485 81a1dc3b-b13d-400b-aceb-764788c761c2
Submitted by David Mosberger-Tang
With newer versions of the Linux kernel (e.g., Ubuntu's
linux-image-4.4.0-75-generic), the default for the latency timer is
set to a high value. Since this driver needs quick turnaround times,
set it explicitly to the minium. This improves TPI programming speed
by almost a factor of 10.
git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk/avrdude@1484 81a1dc3b-b13d-400b-aceb-764788c761c2
Submitted by David Mosberger-Tang:
* ft245r.c: add TPI support
* avrdude.conf.in (tc2030): New programmer
git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk/avrdude@1483 81a1dc3b-b13d-400b-aceb-764788c761c2
Comparison against "usb" was done the wrong way.
git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk/avrdude@1480 81a1dc3b-b13d-400b-aceb-764788c761c2
* jtag3.c (jtag3_getsync, jtag3_close): correctly extract
programmer name from list of names
git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk/avrdude@1478 81a1dc3b-b13d-400b-aceb-764788c761c2
Submitted by Ivan Frederiks:
Replace magic numbers by #defined constant
git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk/avrdude@1475 81a1dc3b-b13d-400b-aceb-764788c761c2
Submitted by Ivan Frederiks
Fix MISO sampling on falling edge of SCK.
git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk/avrdude@1474 81a1dc3b-b13d-400b-aceb-764788c761c2
patch #9320: fix TPI RESET in bitbang.c
* bitbang.c (bitbang_initialize): wait for 128 ms after deasserting
/RESET (per datasheet), and keep /RESET low during MOSI/MISO link check
git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk/avrdude@1472 81a1dc3b-b13d-400b-aceb-764788c761c2
patch #9253: Fix for giving terminal_mode commands more than 20 arguments
* term.c (tokenize): fix realloc usage, pointer returned not necessarily
the same as pointer passed
git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk/avrdude@1471 81a1dc3b-b13d-400b-aceb-764788c761c2
patch #9110: Let reserved fuse bits to be read as *don't care*
* avr.c (compare_memory_masked): New function
* libavrdude.h: declare compare_memory_masked(); also, insist on C99
so <stdint.h> is required now
* main.c: Use compare_memory_masked() in safemode comparisons
C99 / stdint.h has basically already been required before, as types
like uint8_t are in use in a number of other locations throughout the
source.
git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk/avrdude@1470 81a1dc3b-b13d-400b-aceb-764788c761c2
patch #10017: uspasp / tpi: Automatically clear configuration byte (fuse) before writing it
* usbasp.c (usbasp_tpi_paged_write): clear fuse region before writing it
git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk/avrdude@1468 81a1dc3b-b13d-400b-aceb-764788c761c2
bug #58495: Add atmega324pb support to avrdude.conf.in
* avrdude.conf.in (ATmega324PB): new entry
git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk/avrdude@1461 81a1dc3b-b13d-400b-aceb-764788c761c2
bug #59227: Add new part. How does one get a part added to the CONF file?
* avrdude.conf.in (LGT8FX88P, LGT8FX168P, LGT8FX328P): new parts
git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk/avrdude@1457 81a1dc3b-b13d-400b-aceb-764788c761c2
* avrdude.conf.in (m324a): New entry.
Submitted by Björn Mellström
git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk/avrdude@1449 81a1dc3b-b13d-400b-aceb-764788c761c2
* avrdude.conf.in (m328pb): Add own efuse definition
Submitted by Ronald Sutherland
git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk/avrdude@1448 81a1dc3b-b13d-400b-aceb-764788c761c2