I'm finally going to see what I can do with UPDI

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

One thing right off that bat that is odd is:

 

ICE pdf:  01=UPDI

Datasheet from AT1614 shows 01=RESET !!!!

 

It shows default fuse is 01 - why call it Reset instead of Default Value?

 

 

Q#1 - which is 01?  UPDI or RESET?  I am guessing UPDI but will play with it later tonight to find out.

 

Q#2 - if you don't need a physical RESET pin feature, doesn't it make sense to leave it UPDI all the time?  What would be the downside?

 

Q#3 - Is there an AVR042 type document recommending a pullup, capacitor, or reverse biased protection diode?  If not, are these recommended/necessary/or will prevent programming?

Last Edited: Thu. Jun 14, 2018 - 08:13 PM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

alank2 wrote:
Q#3 - Is there an AVR042 type document recommending a pullup, capacitor, or reverse biased protection diode?
Yes

Microchip Technology Inc

Microchip Technology

Application Notes

AN2519 AVR Microcontroller Hardware Design Considerations

http://www.microchip.com//wwwAppNotes/AppNotes.aspx?appnote=en591472

PDF, page 7, Figure 3-1. Recommended Reset Pin Connection

page 12, 4.5 UPDI Interface

via https://www.microchip.com/wwwproducts/en/ATTINY1617

 

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

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

So far so good.  I've got a tiny1614 soldered onto a dip adapter and connected to a 2x3 header.  Works great with the ICE, made a small program to blink a LED at 1 Hz.

 

Just now digging into the UPDI datasheet chapter.

 

One question I have so far is:  Let's say someone configures the fuse so that it disables UPDI and is in RESET mode for that pin.  The question is, is a 12V pulse without any init going to enable the UPDI functionality on that pin?  Or does it need to be a 12V pulse plus a proper init cycle?

 

2nd question - one of the things my programmer does is that if any fuses change, it releases control from the device to let the changes fuses become active before it tries to access the device for programming.  Not sure if this functionality will change or not just yet, but if I stay connected with UPDI and just take the device out of reset, will that make the fuses active, or will I have to do more?

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

alank2 wrote:
One question I have so far is: Let's say someone configures the fuse so that it disables UPDI and is in RESET mode for that pin. The question is, is a 12V pulse without any init going to enable the UPDI functionality on that pin? Or does it need to be a 12V pulse plus a proper init cycle?

 

According to the datasheet, a 12V pulse will override the fuse and set the pin as UPDI until the chip is power cycled. But I never tested this.

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

alank2 wrote:
The question is, is a 12V pulse without any init going to enable the UPDI functionality on that pin?
Yes

alank2 wrote:
Or does it need to be a 12V pulse plus a proper init cycle?
No

ATtiny1614 / ATtiny1616 / ATtiny1617

http://ww1.microchip.com/downloads/en/DeviceDoc/40001893B.pdf

(page 393)

33.3.2.2 UPDI Enable with 12V Override of RESET pin

...

By applying a 12V pulse to the RESET pin, the pin functionality is switched to UPDI, independent of RSTPINCFG in FUSE.SYSCFG0.

...

When applying the rising edge of the 12V pulse, the UPDI will be reset. [12V pulse duration is 0.1ms to 1ms]

...

Caution as megaAVR 0-series is not 12V capable on any pin; its UPDI signal is dedicated to one pin.

 

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

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

Ok.  Curious me had to test it!  I set it to RESET and sure enough it operates as reset and you can not longer access it over UPDI.  Then I power cycled it, applied +12V to the reset pin, and this definitely disables the reset functionality because the reset pin will no longer take it into reset.  You might think the UPDI is enabled, but trying to access it with the ICE still fails.  So it seems to be somewhat enabled and somewhat not.

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

alank2 wrote:
... but if I stay connected with UPDI and just take the device out of reset, will that make the fuses active, or will I have to do more?
more

ATtiny1614 / ATtiny1616 / ATtiny1617

http://ww1.microchip.com/downloads/en/DeviceDoc/40001893B.pdf

(page 22)

6.8 FUSES - Configuration and User Fuses

...

The fuses are available from device power-up. 

...

 

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

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

