How to program - after - burning bootloader? #438
-
Hi there, I'm trying to program an ATtiny1614 using serial port like an arduino UNO/NANO. I have an breadboard setup with an arduino UNO configured as jtag2updi. I have two different USB->serial adapters. One FTDI based, the other is of a CH340 type. The tiny1614 is soldered on an adapterboard and placed in the breadboard. I can succesfully upload a test-sketch to the ATtiny1614 which outputs "Hello world!" at 9600baud on the serial monitor.
I am aware that the bootloader is only active at the first 8 seconds after startup. I fully remove the Attiny1614 from breadboard and re-seat after arduino software starts programming. What am I missing? |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 2 replies
-
Select the Optiboot definition when you burn the bootloader. Otherwise you set the fuses and remove any bootloader currently installed. Burn bootloader sets ALL fuses, even the ones that say burn bootloader required (these are the ones that, if set wrong, could potentially softbrick it, the equivalent of disabling reset on classic parts), and even the ones that the core does not have anything to do with, in order to initialize the chip to a known state. It then also writes the bootloader if you have a bootloader-using board definition selected. (normal UIPDI uploads will set the "harmless" fuses with every upload, allowing UPDI sketch upload to write over bootloader instead of uploading and veriftying successfully, (hence trashing the bootloader) but not running either because the fuses put the interrupt vectors 512 bytes away from where they are - (a failure mode that looks incredibly bizarre and perplexing), and applies the base clock speed setting, and I think something useless but safe, maybe startup time?)_ |
Beta Was this translation helpful? Give feedback.
-
Hi, I am trying latest arduino with latest megaTinyCore with ATtiny1626 and ATtiny3226, both are UPDI-programmable well with schottky and 470ohm (cytron CH340 adapter), even after initial several minutes of reverse polarity and probably smoke on both )), but when I try to select Optiboot version of board and burn the bootloader with (or without) support of DTR autoreset circuit (all placed on breadboard below), the default blink sketch (tested with UPDI) is not flashed it seems. I also initially had problem with COM1 port forced by avrdude.conf, uploading sketch doesnt take selected boarrd COM port, so I patched the global default in conf to my COM10 and then something started to happen - after few tests with 8sec optiboot without DTR (and no success), I tried also the autoreset, now I dont need to power toggle the board but detailed output of uploading lists this only: avrdude: Version 6.3-20201216
avrdude: AVR device initialized and ready to accept instructions Reading | ################################################## | 100% 0.00s avrdude: Device signature = 0x1e9429 (probably t1626) avrdude done. Thank you. |
Beta Was this translation helpful? Give feedback.
Select the Optiboot definition when you burn the bootloader. Otherwise you set the fuses and remove any bootloader currently installed.
Burn bootloader sets ALL fuses, even the ones that say burn bootloader required (these are the ones that, if set wrong, could potentially softbrick it, the equivalent of disabling reset on classic parts), and even the ones that the core does not have anything to do with, in order to initialize the chip to a known state. It then also writes the bootloader if you have a bootloader-using board definition selected.
(normal UIPDI uploads will set the "harmless" fuses with every upload, allowing UPDI sketch upload to write over bootloader instead of uploading a…