# How to set FUSES

**URL:** <https://forum.arduino.cc/t/how-to-set-fuses/1441270>\
**Category:** Nano Every\
**Created:** [April 23, 2026, 5:24pm UTC](https://forum.arduino.cc/t/how-to-set-fuses/1441270 "2026-04-23T17:24:30Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![stitech](https://dub1.discourse-cdn.com/arduino/user_avatar/forum.arduino.cc/stitech/32/1016377_2.png) [@stitech](https://forum.arduino.cc/u/stitech)\
**Post date:** [April 23, 2026, 5:24pm UTC](https://forum.arduino.cc/t/how-to-set-fuses/1441270/1 "2026-04-23T17:24:30Z")

</div>

I used avr/fuse.h as instruction manual:

```arduino

    If FUSE_MEMORY_SIZE > 3, there is a single field: byte, which is an array
    of unsigned char with the size of the array being FUSE_MEMORY_SIZE.
    ……

    If you are compiling in C++, you cannot use the designated intializers so
    you must do:

    \code
    #include <avr/io.h>

    FUSES = 
    {
        LFUSE_DEFAULT, // .low
        (FUSE_BOOTSZ0 & FUSE_BOOTSZ1 & FUSE_EESAVE & FUSE_SPIEN & FUSE_JTAGEN), // .high
        EFUSE_DEFAULT, // .extended
    };

    int main(void)
    {
        return 0;
    }
    \endcode

```

I tested it:

```cpp
// TestFuses.ino

FUSES = {
  0x00, // WDT: off
  0x04, // BOD: level 1.8V, active enabled
  0x01, // OSCCFG: no lock, 16MHz
  0x00, // reserved
  0x00, // reserved
  0xC9, // SYSCFG0: no CRC, pin = RESET, EESAVE
  0x00, // SYSCFG1: no SetUpTime
  0x00, // APPEND
  0x00, // BOOTEND
};

    int main(void)
    {
        return 0;
    }

```

It compiled just fine, but uploading failed:

```arduino
avrdude: jtagmkII_initialize(): Cannot locate "flash" and "boot" memories in description
avrdude: AVR device initialized and ready to accept instructions

Reading | ################################################## | 100% 0.15s

avrdude: Device signature = 0x1e9651 (probably m4809)
avrdude: erasing chip
avrdude: reading input file "C:\Users\xxxxx\AppData\Local\arduino\sketches\9A1467BDD7AD688E27928646F792363D/TestFuses.ino.hex"
avrdude: ERROR: address 0x820009 out of range at line 15 of C:\Users\xxxxx\AppData\Local\arduino\sketches\9A1467BDD7AD688E27928646F792363D/TestFuses.ino.hex
avrdude: read from file 'C:\Users\xxxxx\AppData\Local\arduino\sketches\9A1467BDD7AD688E27928646F792363D/TestFuses.ino.hex' failed

avrdude done. Thank you.

Failed uploading: uploading error: exit status 1

```

I can recognize the fuse-bytes in my disassembler:

 ![TestFuses](https://europe1.discourse-cdn.com/arduino/original/4X/a/9/3/a936166e6dc19e6c3db5eeeed094ca687e0383d9.png)

What did I do wrong?

---

<div class="post-metadata">

**Author:** ![time\_document\_3108](https://dub1.discourse-cdn.com/arduino/user_avatar/forum.arduino.cc/time_document_3108/32/1245996_2.png) [@time\_document\_3108](https://forum.arduino.cc/u/time_document_3108)\
**Post date:** [April 25, 2026, 6:27am UTC](https://forum.arduino.cc/t/how-to-set-fuses/1441270/2 "2026-04-25T06:27:18Z")

</div>

> [@ERROR: avrdude: jtagmkII\_initialize(): Cannot locate "flash" and "boot" memories in description](https://forum.arduino.cc/t/error-avrdude-jtagmkii-initialize-cannot-locate-flash-and-boot-memories-in-description/1193800):
>
> I'm new to this so I'm hoping it's just something dumb... I'm using IDE 2.2.1 and a Nano Every board and uploading code that compiled fine and when it's done uploading I get this: avrdude: jtagmkII\_initialize(): Cannot locate "flash" and "boot" memories in description Any guidance you could provide would be appreciated. Here's the code I'm uploading: #include "ServoEasing.hpp" ServoEasing servoTop; ServoEasing servoBottom; const int action\_pin = 2; int location = 31; // Below numbers should…

---

<div class="post-metadata">

**Author:** ![Doc\_Arduino](https://dub1.discourse-cdn.com/arduino/user_avatar/forum.arduino.cc/doc_arduino/32/215810_2.png) [@Doc\_Arduino](https://forum.arduino.cc/u/Doc_Arduino)\
**Post date:** [April 25, 2026, 8:37am UTC](https://forum.arduino.cc/t/how-to-set-fuses/1441270/3 "2026-04-25T08:37:28Z")

</div>

Hi,

Example:  
`avrdude -c jtag2updi -P com9 -p m4809 -U fuse5:w:0xC9:m`

Example read fuse:

```arduino
avrdude -c jtag2updi -P com9 -p m4809 -U fuse0:r:FUSE_0.txt:h
avrdude -c jtag2updi -P com9 -p m4809 -U fuse1:r:FUSE_1.txt:h
avrdude -c jtag2updi -P com9 -p m4809 -U fuse2:r:FUSE_2.txt:h
avrdude -c jtag2updi -P com9 -p m4809 -U fuse4:r:FUSE_4.txt:h
avrdude -c jtag2updi -P com9 -p m4809 -U fuse5:r:FUSE_5.txt:h
avrdude -c jtag2updi -P com9 -p m4809 -U fuse6:r:FUSE_6.txt:h
avrdude -c jtag2updi -P com9 -p m4809 -U fuse7:r:FUSE_7.txt:h
avrdude -c jtag2updi -P com9 -p m4809 -U fuse8:r:FUSE_8.txt:h
avrdude -c jtag2updi -P com9 -p m4809 -U lock:r:FUSE_LOCK.txt:h

```

---

<div class="post-metadata">

**Author:** ![stitech](https://dub1.discourse-cdn.com/arduino/user_avatar/forum.arduino.cc/stitech/32/1016377_2.png) [@stitech](https://forum.arduino.cc/u/stitech)\
**Post date:** [April 25, 2026, 1:38pm UTC](https://forum.arduino.cc/t/how-to-set-fuses/1441270/4 "2026-04-25T13:38:23Z")

</div>

It's not about "flash" and "boot", it's known, avrdude looks for these, but Nano Every doesn't need them, so they are not in the compiled program.

---

<div class="post-metadata">

**Author:** ![stitech](https://dub1.discourse-cdn.com/arduino/user_avatar/forum.arduino.cc/stitech/32/1016377_2.png) [@stitech](https://forum.arduino.cc/u/stitech)\
**Post date:** [April 25, 2026, 1:43pm UTC](https://forum.arduino.cc/t/how-to-set-fuses/1441270/5 "2026-04-25T13:43:12Z")

</div>

I can find something similar in my output:

```arduino
Sketch uses 194 bytes (0%) of program storage space. Maximum is 49152 bytes.
Global variables use 0 bytes (0%) of dynamic memory, leaving 6144 bytes for local variables. Maximum is 6144 bytes.
Performing 1200-bps touch reset on serial port COM4
"C:\Users\hanss\AppData\Local\Arduino15\packages\arduino\tools\avrdude\6.3.0-arduino17/bin/avrdude" "-CC:\Users\hanss\AppData\Local\Arduino15\packages\arduino\tools\avrdude\6.3.0-arduino17/etc/avrdude.conf" -v -V -patmega4809 -cjtag2updi -PCOM4 -b115200 -e -D "-Uflash:w:C:\Users\hanss\AppData\Local\arduino\sketches\9A1467BDD7AD688E27928646F792363D/TestFuses.ino.hex:i" "-Ufuse2:w:0x01:m" "-Ufuse5:w:0xC9:m" "-Ufuse8:w:0x00:m" {upload.extra_files}

```

But it's output. I apparently need something in the input that I don't know about yet.

---

<div class="post-metadata">

**Author:** ![Doc\_Arduino](https://dub1.discourse-cdn.com/arduino/user_avatar/forum.arduino.cc/doc_arduino/32/215810_2.png) [@Doc\_Arduino](https://forum.arduino.cc/u/Doc_Arduino)\
**Post date:** [April 25, 2026, 2:28pm UTC](https://forum.arduino.cc/t/how-to-set-fuses/1441270/6 "2026-04-25T14:28:44Z")

</div>

Hi,

See post 3 or your output.  
r ... read  
w ... write  
Please check the avrdude manual.

---

<div class="post-metadata">

**Author:** ![stitech](https://dub1.discourse-cdn.com/arduino/user_avatar/forum.arduino.cc/stitech/32/1016377_2.png) [@stitech](https://forum.arduino.cc/u/stitech)\
**Post date:** [April 25, 2026, 2:53pm UTC](https://forum.arduino.cc/t/how-to-set-fuses/1441270/7 "2026-04-25T14:53:05Z")

</div>

> [@Doc\_Arduino](#):
>
> Please check the avrdude manual.

I've got an Arduino Nano Every. I've got the Arduino IDE 2.3.8. I don't have an avrdude manual.

---

<div class="post-metadata">

**Author:** ![Doc\_Arduino](https://dub1.discourse-cdn.com/arduino/user_avatar/forum.arduino.cc/doc_arduino/32/215810_2.png) [@Doc\_Arduino](https://forum.arduino.cc/u/Doc_Arduino)\
**Post date:** [April 25, 2026, 3:19pm UTC](https://forum.arduino.cc/t/how-to-set-fuses/1441270/8 "2026-04-25T15:19:45Z")

</div>

Hi,

It would be nice if you took the initiative.  
[https://github.com/avrdudes/avrdude/](https://github.com/avrdudes/avrdude/)  
You can also find manuals for older versions.  
You can update avrdude within the IDE or save the latest version somewhere else.

---

<div class="post-metadata">

**Author:** ![stitech](https://dub1.discourse-cdn.com/arduino/user_avatar/forum.arduino.cc/stitech/32/1016377_2.png) [@stitech](https://forum.arduino.cc/u/stitech)\
**Post date:** [April 25, 2026, 3:44pm UTC](https://forum.arduino.cc/t/how-to-set-fuses/1441270/9 "2026-04-25T15:44:28Z")

</div>

To see it simple: I bought an original Arduino board. Arduino is supposed to support it. As for the fuses, Arduino offers support in the form of avr/fuses.h (#included automatically) probably thinking that it's sufficient.

The numbers for the fuses appear in the .ino.hex file, apparently the compiler processes them. The transfer of that file to the board is handled by the Arduino Integrated Development Environment, I should have no direct business with the third party that is invoked by the IDE, but that third party is where things go wrong.

Even then, the description in avr/fuses.h is clear. If that's not enough, something should be added.

Having said that, I will dive into the mentioned document, see what I can find.

---

<div class="post-metadata">

**Author:** ![Doc\_Arduino](https://dub1.discourse-cdn.com/arduino/user_avatar/forum.arduino.cc/doc_arduino/32/215810_2.png) [@Doc\_Arduino](https://forum.arduino.cc/u/Doc_Arduino)\
**Post date:** [April 25, 2026, 6:03pm UTC](https://forum.arduino.cc/t/how-to-set-fuses/1441270/10 "2026-04-25T18:03:36Z")

</div>

Hi,

Actually, that should be in the Boards.txt file. Make sure to create a backup first. To this day, I still don't know what fuses\_4809.bin does.

C:\Users\xyz\AppData\Local\Arduino15\packages\arduino\hardware\megaavr\1.8.8...

What exactly do you want to change in the fuses?

---

<div class="post-metadata">

**Author:** ![cattledog](https://dub1.discourse-cdn.com/arduino/user_avatar/forum.arduino.cc/cattledog/32/217816_2.png) [@cattledog](https://forum.arduino.cc/u/cattledog)\
**Post date:** [April 25, 2026, 6:17pm UTC](https://forum.arduino.cc/t/how-to-set-fuses/1441270/11 "2026-04-25T18:17:04Z")

</div>

Indeed the fuses are specified in the boards.txt file.

The Nano Every is best used with the [MegaCoreX](https://github.com/MCUdude/MegaCoreX) core file (available through the boards manager) and not the Arduino megaAVR core. It has more features and is better maintained.

There is good access to the fuse settings in the Tools menu. You don't need to work with boards.txt or get into avrdude.

---

<div class="post-metadata">

**Author:** ![stitech](https://dub1.discourse-cdn.com/arduino/user_avatar/forum.arduino.cc/stitech/32/1016377_2.png) [@stitech](https://forum.arduino.cc/u/stitech)\
**Post date:** [April 25, 2026, 6:53pm UTC](https://forum.arduino.cc/t/how-to-set-fuses/1441270/12 "2026-04-25T18:53:54Z")

</div>

Tried MegaCorex:

```cpp
// TestFuses_MegaCorex

FUSES = {
  0x00, // WDT: off
  0x04, // BOD: level 1.8V, active enabled (selected in Tools: 2.6V)
  0x01, // OSCCFG: no lock, 16MHz (selected in Tools: internal 16 MHz)
  0x00, // reserved
  0x00, // reserved
  0xC9, // SYSCFG0: no CRC, pin = RESET, EESAVE
  0x00, // SYSCFG1: no SetUpTime
  0x00, // APPEND
  0x00, // BOOTEND
};

int main(void) {
  CCP = CCP_IOREG_gc;
  CLKCTRL.MCLKCTRLB = 0;
  Serial.begin(9600);
  Serial.println("FUSES");
  register8_t* ptr = &FUSE.WDTCFG;
  for (uint8_t i = 0; i < 9; i++) { // 9 registers
    uint8_t reg = *(ptr + i);
    if (reg < 16) Serial.print("0x0");
    else Serial.print("0x");
    Serial.println(reg, HEX);
  }
  Serial.flush();
  return 0;
}

```

And this is what I got in Serial Monitor:

```arduino
FUSES
0x00
0x54
0x01
0xFF
0x00
0xC9
0x06
0x00
0x00

```

Apparently MegaCoreX sets the fuses to what's selected in Tools, and to some defaults, not what is given in the program.

---

<div class="post-metadata">

**Author:** ![stitech](https://dub1.discourse-cdn.com/arduino/user_avatar/forum.arduino.cc/stitech/32/1016377_2.png) [@stitech](https://forum.arduino.cc/u/stitech)\
**Post date:** [April 25, 2026, 7:02pm UTC](https://forum.arduino.cc/t/how-to-set-fuses/1441270/13 "2026-04-25T19:02:14Z")

</div>

This is in fuses\_4809.bin:

 ![fuses4809](https://europe1.discourse-cdn.com/arduino/original/4X/2/4/b/24bc49dd90eba014120483bc20ec627b09096039.png)

But I guess it's not what is used.

As to what I want: see post #1

Also in general: why can't I pick and choose the fuses I want? By the way: I do appreciate defaults usually.

---

<div class="post-metadata">

**Author:** ![Doc\_Arduino](https://dub1.discourse-cdn.com/arduino/user_avatar/forum.arduino.cc/doc_arduino/32/215810_2.png) [@Doc\_Arduino](https://forum.arduino.cc/u/Doc_Arduino)\
**Post date:** [April 25, 2026, 7:11pm UTC](https://forum.arduino.cc/t/how-to-set-fuses/1441270/14 "2026-04-25T19:11:01Z")

</div>

Hi,

I'm familiar with the content. However, I can't correctly map the values to any fuses. The only recognizable matches are 0x01, 0xFF, and 0x00. The rest is unclear to me.  
Why do you want to change the fuses?

---

<div class="post-metadata">

**Author:** ![cattledog](https://dub1.discourse-cdn.com/arduino/user_avatar/forum.arduino.cc/cattledog/32/217816_2.png) [@cattledog](https://forum.arduino.cc/u/cattledog)\
**Post date:** [April 25, 2026, 7:18pm UTC](https://forum.arduino.cc/t/how-to-set-fuses/1441270/15 "2026-04-25T19:18:21Z")

</div>

> Apparently MegaCoreX sets the fuses to what's selected in Tools, and to some defaults, not what is given in the program.

I think setting the fuses at runtime in code uses the \_PROTECTED\_WRITE macro because  
Fuse registers are protected by the **Configuration Change Protection (CCP)** mechanism. There needs to be a reset after the fuse change.

For example

```arduino
// Write fuse2 (OSCCFG) to select 16 MHz
_PROTECTED_WRITE(FUSE.OSCCFG, 0x01);
// trigger software reset
_PROTECTED_WRITE(RSTCTRL.SWRR, RSTCTRL_SWRE_bm); 

```

Claude AI tells me this with more detail

> #### Writing Fuses from C++
> 
> The fuse registers are accessible via the `FUSE` struct defined in the AVR headers:
> 
> ```arduino
> #include <avr/io.h>
> 
> // Write fuse2 (OSCCFG) to select 16 MHz
> _PROTECTED_WRITE(FUSE.OSCCFG, 0x01);
> 
> ```
> 
> The critical detail is `_PROTECTED_WRITE()`. Fuse registers are protected by the **Configuration Change Protection (CCP)** mechanism — you can't just assign to them directly. The macro handles the required timed write sequence: it writes the unlock signature `0xD8` to the `CCP` register, which opens a 4-cycle window during which the protected register can be written.
> 
> * * *
> 
> #### The Full FUSE Struct
> 
> The named members map directly to the hardware registers:
> 
> ```arduino
> FUSE.WDTCFG // fuse0 - watchdog
> FUSE.BODCFG // fuse1 - brown-out detector
> FUSE.OSCCFG // fuse2 - oscillator/clock
> FUSE.SYSCFG0 // fuse5 - UPDI pin, CRC, reset
> FUSE.SYSCFG1 // fuse6 - startup time
> FUSE.APPEND // fuse7 - app code end
> FUSE.BOOTEND // fuse8 - boot section end
> 
> ```
> 
> * * *
> 
> #### Important Caveats
> 
> **Changes take effect after reset.** Fuse writes don't take effect immediately — the new values are latched on the next power-on or reset. So writing `FUSE.OSCCFG` in your code and expecting the clock to change on the next line won't work. You'd need to trigger a software reset afterward:
> 
> ```arduino
> _PROTECTED_WRITE(FUSE.OSCCFG, 0x01);
> _PROTECTED_WRITE(RSTCTRL.SWRR, RSTCTRL_SWRE_bm); // trigger software reset
> 
> ```
> 
> **`SYSCFG0` (fuse5) is still dangerous.** The same warning applies as with avrdude — if you accidentally set the UPDI pin to GPIO mode from running code, you'll lock yourself out. Be very careful with this one.

---

<div class="post-metadata">

**Author:** ![david\_2018](https://dub1.discourse-cdn.com/arduino/user_avatar/forum.arduino.cc/david_2018/32/1013044_2.png) [@david\_2018](https://forum.arduino.cc/u/david_2018)\
**Post date:** [April 25, 2026, 7:32pm UTC](https://forum.arduino.cc/t/how-to-set-fuses/1441270/16 "2026-04-25T19:32:46Z")

</div>

The data sheet indicate that the fuses cannot be set via code:

> [@](#):
>
> 7.8 Fuses (FUSE)  
> Fuses hold the device configuration and are a part of the nonvolatile memory. The fuses are available from device power-up. The fuses can be read by the CPU or the UPDI, but can only be programmed or cleared by the UPDI. The configuration values stored in the fuses are copied to their respective target registers at the end of the start-up sequence

---

<div class="post-metadata">

**Author:** ![stitech](https://dub1.discourse-cdn.com/arduino/user_avatar/forum.arduino.cc/stitech/32/1016377_2.png) [@stitech](https://forum.arduino.cc/u/stitech)\
**Post date:** [April 25, 2026, 7:53pm UTC](https://forum.arduino.cc/t/how-to-set-fuses/1441270/17 "2026-04-25T19:53:27Z")

</div>

Fuses in the 4809 can't be set at runtime. Don't listen to AI.

 ![Fuses4809](https://europe1.discourse-cdn.com/arduino/original/4X/2/6/1/2618419ed9c9ce1c67c6c8b667a9406f1e24ea42.png)

---

<div class="post-metadata">

**Author:** ![stitech](https://dub1.discourse-cdn.com/arduino/user_avatar/forum.arduino.cc/stitech/32/1016377_2.png) [@stitech](https://forum.arduino.cc/u/stitech)\
**Post date:** [April 25, 2026, 8:32pm UTC](https://forum.arduino.cc/t/how-to-set-fuses/1441270/18 "2026-04-25T20:32:53Z")

</div>

I found something remarkable in TestFuses.ino.map: it states addresses for the memory sections.

 ![TestFuses.ino.map](https://europe1.discourse-cdn.com/arduino/original/4X/0/f/8/0f8337a42c6d913236763664521e26cb0917e9cc.jpeg)

I recognize fuse 0x00820000 as possibly something that ended up in the upload file.

 ![TestFuses1](https://europe1.discourse-cdn.com/arduino/original/4X/f/0/4/f04fa5ae2da07237c6243fd2503e5456e6e16637.png)

It narrows the location of the error somewhat down.

---

<div class="post-metadata">

**Author:** ![stitech](https://dub1.discourse-cdn.com/arduino/user_avatar/forum.arduino.cc/stitech/32/1016377_2.png) [@stitech](https://forum.arduino.cc/u/stitech)\
**Post date:** [April 25, 2026, 9:44pm UTC](https://forum.arduino.cc/t/how-to-set-fuses/1441270/19 "2026-04-25T21:44:57Z")

</div>

I skimmed through the avrdude document and I have some understanding of how it works. Now I have 2 ideas for a workaround:

. The line where the IDE calls avrdude has `{upload.extra_files}` at the end. Questions: Where to put those extra files? How to name them so they can be found? If the same fuse is assigned again, will NVMCTRL perform an `and` on them? (Or is this the next dead end?)

. Use the IDE to compile the program and upload outside the IDE. Questions: where do I find avrdude's commandline? Any interference from the Serial Monitor?

---

<div class="post-metadata">

**Author:** ![david\_2018](https://dub1.discourse-cdn.com/arduino/user_avatar/forum.arduino.cc/david_2018/32/1013044_2.png) [@david\_2018](https://forum.arduino.cc/u/david_2018)\
**Post date:** [April 25, 2026, 10:04pm UTC](https://forum.arduino.cc/t/how-to-set-fuses/1441270/20 "2026-04-25T22:04:01Z")

</div>

Which fuse settings are you wanted to change that are not available in the menus of MegaCoreX? Or are you trying to have different fuse settings for different sketches and don't want to have to manually select them each time?

[Next page](https://forum.arduino.cc/t/how-to-set-fuses/1441270.md?page=2)
