avrdude-dev
[Top][All Lists]
Advanced

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

Re: [patch #9816] Implement new programmer type: linuxspi


From: Ralf Ramsauer
Subject: Re: [patch #9816] Implement new programmer type: linuxspi
Date: Tue, 22 Sep 2020 23:16:48 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.12.0

Hi Lars,

On 9/22/20 10:20 PM, Lars Ollén wrote:
> 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

Could you attach a proper patch? Then I'll test this change on my
Raspberry Pi. I wonder why I didn't notice that on the Rpi, probably it
has those parameters set by default.

> 
> 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 ;)

:-)

Thanks
  Ralf

> 
>     _______________________________________________________
> 
> Reply to this item at:
> 
>   <https://savannah.nongnu.org/patch/?9816>
> 
> _______________________________________________
>   Message sent via Savannah
>   https://savannah.nongnu.org/
> 


-- 
Ralf Ramsauer
GPG: 73F94D11C85252CC



reply via email to

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