-
Notifications
You must be signed in to change notification settings - Fork 137
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[bug #56686] Verification error at 0x0000, 0x00 != 0x0c #490
Comments
This is related to linuxgpio. Not so sure if it is still relevant though. Or maybe it is specific to Raspberry Pi Zero. |
I done have a pi zero to test with, but I do have a Pi model B with the came SoC. My experience is that linuxgpio is a bit flakey (see #932), and that linuxspi is more reliable and much faster, but I'll give it a try when I'm back home. |
I will try out setting up the test setup using linuxspi/linuxgpio as well since I have quite a few Raspberry Pi boards (Raspberry Pi 3B+ and 400) as well as Orange Pi boards. |
I am not so sure if Pull Request #917 helps here or not -- I can not reproduce the issue using my Raspberry Pi 3B+, with PR #917. I will test out master git repo without #917 as well.
|
There is no issue using git repo master as well.
|
I will close this issue for now based on my testing. Please re-open if you can reproduce the issue. Thanks. |
Andrzej Pietrasiewicz andrzejtp2010@gmail.com
Sun 28 Jul 2019 11:48:26 AM UTC
Programmer hardware: linuxgpio
Device type: m2560
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.
This issue was migrated from https://savannah.nongnu.org/bugs/?56686
The text was updated successfully, but these errors were encountered: