Go Down

Topic: Difference between 0xDE and 0x:D6 (high fuses) (Read 1 time) previous topic - next topic

dmjlambert

Google it.  0xFD is the same as 0x05 because only the bottom three bits are used.
Different versions of avrdude handle the high order bits differently. 
I recommend always answer n to any change it back question avrdude asks.

PizzaGuy

Thanks for replying,

I researched a bit and I encountered this website: "http://www.xuan-wu.com/2012-11-19-Arudino-Uno-Bootloader". There, it uses another Arduino as ISP and uses the command:
 
Code: [Select]
gdb -args avrdude -P COM_PORT -b 19200 -c stk500v1 -p m328p -v -e -U efuse:w:0x05:m -U hfuse:w:0xD6:m -U lfuse:w:0xFF:m


My question is: How do I modify this command so I can use my USBtiny programmer? Thanks

dmjlambert

Comparing that with the command line you used before, the -c option on the command line is for which programmer you are using.   Notice the -U options on the end of the line.  You can add those on the end of the command you used before.  For example, add  -U hfuse:w:0xD6:m to set the high fuse in addition to the ext fuse.  -e does a chip erase.  Use ext fuse value FD instead of 05 to keep from getting that error you got last time. 
Online fuse calculators are interesting and handy.  Like this one
http://www.engbedded.com/fusecalc

PizzaGuy

#18
Nov 07, 2016, 06:27 pm Last Edit: Nov 07, 2016, 06:34 pm by PizzaGuy
I tried changed the Extended to FD as you said successfully. The program worked exactly the same way as before: only the first line of text was displayed. Then I tried to burn the bootloader via the Arduino IDE. That worked just fine, but the program still only displays the first line. Now I will try to reset the Arduino to factory settings with this guide:
https://github.com/leocadiotine/Dvorany/wiki/Resetting-your-Uno-R3's-default-firmware
The annoying part is that I don't get any error that I can search on google...
Edit: I don't think the link I found is appropriate

I will let you know what happens.



PizzaGuy

Update:

I re-uploaded for another time the code and I finally got an error(being happy because of an error feels weird)

So the error is:

Code: [Select]

avrdude: stk500_paged_write(): (a) protocol error, expect=0x14, resp=0x10
avrdude: stk500_cmd(): programmer is out of sync
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_recv(): programmer is not responding
avrdude: ser_recv(): read error: Device not configured
avrdude: stk500_recv(): programmer is not responding
...
//text repeating hundreds of times
...
avrdude: ser_recv(): read error: Device not configured
avrdude: stk500_recv(): programmer is not responding
avr_read(): error reading address 0x0000
    read operation not supported for memory "flash"
avrdude: failed to read all of flash memory, rc=-2
avrdude: ser_send(): write error: Device not configured
avrdude: ser_recv(): read error: Device not configured
avrdude: stk500_recv(): programmer is not responding
ioctl("TIOCMGET"): Device not configured
avrdude: ser_close(): can't reset attributes for device: Device not configured


From the line "read operation not supported for memory "flash"" I assume that there is something wrong with the flash memory.
The article that I found previously(http://www.xuan-wu.com/2012-11-19-Arudino-Uno-Bootloader) talks about this errors, so I will try to do the steps prescribed there.

Thank you immensely for all your help and time
I will keep you updated

PizzaGuy

I am glad to announce that it finally worked!

I changed many things such as uploading via the programmer or straight from the USB. When it first worked I wasn't quite sure why it did. It turns out that the problem was in the code. The difference I made was writing
Code: [Select]
Serial.begin(9600); at the setup function. I uploaded the program via the programmer and not straight from the USB. Otherwise, it doesn't work. I still have no idea why it works, but I am glad it does.

Thanks again for your help.
 Here is a karma point that you deserve!

Go Up