logic diagram for HV programming mode?

Go To Last Post
8 posts / 0 new
Author
Message
#1
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

I want to make some improvements to my HVSP fuse resetter, and am trying to figure out the logic of how the modern (with enhanced POR) tinies enter HV programming mode.  Ideally, I'd like to see a logic diagram similar to what the datasheets have for the reset logic and IO pins.

 

From the work I did on my fuse resetter, and reading datasheets many times over, my current theory is that the logic is something like this:

RST12V & !(PE[0]|PE[1]|PE[2]) & INTERNAL_RESET

With RST12V being the output of a comparator for 12V on the reset pin, PE being the Prog_enable pins, and INTERNAL_RESET being the output of the flipflop in the datasheet "Reset Logic" diagram.

 

Some questions/suspicions I have are that the circuit may latch the Prog_enable pins before 12V is present on the reset pin.  Both algorithms listed in the datasheet say 'Set Prog_enable pins to "000"' before applying power to Vcc.  Now that could be a red herring, and maybe they only need to be set to 000 when 12V is applied to reset.

 

It also seems to be possible to enter HV programming mode after startup.  I'd like to know if this is due to random glitches or perhaps a deterministic but undocumented sequence.  It was reported in the following thread, but not fully described and debugged.

https://www.avrfreaks.net/forum/...

There's also the vague reports of problems with the Arduino auto-reset circuit causing the chip to go into HV programming mode.

https://forum.arduino.cc/index.p...

 

I also suspect there may be differences in the HV programming enable circuit in the t13a and the t85, despite the algorithm in the datasheet being identical.

http://nerdralph.blogspot.com/20...

It's still possible they enter HV programming the same way, but differences in clock rate and start-up impact HV programming mode in ways that are not clearly documented.

 

Has anyone seen any kind of document or engineering note from Atmel that provides more detail than the datasheet on programming mode?  Or maybe someone has done more thorough testing than I have so far?

 

 

I have no special talents.  I am only passionately curious. - Albert Einstein

 

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

ralphd wrote:
Ideally, I'd like to see a logic diagram similar to what the datasheets have for the reset logic and IO pins.
Less ideal are reference implementations of HVSP.

  • STK500
  • AVR Dragon
  • Power Debugger

STK500 has schematics and is in-stock.

AVR Dragon is mature and stock may be moving to NRND/EOL distributors.

Power Debugger is on-sale this month.

At least Windows XP for STK500 and AVR Dragon.

ralphd wrote:
There's also the vague reports of problems with the Arduino auto-reset circuit causing the chip to go into HV programming mode.
A PIC VPP issue in MPLAB PICkit 4 is solved by decreasing the slew rate (increasing RC)

The HVSP reset threshold may be 2*VCC (less?); overshoot is common with strong drivers sourcing or sinking current into capacitors.

 


STK500

High Voltage Programming - - STK500

AVR Dragon

https://octopart.com/search?q=ATAAVRDRAGON&currency=USD&specs=0

Power Debugger

ETN #37 MPLAB® PICkit 4 VPP Overshoot Modification

 

"Dare to be naïve." - Buckminster Fuller

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

ralphd wrote:
Or maybe someone has done more thorough testing than I have so far?
Brad for tiny85 :

High Voltage Programming Protocol Question | AVR Freaks

 

"Dare to be naïve." - Buckminster Fuller

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

ralphd wrote:
am trying to figure out the logic of how the modern (with enhanced POR) tinies enter HV programming mode.

Are you referring to the new AVR 0/1 series?  i.e. the x-tiny's?

 

Jim

 

 

 

 

 

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Just a guess, maybe it uses a Zener breakdown to cause the signal that enables the HV mode. My understanding is that a stable Zener voltage from a CMOS process is not an easy thing.

 

If that is the case, then you need to allow the trigger level to move around in your design. If I recall, the Uno lacks a clamping diode, but the Mega has one. It might be possible that one day they could find Uno's going into HV mode rather than running the bootloader. (NOTE: I am not looking at the schematics, and my memory is not perfect, so treat the statement as philosophical.)

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

ron_sutherland wrote:
(NOTE: I am not looking at the schematics, and my memory is not perfect, so treat the statement as philosophical.)
I join you in imperfect memory (had to look at the schematic)

arduino_Uno_Rev3-02-TH.sch (reset is mid-page, clamping diode)

via Arduino Uno Rev3 | Arduino Official Store (documentation tab)

 

"Dare to be naïve." - Buckminster Fuller

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

gchapman wrote:

ralphd wrote:
Or maybe someone has done more thorough testing than I have so far?
Brad for tiny85 :

High Voltage Programming Protocol Question | AVR Freaks

 

I included a link to that thread in my original post, when I said, " It also seems to be possible to enter HV programming mode after startup.  I'd like to know if this is due to random glitches or perhaps a deterministic but undocumented sequence.  It was reported in the following thread, but not fully described and debugged."

 

I have no special talents.  I am only passionately curious. - Albert Einstein

 

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

ki0bk wrote:

ralphd wrote:
am trying to figure out the logic of how the modern (with enhanced POR) tinies enter HV programming mode.

Are you referring to the new AVR 0/1 series?  i.e. the x-tiny's?

 

Jim

 

No.  I'm talking about the t13a, tx5, tx4a.

 

edit: the reason I mentioned enhanced POR is because the the datasheets for older AVRs without enhanced POR state that 12V can be applied simultaneously to VCC, while the ones with enhanced POR do not.

"Apply 4.5 - 5.5V between V CC and GND simultaneously as 11.5 - 12.5V is applied to RESET."

 

I have no special talents.  I am only passionately curious. - Albert Einstein

 

Last Edited: Wed. Jan 22, 2020 - 03:27 AM