Dlloydev / jtag2updi

HV UPDI / UPDI programmer software for Arduino (targets Tiny AVR-0/1/2, Mega AVR-0 and AVR-DA/DB MCUs)
MIT License
27 stars 8 forks source link

Burn bootloader #10

Closed iansexton closed 3 years ago

iansexton commented 3 years ago

Hi I have one of your programmers and I'm struggling to make it burn bootloaders. It fails & then refuses to communicate at all with the chip. I've tried it with 412s & 1614s & the failure is consistent. My 'textbook' low voltage UPDI programmer fixes the chips (and also burns bootloaders reliably) Any thoughts?

EDIT Seems to be a problem only in HV mode. Does that make sense to you? It's less of an issue now but removing/shifting the red jumper is a PITA if I just want to (eg) change clock speed to a rate that needs a bootloader load.

Dlloydev commented 3 years ago

What version of megaTinyCore are you using? What mode of the UPDI pin (PA0) are you using ... Reset or GPIO?

It seems like you're configuring PA0 as Reset because the programmer is set to HV Mode and not PCHV Mode. With the programmer in HV mode, it will only apply the 12V pulse when the programmer and target is just powered up. Any new fuse settings that you will not take effect unless you manually power-cycle. For using HV Mode, I suggest using the 5V power pin from the 6-pin header because the PORTC output (T5V) is not needed and is only about 4.7V with lower current capacity. With this wiring configuration (5V pin), you can also use PCHV Mode and the 12V pulse sequence will also be applied prior to each programming session.

Note that with some MCUs, it may take a second programming attempt for success ... does a second attempt work?

Yeah, the mode jumper is difficult to reach ... I wonder if the long flexible tab jumpers would be easier. While experimenting, I just used a short F/F jumper wire to select different modes.

iansexton commented 3 years ago

Hi David Having read your message I went to check everything again. I'd previously been using PCHV mode, so I tried HV mode & it worked fine, so did the PCHV mode!!! My laptop had been rebooted so presumably something was wrong at that end rather than the programmer? Most odd :( Shifting the jumper isn't really an issue now that it works but a long jumper is a good idea. I like your programmer! Ian