Wouldn't you think that if the UPDI is reenabled, the ICE should be able to communicate with it?

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

12V pulse then tri-state

 

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

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

What is the point of the tri-state?

 

Here is what I am trying:

 

#1 - power cycle

#2 - test reset, it works (reset the AVR)

#3 - connect 12V battery + to reset pin briefly.

#4 - test reset, it no longer works (does NOT reset the AVR).  I would think UPDI is enabled at this point.

#5 - connect ICE, it CAN'T read the device signature.

 

Can it be unbricked/UPDI enabled for ICE without a programmer than can do the 12V pulse?

Last Edited: Sat. Jun 16, 2018 - 12:38 AM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

alank2 wrote:
What is the point of the tri-state?

ATtiny1614 / ATtiny1616 / ATtiny1617

http://ww1.microchip.com/downloads/en/DeviceDoc/40001893B.pdf

(page 393)

33.3.2.2 UPDI Enable with 12V Override of RESET pin

...

After tri-stating, the UPDI will remain in reset until the RESET pin is driven low by the debugger. This will release the UPDI reset, and initiate the same enable sequence as explained in UPDI Enable with Fuse Override of RESET pin. [33.3.2.1]

...

 

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

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

Here is what happens at power on reset:

 

 

If I apply 12V to the reset pin and repeat it looks like the same:

 

 

After this it is obviously trying to recover from an error:

 

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

New DIP adapter (pin configured for UPDI), beginning of init sequence:

 

 

Old DIP adapter (pin configured for RESET), beginning of init sequence, from power on, reset still active

 

 

Old DIP adapter (pin configured for RESET, but disabled by having been fed +12V), beginning of init sequence:

 

 

Is the AVR doing the second pull down and release in the top graphic?

 

