Electronic – AVRDUDE with buring settings of AVR Studio

atmegaavravrdudefuses

I make my own electronic boards often with an Atmel ATmega328P. I used AVR Studio for programming. Now I tried to make the same settings with avrdude and it looks, that they are not really compatibale.

  1. Is there a way to set the programming speed in avrdude? I want to program my fuses with 2.1592kHz and program my firmware with 500kHz. Does anyone know a command?

  2. It seems that AVR Studio decodes the values for the fuses different than avrdude. Especially the efuse is different. I think these two are the same:

AVR Studio: efuse:0xFD, hfuse:0xDA, lfuse:0xFF

avrdude: efuse:w:0x05:m ­hfuse:w:0xDA:m ­ lfuse:w:0xFF:m
enter image description here

Thank you for your hints.

Felix

Best Answer

Is there a way to set the programming speed in avrdude? I want to program my fuses with 2.1592kHz and program my firmware with 500kHz. Does anyone know a command?

Use parameter -B <bitrate>: Specify the bit clock period for the JTAG interface or the ISP clock (JTAG ICE only). The value is a floating-point number in microseconds. The default value of the JTAG ICE results in about 1 microsecond bit clock period, suitable for target MCUs running at 4 MHz clock and above. Unlike certain parameters in the STK500, the JTAG ICE resets all its parameters to default values when the programming software signs off from the ICE, so for MCUs running at lower clock speeds, this parameter must be specified on the command-line. It can also be set in the configuration file by using the ’default_bitclock’ keyword.

It seems that AVR Studio decodes the values for the fuses different than avrdude. Especially the efuse is different.

Normally, the raw fuse byte values should be identical as those are just read out values and are not interpreted in any way. See the answer from microtherion for a possible explanation why the values are different in this case.