-
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
AVR128DB28 attempting change a fuse setting using (otherwise working) serialUPDI adapter (2/11/2022) #871
Comments
Have you cloned the upstream Avrdude repo recently? We have been doing some fuse related work lately (proper support for fuse name aliases). Can you make sure you have the latest upstream version, re-build and run the following command (with the -v flag)? I'd like to see the output of the table that's being generated.
|
MCUdude --- thank you for the quick reply! I obtained the executable from: https://github.com/mariusgreuel/avrdude/releases/tag/v7.0-rc1 When I encountered the problem, I opened the same issue at: however I was advised to move the issue here (so that version was closed and this version was open.) I'm not equipped to re-build from source at this point (I'm functioning as an end-user on Windows 10 64-bit), however, I'd be glad to test given access to a binary/installation. Here's a print with -v using 6.99 version (the version I obtained above about two days ago; it's current as of there as the last update was 9 days ago.) I modified your test command to try to write 0x20 to fuse (as writing 0x00 didn't produce an error, given that I had changed the fuse value using a borrowed programmer.) I'm an absolute beginner with github, so I am sorry if the formatting below is not ideal. If there's a better way to provide needed information, please let me know, I'll be glad to follow any instructions given.
|
Well, I only know how to build for macOS, so I can't help you there. But you don't have a binary that's built of the latest version. I don't own any AVR-DB hardware, but I can confirm that the upstream version works flawlessly with AVR-DAs. Can you try running the following command?
|
Thank you, MCUdude. I have verified that using the argument fuse8 works properly (I have changed the fuse from 0x20 to 0x00 and back to 0x20 and back to 0x00, each time inspecting memory location (using a simple program I wrote to read/write memory locations) 0x1058 where the fuse data is stored, and seeing it change. I then repeated the test using bootsize as the name, and each time I tried to change the value, I got the "verification error; content mismatch" problem. I'm happy to do further testing, but I can confirm version 6.99 works properly provided I use the fuse8 identifier rather than bootsize. |
@wb0gaz You may want to try the latest CI builds from here: https://github.com/avrdudes/avrdude/wiki/Getting-Nightly-Builds-for-AVRDUDE, these are a little newer than the build I did. |
Great to heat |
Thanks mariusgreuel! I was not aware of nightly builds (I am still total beginner at Github world). I now see how to reach those versions. As there is not an operational problem now (using "fuse8" tag), I will be happy to test if that would help, otherwise I will wait for your next release version and proceed with that. Thanks again! Dave (should I now use the "close" option?) |
I suggest we wait until someone has tested that it actually works on AVR-DB hardware with a SerialUPDI programmer |
I've got a Curiosity Nano board with an AVR128DB48. Modifying |
I could test it with my breakout board for AVR128DB64 if you guys tell me exactly what I'm supposed to test - like the exact procedure. |
Does this work?
|
Sure, I will look into it tonight.
|
Confirmed to work correctly:
|
Thanks for testing @dbuchwald! |
SerialUPDI adapter was built using FTDI232 module and is working properly to read flash memory, write flash memory, and read fuse value with target AVR128DB28 (supply voltage 3.6VDC from USB serial adapter.)
Issue: Writing/changing fuse value (in this case, BOOTSIZE fuse at 0x1058 per avrdude.conf is to be changed from factory default value of 0x20 to user-specified value of 0x00) fails to verify (and does not change value when subsequently read on a different UPDI adapter device type.)
Command:
>avrdude -c serialupdi -p avr128db28 -P com7 -U bootsize:w:0x00:m
Response:
avrdude: UPDI link initialization OK
avrdude: NVM type 2: 24-bit, word oriented write
avrdude: Entering NVM programming mode
avrdude: AVR device initialized and ready to accept instructions
Reading | ################################################## | 100% 0.05s
avrdude: Device signature = 0x1e970e (probably avr128db28)
avrdude: reading input file "0x00"
avrdude: writing bootsize (1 bytes):
Writing | ################################################## | 100% 0.03s
avrdude: 1 bytes of bootsize written
avrdude: verifying bootsize memory against 0x00:
Reading | ################################################## | 100% 0.01s
avrdude: verification error, first mismatch at byte 0x0000
0x20 != 0x00
avrdude: verification error; content mismatch
avrdude: safemode: Fuses OK (E:FF, H:FF, L:FF)
avrdude: Leaving NVM programming mode
avrdude done. Thank you.
The text was updated successfully, but these errors were encountered: