token-vesting icon indicating copy to clipboard operation
token-vesting copied to clipboard

ATtiny3216 Hardware RESET

Open PM04290 opened this issue 1 year ago • 3 comments

As described in datasheet of ATTiny3216, it is possible to make hardware reset with low voltage, but configuration must be enabled by fuse. On menu UDPI, i have only "No Reset" or "reset enabled for Serie 2"

How to enable hardware reset on ~Reset/UDPI pin ?

PM04290 avatar Jul 10 '24 09:07 PM04290

Find the "boards.txt" file from MegatinyCore and search for the word "expert". Then you will see that you can uncomment the 'expert mode' features. Make sure you realize that you will need a HV programmer to ever set the UPDI pin back to UPDI. That is why by default these options are commented out.

image

hmeijdam avatar Jul 10 '24 15:07 hmeijdam

@hmeijdam , thanks for solution... but for HV programmer i must learn to it; actually i use simple Nano with jtag2udpi firmware... I suppose it is not an HV programmer

PM04290 avatar Jul 10 '24 15:07 PM04290

No, but you can make that into a HV programmer

hmeijdam avatar Jul 10 '24 15:07 hmeijdam

Note that jtag2updi is deprecated, and I explicitly refuse to provide support, on the demonstrated grounds that I am incompetent to do so. Even after months of work jtag2updi chokes and breaks constantly for no apparent reason and people kept asking me questions and all I could say is "Yeah I dunno, I tried for 2 montjs to figure out what was going on, burned out so hard I had to take 2 months off modern AVRs" , Once serialUPDI was faster two, I dropped jtag2updi like a radioactive potatoe.

My attempts at making a HV UPDI programmer have hardware ready to go but not a line of code written for them so they''re useless.

SpenceKonde avatar Dec 20 '24 00:12 SpenceKonde

My attempts at making a HV UPDI programmer have hardware ready to go

Does that hardware include supporting a powercycle-HV (PC-HV) programming sequence?

hmeijdam avatar Dec 20 '24 09:12 hmeijdam

Well, actually now that I think about it, none of them are any good anymore anyway because the absolute max on anything other than a tinyAVR that has HV UPDI is 9V, minimum needed to trigger 2V above Vdd, typ 7.5v, not min 10, typ 12 abs max 13 of modern tinyAVRs.

Do your HV programmers account for that?

So I had designs that I belived would work for programming, until I read that line in the updated datasheet (added years after the first relevant hardware was released. I don't have a good way to make 7.5V. Not a single-chip-inductor-free way like getting 12v from 5v (max662 clones are cheap and do it with afew caps. Low current, but that's no problem. I now suspect theirprogrammers that generate the HV pulse are likely using the capacitortrick like DTR reset does, only in the opposite direction, to get the pulse.

SpenceKonde avatar May 25 '25 04:05 SpenceKonde

I gave up on using the Reset pin, I do this directly with the power supply.

PM04290 avatar May 25 '25 04:05 PM04290

Do your HV programmers account for that?

No, but I would probably add a 2 or 3 leds in series, (depending on their forward voltage) to get about 7,5V from my 12V source. Then a manual button to shortcut the leds for still getting the 12V for a tinyAVR.

hmeijdam avatar May 25 '25 07:05 hmeijdam

How much you wanna bet that the way Microchip does it in their programmers involves 1 diode and 2 capacitors? (and possibly no support for tinyAVR)

SpenceKonde avatar May 27 '25 01:05 SpenceKonde