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

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

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

Kevin Cuzner-2
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: [hidden email]
             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/


_______________________________________________
avrdude-dev mailing list
[hidden email]
https://lists.nongnu.org/mailman/listinfo/avrdude-dev