ATTinyCore
ATTinyCore copied to clipboard
V2.0.0 wrong fuse setting when "burn bootloader" for Attiny2313
After being confused for an hour why my sketch was running at the wrong speed I discovered that on my installation of V2.0.0 I am getting wrong fuse settings when using burn bootloader.
When selecting "8MHz internal" I am getting LFuse 0xE2 , HFuse 0xD7 and EFuse 0xFE. This looks wrong to me (4MHz and a lot of other wrongs)
When selecting the same "8MHz internal" on my boardsmanager installation of ATTinycore I get LFuse 0xE4 , HFuse 0x9F and EFuse 0xFF. That seems OK to me.
I stopped testing other options, because if the HFuse 0xD7 would have been a 0xD6 my reset pin would have been disabled and then I need to hook up a HV programmer first.
~~Maybe worth to notice but if I select an ATTiny85 and do "burn bootloader" for 8 or 12 MHz (internal tuned) I am getting the exact same fuse settings in the ATTiny85: LFuse 0xE2 , HFuse 0xD7 and EFuse 0xFE~~
~~So now I wonder; do I have some corrupted file just on my PC, or can someone test if he get's the same result?~~ [edit] I checked the boards.txt in Github development branch and I have the same. So no corrupted file on my PC.
I looked in both boards.txt files and can find where the difference is coming from.
AT2313 Boards.txt in github version V2.0.0
################################
# Clocking menu options #
################################
attinyx313.menu.clock.internal_8m=8 MHz (internal)
attinyx313.menu.clock.internal_8m.bootloader.low_fuses=0xE2
attinyx313.menu.clock.internal_8m.build.f_cpu=8000000UL
attinyx313.menu.clock.internal_8m.build.speed=8m
attinyx313.menu.clock.internal_8m.build.clocksource=0
attinyx313.menu.clock.internal_1m=1 MHz (internal)
attinyx313.menu.clock.internal_1m.bootloader.low_fuses=0x62
attinyx313.menu.clock.internal_1m.build.f_cpu=1000000UL
attinyx313.menu.clock.internal_1m.build.speed=1m
attinyx313.menu.clock.internal_1m.build.clocksource=0x10
attinyx313.menu.clock.internal_4m=4 MHz (internal)
attinyx313.menu.clock.internal_4m.bootloader.low_fuses=0x62
attinyx313.menu.clock.internal_4m.build.f_cpu=4000000UL
attinyx313.menu.clock.internal_4m.build.speed=4m
attinyx313.menu.clock.internal_4m.build.clocksource=0x10
attinyx313.menu.clock.internal_4m.bootloader.f_cpu=1000000UL
attinyx313.menu.clock.internal_2m=2 MHz (internal)
attinyx313.menu.clock.internal_2m.bootloader.low_fuses=0x62
attinyx313.menu.clock.internal_2m.build.f_cpu=2000000UL
attinyx313.menu.clock.internal_2m.build.speed=2m
attinyx313.menu.clock.internal_2m.build.clocksource=0x10
boards.txt from boardsmanager version of ATTinycore
attinyx313.name=ATtiny2313(a)/4313 (No bootloader)
attinyx313.upload.maximum_size=4096
attinyx313.upload.maximum_data_size=256
attinyx313.upload.tool=avrdude
attinyx313.bootloader.tool=avrdude
attinyx313.bootloader.unlock_bits=0xFF
attinyx313.bootloader.lock_bits=0xFF
attinyx313.bootloader.file=empty/empty_all.hex
attinyx313.build.core=tiny
attinyx313.build.board=AVR_ATTINYX313
attinyx313.build.export_merged_output=false
attinyx313.bootloader.extended_fuses=0xFF
attinyx313.menu.LTO.enable=Enabled
attinyx313.menu.LTO.enable.ltocflags=-flto -fno-fat-lto-objects
attinyx313.menu.LTO.enable.ltoelfflags=-g -flto -fuse-linker-plugin
attinyx313.menu.LTO.enable.ltocppflags=-flto
attinyx313.menu.LTO.enable.ltoarcmd=gcc-
attinyx313.menu.LTO.disable=Disabled
attinyx313.menu.LTO.disable.ltocflags=
attinyx313.menu.LTO.disable.ltoelfflags=
attinyx313.menu.LTO.disable.ltocppflags=
attinyx313.menu.LTO.disable.ltoarcmd=
attinyx313.menu.chip.4313=ATtiny4313
attinyx313.menu.chip.4313.build.mcu=attiny4313
attinyx313.menu.chip.4313.upload.maximum_size=4096
attinyx313.menu.chip.4313.upload.maximum_data_size=256
attinyx313.menu.chip.2313=ATtiny2313/ATtiny2313A
attinyx313.menu.chip.2313.build.mcu=attiny2313a
attinyx313.menu.chip.2313.upload.maximum_size=2048
attinyx313.menu.chip.2313.upload.maximum_data_size=128
attinyx313.menu.clock.8internal=8 MHz (internal)
attinyx313.menu.clock.8internal.bootloader.low_fuses=0xE4
attinyx313.menu.clock.8internal.build.f_cpu=8000000L
attinyx313.menu.clock.8internal.build.clocksource=0
I suspect the 828, 2313 and 4313 are the ones that do not have 0xE2 as LFuse when clocking them at 8MHz internal. So maybe these old farts are different from the rest?
Thanks!
Actually the 828 does have E2 as low fuse, depending on how you count the reserved bits. They don't seem to make a difference.
Found the issues with the boards.txt build script - I had to give it a whole second set of internal speeds for the x313. My apologies for the fate of the boards that got reset disabled. Hadn't realized the HFuse had weird layout on the x313s
Ok. When you push the new boards.txt file to the development branch I will test again to confirm it's working.
HAs long since been addressed