-
-
Notifications
You must be signed in to change notification settings - Fork 7k
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
Set unused bits of extended fuse to 1 #5182
Conversation
Avrdude has changed the way it handle unused bits in the extended fuse for atmega 328 and atmega 168, they are now at 1 instead of 0. See http://svn.savannah.nongnu.org/viewvc?view=rev&root=avrdude&revision=1335 for more info. This causes avrdude to fail when one try to write the fuse with the unused bits at 0, because the value it read back is not the same than the one it tried to write. This commit fixes the fuse value for all boards that use atmega328 or 168.
Just a clarification, I tested with Tools > Programmer > Arduino as ISP, which is an Arduino running the ArduinoISP sketch. I didn't test with Tools > Programmer > ArduinoISP because I don't own that programmer. |
Forgot to fix ethernet board in previous commit
Yes, thanks, it's fixed. |
I successfully tested Burn Bootloader on all ATmega168 based boards in this boards.txt using USBasp, Arduino as ISP, USBtinyISP, and Atmel AVRISP mkII(with arduino/avrdude-build-script#2 applied). |
This looks like a good change to me. I think it would be good if a second person would verify the new settings against the datasheet, to prevent accidental changes. And of course testing, I think @facchinm was planning to do some testing as well. |
@descampsa But sooner or later we'll surely merge it 😄 |
@facchinm, huh? but a core / platform specifies what versions of the tool it needs in the JSON? Or did I misunderstand something here? |
Yes, but only in the json, so fetching the core manually will leverage on installed tools (or latest tools if the IDE is > 1.6.10 but this is a corner case) |
You mean when someone manually copies the arduino/avr directory out of git? That doesn't sound like a usecase we need to support? |
There were a couple of other cases which I can't remember right now, but I'm not saying we shouldn't merge this patch,I would only give give people some time to update their tools 😄 |
Avrdude has changed the way it handle unused bits in the extended fuse for atmega 328 and atmega 168, they are now at 1 instead of 0.
See http://svn.savannah.nongnu.org/viewvc?view=rev&root=avrdude&revision=1335 for more info.
This causes avrdude to fail when one try to write the fuse with the unused bits at 0, because the value it read back is not the same than the one it tried to write. This commit fixes the fuse value for all boards that use atmega328 or 168.
See also issue #5175
I only tested that fix with a usbasp programmer on arduino uno, it would probably be good that someone test it with other programmer/board (especially one atmega168) to be sure.
Update: According to the discussion in #5175 , the patch indeed fix the problem for Atmega328 with usbasp, USBtinyISP and ArduinoISP.
A separate but related issue appears with AVRISP mkII programmer, but this issue can't be easily fixed in Arduino code alone, avrdude.conf has to be changed.