Skip to content
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

Burn bootloader to 32u4 fails #11907

Open
Smashcat opened this issue Aug 29, 2023 · 3 comments
Open

Burn bootloader to 32u4 fails #11907

Smashcat opened this issue Aug 29, 2023 · 3 comments
Labels
Architecture: AVR Applies only to the AVR microcontrollers (Uno, etc.) Component: Uploading Uploading programs to an Arduino board Type: Bug

Comments

@Smashcat
Copy link

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

@Smashcat
Copy link
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.

@per1234 per1234 added Type: Bug Component: Uploading Uploading programs to an Arduino board Architecture: AVR Applies only to the AVR microcontrollers (Uno, etc.) labels Dec 28, 2023
@VivekShahare04
Copy link

@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
Copy link
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.

@arduino arduino locked as too heated and limited conversation to collaborators Jul 12, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Architecture: AVR Applies only to the AVR microcontrollers (Uno, etc.) Component: Uploading Uploading programs to an Arduino board Type: Bug
Projects
None yet
Development

No branches or pull requests

3 participants