bugAVR Downloader/UploaDEr - Bugs: bug #56686, Verification error at 0x0000, 0x00...

 
 

You are not allowed to post comments on this tracker with your current authentication level.

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

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:  -email is unavailable- Open/Closed:  Open
Release:  SVN snapshot Programmer hardware:  linuxgpio
Device type:  m2560

Sun 28 Jul 2019 11:48:26 AM UTC, original submission:  

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.

Anonymous

 

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by None (Submitted the item)
  •  

    Do you think this task is very important?
    If so, you can add your encouragement to it.
    This task has 0 encouragements so far.

    Only logged-in users can vote.

     

     

     

    No changes have been made to this item

    Back to the top


    Powered by Savane 3.5