[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: linuxspi question

From: Joerg Wunsch
Subject: Re: linuxspi question
Date: Sat, 27 Nov 2021 19:30:23 +0100

As Joerg Wunsch wrote:

> I think I've got the connections wired correctly:
> RPi        ISP         Name
> 19         4           MOSI
> 21         1           MISO
> 23         3           SCK
> 24         5           /RESET
> 25         6           GND

I finally understood it. Pin 24 (GPIO8) cannot be used since it
belongs to the standard SPI feature set of Linux, where the select
signal is deasserted rather quickly, so we would leave ISP mode on the

Thus, an independent GPIO pin needs to be used. Pin 22 (GPIO25) is an
obvious option, being quite close to the SPI pins on J8 on the
Raspberry Pi.

I added an example pinout to the doc/avrdude.texi file.

Also, the driver abused the -b <baudrate> option to set the bit clock
for ISP operation. This option was meant for (older) RS232-attached
programmers as the communication baud rate. I changed it to use -B
<bitclock> instead (with a fallback to the -b value), which has the
additional benefit that kHz and MHz suffix units are being understood.
Also, I changed the default clock from 400 kHz to 200 kHz, as this is
IMHO a much more sane default since most AVRs ship with 1 MHz CPU
clock by default.

Bottom line, I got it working on my Raspberry Pi now.

cheers, Joerg               .-.-.   --... ...--   -.. .  DL8DTL

Never trust an operating system you don't have sources for. ;-)

reply via email to

[Prev in Thread] Current Thread [Next in Thread]