avrdude-dev
[Top][All Lists]
Advanced

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

[avrdude-dev] [bug #56686] Verification error at 0x0000, 0x00 != 0x0c


From: anonymous
Subject: [avrdude-dev] [bug #56686] Verification error at 0x0000, 0x00 != 0x0c
Date: Sun, 28 Jul 2019 07:48:28 -0400 (EDT)
User-agent: Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:68.0) Gecko/20100101 Firefox/68.0

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

                 Summary: Verification error at 0x0000, 0x00 != 0x0c
                 Project: AVR Downloader/UploaDEr
            Submitted by: None
            Submitted on: Sun 28 Jul 2019 11:48:26 AM UTC
                Category: None
                Severity: 3 - Normal
                Priority: 5 - Normal
              Item Group: None
                  Status: None
                 Privacy: Public
             Assigned to: None
         Originator Name: Andrzej Pietrasiewicz
        Originator Email: address@hidden
             Open/Closed: Open
                 Release: SVN snapshot
         Discussion Lock: Any
     Programmer hardware: linuxgpio
             Device type: m2560

    _______________________________________________________

Details:

I'm using linuxgpio programmer with Raspberry Pi Zero acting as the programmer
and programming an m2560. There is always the problem mentioned in the
summary.

The problem happens after this invocation:

avrdude -c 2560 -p m2560 -U test.hex

But, on the other hand, this works:

avrdude -c 2560 -p m2560 -eu && avrdude -c 2560 -p m2560 -U test.hex -D

It seems that a sufficiently long delay between erasing and programming helps.
I tried the below and indeed it helped:

diff --git a/main.c b/main.c
index ad50772..5dbcf30 100644
--- a/main.c
+++ b/main.c
@@ -1241,6 +1241,9 @@ int main(int argc, char * argv [])
       }
       exitrc = avr_chip_erase(pgm, p);
       if(exitrc) goto main_exit;
+      pgm->close(pgm);
+      pgm->open(pgm, port);
+      pgm->initialize(pgm, p);
     }
   }

but it seems an overkill; ultimately only much smaller change in linuxgpio is
enough to fix the problem:

diff --git a/linuxgpio.c b/linuxgpio.c
index b616311..b93142a 100644
--- a/linuxgpio.c
+++ b/linuxgpio.c
@@ -209,6 +209,7 @@ static int linuxgpio_highpulsepin(PROGRAMMER * pgm, int
pinfunc)
     return -1;
 
   linuxgpio_setpin(pgm, pinfunc, 1);
+  bitbang_delay(20000);
   linuxgpio_setpin(pgm, pinfunc, 0);
 
   return 0;

BTW I'm using an SVN clone, but for the purpose of my experiments I also made
the trunk/avrdude directory a git repository, hence the format of diffs.




    _______________________________________________________

Reply to this item at:

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

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




reply via email to

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