mirror of
https://github.com/mariusgreuel/avrdude.git
synced 2025-09-27 22:45:27 +00:00
Improve defaults and documentation of linuxspi
* 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
This commit is contained in:
@@ -198,14 +198,30 @@ should be connected between the AVR's reset pin and Vcc. If Vcc is not
|
||||
the same as the SPI voltage, this should be done on the AVR side of
|
||||
the level translator to protect the hardware from damage.
|
||||
|
||||
A commented-out template for this programmer is provided in the
|
||||
avrdude configuration file. To use it, clone that entry into the
|
||||
per-user configuration file, and configure the @code{reset} GPIO
|
||||
number accordingly. Linuxspi can be used as follows:
|
||||
On a Raspberry Pi, header J8 provides access to the SPI and GPIO
|
||||
lines.
|
||||
|
||||
@smallexample
|
||||
avrdude -c linuxspi -P /dev/spidev:/dev/gpiochip[:resetpin]
|
||||
@end smallexample
|
||||
Typically, pins 19, 21, and 23 are SPI MOSI, MISO, and SCK, while
|
||||
pins 24 and 26 would serve as CE outputs. So, close to these pins
|
||||
is pin 22 as GPIO25 which can be used as /RESET, and pin 25 can
|
||||
be used as GND.
|
||||
|
||||
A typical programming cable would then look like:
|
||||
|
||||
@multitable @columnfractions .15 .15 .3
|
||||
@item @code{J8 pin} @tab @code{ISP pin} @tab @code{Name}
|
||||
@item @code{21} @tab @code{1} @tab @code{MISO}
|
||||
@item @code{-} @tab @code{2} @tab @code{Vcc - leave open}
|
||||
@item @code{23} @tab @code{3} @tab @code{SCK}
|
||||
@item @code{19} @tab @code{4} @tab @code{MOSI}
|
||||
@item @code{22} @tab @code{5} @tab @code{/RESET}
|
||||
@item @code{25} @tab @code{6} @tab @code{GND}
|
||||
@end multitable
|
||||
|
||||
(Mind the 3.3 V voltage level of the Raspberry Pi!)
|
||||
|
||||
The @code{-P @var{portname}} option defaults to
|
||||
@code{/dev/spidev0.0:/dev/gpiochip0} for this programmer.
|
||||
|
||||
The STK500, JTAG ICE, avr910, and avr109/butterfly use the serial port to communicate with the PC.
|
||||
The STK600, JTAG ICE mkII/3, AVRISP mkII, USBasp, avrftdi (and derivatives), and USBtinyISP
|
||||
|
Reference in New Issue
Block a user