avrdude-dev
[Top][All Lists]
Advanced

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

[bug #60008] linuxspi programmer does not seem to release AVR reset when


From: anonymous
Subject: [bug #60008] linuxspi programmer does not seem to release AVR reset when finished
Date: Thu, 4 Feb 2021 17:27:30 -0500 (EST)
User-agent: Mozilla/5.0 (Windows NT 6.1; Win64; x64; rv:83.0) Gecko/20100101 Firefox/83.0

URL:
  <https://savannah.nongnu.org/bugs/?60008>

                 Summary: linuxspi programmer does not seem to release AVR
reset when finished
                 Project: AVR Downloader/UploaDEr
            Submitted by: None
            Submitted on: Thu 04 Feb 2021 10:27:28 PM UTC
                Category: None
                Severity: 3 - Normal
                Priority: 5 - Normal
              Item Group: None
                  Status: None
                 Privacy: Public
             Assigned to: None
         Originator Name: Ralf Herrmann
        Originator Email: ralf.herrmann@ilmsens.com
             Open/Closed: Open
                 Release: SVN snapshot
         Discussion Lock: Any
     Programmer hardware: ARMv7 embededed computer
             Device type: ATmega328pb

    _______________________________________________________

Details:

Dear avrdude team,

first of all thanks for your nice work!

I'm currently working on an embedded platform based
on an ARMv7 embedded CPU and Linux (Debian Buster).
The board has an AVR ATmega328pb attached to the A7
via SPI (AVR is slave) and the A7 also has one of its
GPIOs connected to nRST of the AVR.

Yesterday I fetched r1450 from svn, build it, and tested
communication with the AVR. I'm using programmer linuxspi
(obviously) and specify reset pin via command line as per man page.
At first it went fine and avrdude let me upload my app to flash. Verification
was successful.

However, after uploading the app, the AVR did not respond any
more to SPI commands i sent from the A7.
Long story short, i ended up checking the source code in
linuxspi.c and did not see any code that releases the reset 
GPIO line of the AVR.

To test my suspicion i copied a few lines from linuxspi_open()
to linuxspi_close() and changed it so that nRST is released.
That did the trick for me, after upload to flash AVR immediately
reacts to SPI connection from A7.

I'm not 100% sure this is unintended behaviour, however,
i found a way older version of avrdude that has the
initial code for linuxspi programmer (i think based on 6.1).
This older code used the (now deprecated) sysfs-way to operate 
the reset pin. It has indeed code to release the reset pin
through linuxspi_close() (it actually makes the GPIO an input
to the host CPU again thereby letting the pullup resistor do 
the actual release).

I hope you fond this report useful.
If you need more detail, let me know.
Keep up the good work!

BR,

Ralf




    _______________________________________________________

Reply to this item at:

  <https://savannah.nongnu.org/bugs/?60008>

_______________________________________________
  Message sent via Savannah
  https://savannah.nongnu.org/




reply via email to

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