Perhaps the UPDI can be enabled with a 12V pulse, but UPDI really isn't disabled.  Isn't the point of the 12V to make it so you can program it?  I know the 12V is doing something (it doesn't reset any longer).

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

How long did you apply 12V on that pin? Maybe the 12V pulse needs to be shorter?

The 3rd pic in #12 is a double break, it's supposed to reset the UPDI from any state, according to the datasheet. But apparently it's not working, so something is very wrong.

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

Could be, I am just tapping it from a battery with a lead.  I have to think it is disabling the reset functionality and enabling the UPDI, but perhaps there is more to the UPDI that must be reset for it to work.

 

The picture at the end of #12 is a zoom out - it shows the very long reset period attempts.  It didn't get what it was looking for in that original burst, so it is timing out and retrying.  I'll take a screenshot of what a good one looks like a little bit.

 

So are there any 12V UPDI capable programmers yet?  I wonder if they will extend the ICE to support it and come up with a new version, or a new product.

 

My theory is that looking at #13, the second time the signal goes low - is that the AVR pulling it low, and then releasing it in HiZ hence the small delay back to Hi (could be from the weak logic analyzer pullup).

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

alank2 wrote:
My theory is that looking at #13, the second time the signal goes low - is that the AVR pulling it low, and then releasing it in HiZ hence the small delay back to Hi (could be from the weak logic analyzer pullup).

 

I think it's a pullup on the UPDI side, I observed something similar when I was doing my own experiments:https://www.avrfreaks.net/forum/...

 

See the 2nd pic? After a bit under 10us the updi goes from logic low to high impedance, this means it has become enabled, exactly like you see on your "good" chip.

 

In my experiment, I had a 4.7k resistor to ground, that's why the pullup can't pull all the way to VCC, but just a little. So I estimate the pullup to be about 40k.

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

alank2 wrote:
So are there any 12V UPDI capable programmers yet?
Yes in Power Debugger

Microchip Technology Inc

Microchip

Power Debugger

https://www.microchip.com/developmenttools/ProductDetails/ATPOWERDEBUGGER

Power Debugger

UPDI and /RESET
http://www.microchip.com/webdoc/GUID-EAD481FD-28E6-4CD5-87FB-5165E7687C12/index.html?GUID-A92C1757-40E2-4062-AB6D-2536D4C33FB7

alank2 wrote:
I wonder if they will extend the ICE to support it and come up with a new version, or a new product.
Could be a cost and/or risk reduction to port Atmel-ICE from UC3A4 to UC3C though PICkit 4 would be more likely especially with the forthcoming move to MPLAB X.

https://www.avrfreaks.net/forum/come-join-us-mplab-now-supports-avrs?page=1#comment-2407426

 

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

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

Has anyone been able to change the SYSCFG0.RSTPINCFG to reset mode and then access the chip using a 12V programmer to set SYSCFG0.RSTPINCFG back to UPDI mode?  (obviously with a 12V programmer or some other method)

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

Alan you MAY not need 12V at all, maybe for some devices you need it but for the new Mega4809 you don't.

 

See https://www.avrfreaks.net/commen...

 

EDIT I see, some smaller device use the Reset line for UPDI similar to DW and you may need 12V but I'm not going to burn neurons on this, there seem to be 2 ways of enabling/disabling UPDI even for those smaller chips.

John Samperi

Ampertronics Pty. Ltd.

www.ampertronics.com.au

* Electronic Design * Custom Products * Contract Assembly

Last Edited: Mon. Jun 18, 2018 - 09:54 PM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Hmmmmm.  Could the device pack upgrade have done anything to change this?  I updated to the latest pack.

 

Then I tried:

 

#1 - put the good tiny1614 in place (pin=UPDI mode).  Sure enough can read the device signature.

#2 - thought I'd try something and went to the fuses and let it read the good tiny1614's fuses.

#3 - changed to the bad tiny1614 (pin configured for RESET mode).

#4 - tried to program fuses (the good ones I read from the good tiny1614).  It failed spectacularly with two errors.  I tried to read the device sig, it too failed as expected.

#5 - I decided to try hitting it with the 12V pulse.  I disconnected the Atmel ICE cable.  Hit the pin with 12V.  It doesn't reset now when grounded.  Plugged in the Atmel ICE cable and it reads the signature now!  I hit program on the fuses and put the UPDI fuse back in place.  Bricked tiny1614 is now recovered!

 

I know I've tried lots of variations of #5 Friday evening with no luck.  I did upgrade the device pack - do you think that could have changed something in the way the programming dialog works on this?

 

I'm a bit chicken to try changing it back to RESET or GPIO to see if I can do it again, but I just might to try to get to the bottom of it.

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

Where is the fun in this is you don't destroy a few chips during the exercise? cheeky

 

If the 12V blast is necessary then I wonder how does the Atmel ICE do this? Don't know if it has a 12V boost inside just for this.

John Samperi

Ampertronics Pty. Ltd.

www.ampertronics.com.au

* Electronic Design * Custom Products * Contract Assembly

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

Have you looked at the UPDI chapter in any of the xtiny datasheets?  They look to have a pretty comprehensive explanation of what needs to happen at the reset pin for just about any scenario.  This is from the ATtiny417/817 datasheet:

 

Letting the smoke out since 1978

 

 

 

 

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

To me there seems 2 ways of doing the same thing?? But no idea really, the only interaction I have had with UPDI has been with the Xplained boards and everything has been provided to me.

John Samperi

Ampertronics Pty. Ltd.

www.ampertronics.com.au

* Electronic Design * Custom Products * Contract Assembly

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

Ok - a 12V pulse from a battery will sometimes work, but most of the time not.  My guess is that doing it manually with a 12V battery somehow doesn't reset UPDI properly though it does enable UPDI/disable reset functionality.

 

I kept unplugging the ICE and hitting the reset pin with the 12V, then replugging the ICE (I'm not sure how well it would tolerate the 12V) and eventually I could read the signature!  Once I can do that, then I can go back into fuses and change the fuse BACK to UPDI from reset.

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

js wrote:
Don't know if it has a 12V boost inside just for this.
Atmel-ICE doesn't have 12V.

Atmel-ICE
UPDI and /RESET

http://www.microchip.com/webdoc/GUID-DDB0017E-84E3-4E77-AAE9-7AC4290E5E8B/index.html?GUID-A92C1757-40E2-4062-AB6D-2536D4C33FB7

(bottom)
Important: The Atmel-ICE does not support 12V on the UPDI line. In other words, if the UPDI pin has been configured as GPIO or RESET the Atmel-ICE will not be able to enable the UPDI interface.

...

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