[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[patch #9816] Implement new programmer type: linuxspi
From: |
Lars Ollén |
Subject: |
[patch #9816] Implement new programmer type: linuxspi |
Date: |
Tue, 22 Sep 2020 16:20:39 -0400 (EDT) |
User-agent: |
Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/85.0.4183.102 Safari/537.36 |
Follow-up Comment #4, patch #9816 (project avrdude):
I've used this patch for a while now, had some initial issues which I tracked
down to this patch not setting the SPI mode, and if you are using SPI to
communicate with as well, setting a incompatible SPI mode will cause this
programmer being unable to communicate with the chip.
I fixed it by adding:
uint32_t mode = SPI_MODE_0 | SPI_NO_CS;
ret = ioctl(fd_spidev, SPI_IOC_WR_MODE32, &mode);
if (ret == -1) {
avrdude_message(MSG_INFO, "%s: error: Unable to set SPI mode %0X on
%s\n", progname, mode, spidev);
goto close_spidev;
}
Before:
fd_gpiochip = open(gpiochip, 0);
in linuxspi.c
Ya I know that's the worst patch ever :( I applied this to the 6.3 source and
added a shit load of debug messages to figure out where the issue was, so my
local source is a mess ;)
_______________________________________________________
Reply to this item at:
<https://savannah.nongnu.org/patch/?9816>
_______________________________________________
Message sent via Savannah
https://savannah.nongnu.org/