-
Notifications
You must be signed in to change notification settings - Fork 149
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
Ensure full words are loaded, low-byte first, for ISP programming #1265
Conversation
Seems to work with |
I can reproduce Issue #1263 and I can confirm this PR #1265 fixed the issue reported in #1263.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Tested to be good.
Same for linuxgpio. Issue #1263 also affected linuxgpio and this PR fixed the issue.
|
I am having some connection issues with the ribbon cables with the ATmega2560 so that I can not test Issue #455 now with the ATmega2560. Edit: never mind, the hex file is generic and I can reproduce issue #455 using ATmega328P, Again PR #1265 is good to fix the issue.
|
Issue #1263 can be reproduced with ATmega328P as well, for linuxgpio. Again this PR fixed the issue.
|
@stefanrueger For sanity check, I also tested with usbasp and there is no issue with git main or this PR. |
Great to know this solved the issue. Thanks for feedback @cinderblock and @mcuee. I reviewed the current PR again and identified two subtle problems:
So I changed tack and made do without marking extra bytes TAG_ALLOCATED. The new PR also streamlines the programming code (though some might think steamrolls the programming code 😉) I believe this PR to be production ready, but would be cool if it could be tested. |
It seems to be fine.
|
Addresses Issue #1263
Although the ISP interface for classic parts loads pages byte for byte (not word for word) into a buffer on chip, the data sheets say that the low byte must be written before the high byte for programming to work. This PR ensures that. The problem with the current code is that perfectly legal hex files can just set high bytes from time to time (odd start address of blocks etc).