-
Notifications
You must be signed in to change notification settings - Fork 136
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
Alternative fix proposal for #1832 #1835
Conversation
Works like a charm! I wondered about the byte write, though (see below) Here my tests: Creating a test file for AVR64DU28
Writing test file to AVR64DU28 (incl bootrow)
Writing bootrow a second time
Reading bootrow
This has tested the paged r/w functions. Bytewise is not needed as AVRDUDE treats bootrow as paged memory. I don't know much about UPDI, and wondered how it implements bytewise write to flash-like memories. Seeing that this PR implements bytewise access, I temporarily forced AVRDUDE to use bytewise access by setting Change to force bytewise accessdiff --git a/src/avrdude.conf.in b/src/avrdude.conf.in
index 035dd141..aa186aaf 100644
--- a/src/avrdude.conf.in
+++ b/src/avrdude.conf.in
@@ -24398,9 +24398,9 @@ part parent "64dd28" # 64du28
memory "bootrow"
size = 256;
- page_size = 256;
+ page_size = 1;
offset = 0x1100;
- readsize = 256;
+ readsize = 1;
;
memory "userrow" Reading bootrow still works (but slower)
... but writing fails
Here trace.txt from
I am 100% OK with this PR because only paged access is needed for bootrow, but just (out of curiosity) wonder how bytewise write to flash works in UPDI. |
This is alternative fix for issue #1832, but this one works with multiple bootrow write operations. When possible (v0/v3/v5), it uses NVMCTRL CTRLA page erase/page write operation, and when not available (v2/v4) it performs explicit page erase operation before page write.