Skip to content

Burn bootloader to 32u4 fails #11907

Open
@Smashcat

Description

@Smashcat

This has been an issue for a few years now. The Arduino IDE (currently using 2.2.0) cannot burn the bootloader to this chip as it attempts to set the high fuse bits, which cannot be done. Unsure why this still isn't fixed. Typical error message:

avrdude: WARNING: invalid value for unused bits in fuse "lock", should be set to 1 according to datasheet
This behaviour is deprecated and will result in an error in future version
You probably want to use 0xff instead of 0x3f (double check with your datasheet first).
avrdude: verification error, first mismatch at byte 0x0000
0xf3 != 0xcb
avrdude: verification error; content mismatch
Failed chip erase: uploading error: exit status 1

Activity

Smashcat

Smashcat commented on Aug 29, 2023

@Smashcat
Author

This is using an ATMEL ICE programmer to a 32u4 on a custom board. The chip can be programmed/tested using the Microchip Studio IDE, and it does appear as a USB device also, so that part is working.

VivekShahare04

VivekShahare04 commented on Jul 10, 2024

@VivekShahare04

@Smashcat
Verify the Fuse Settings
Double-check the fuse settings for your specific microcontroller. You can use the Engbedded Fuse Calculator to find the correct fuse values.

If the Arduino IDE is not setting the fuses correctly, you can try using AVRDude directly from the command line to set the fuses manually. This allows more control over the process. The command might look something like this:
arduino documentation suggested command line:
avrdude -c <programmer> -p <mcu> -U lfuse:w:<value>:m -U hfuse:w:<value>:m -U efuse:w:<value>:m

if issue solve please let me know

Smashcat

Smashcat commented on Jul 10, 2024

@Smashcat
Author

Thanks, I think the issue is that the 32u4 chips are delivered to me with fuse settings that are corrupted, and AVRDude cannot set them properly. I just buy chips pre-programmed now instead, as it's impossible to set the fuse bits reliably on them. AVRDude still has the bug, trying to set the high bits from Arduino though.

locked as too heated and limited conversation to collaborators on Jul 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

      Development

      No branches or pull requests

        Participants

        @Smashcat@per1234@VivekShahare04

        Issue actions

          Burn bootloader to 32u4 fails · Issue #11907 · arduino/Arduino