uPDI Confusion

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

I'm confused. We have yet another programming and debugging interface to contend with on the form of uPDI. On the face of it a one-pin interface is a good idea. But I'm not sure if we can use it.

 

I'm interested in the new tinyAVR 1-Series devices. On the face of it they look to be something that Atmel traditionally lacked in that they are a family of devices with pin counts of 8, 14, 20 and 28 pins, and memory sizes running from 2k all the way up to 16k (with hints of 32k to come) with a consistent set of peripherals. Nice.

 

To program and debug them the only device that supports them is the Atmel-ICE. In the manual it does however say...

 

Quote:

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.

 

...but in the device datasheet it says...

 

Quote:

Enabling of the 1-wire interface, by disabling the reset functionality, is either done by 12V programming or by fusing the RESET pin to UPDI by setting the RESET Pin Configuration (RSTPINCFG) bits in FUSE.SYSCFG0.

 

But how on earth do you set the fuse bit if you can't get into programming mode?

 

I'm hoping that the bit is set by default and that if you want to use the reset pin as /reset you have to enable that option but there's nothing in the datasheet to help answer that. The JTAG-ICE3 manual does say this...

 

Quote:

The UPDI pin is primarily a programming and debugging pin, which can be fused to have an alternative function (/RESET or GPIO). If the alternative function is selected then a 12V pulse is required on that pin in order to re-activate the UPDI functionality.

 

...which implies that the default is that the pin is a programming/debug pin.

 

But who knows.

 

I may open a support ticket when I get back from holiday and see if anyone at HQ knows.

 

 

I am increasingly frustrated at how disjointed and out of step all the Atmel documentation and website is. It feels decidedly un-cared about.

'This forum helps those who help themselves.'

 

pragmatic  adjective dealing with things sensibly and realistically in a way that is based on practical rather than theoretical consideration.

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

Found it.

 

At 'reset' the pin does come up in uPDI mode.

 

But if you are unlucky enough to change it to something else and then want to go back to debugging then you are out of luck as nothing will supply the 12v needed to undo the change.

'This forum helps those who help themselves.'

 

pragmatic  adjective dealing with things sensibly and realistically in a way that is based on practical rather than theoretical consideration.

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

Just look at it like an improved debugWIRE.

 

The programming and debug comms work better and faster.  

You don't need to worry about DWEN

 

You always have to avoid RSTDISBL unless you want to commit hari-kari.

Personally,  I can live without using RST as a GPIO pin.   But many members have an overwhelming desire to shoot their feet.

 

Yes,  it is a nice idea to have a "single wire debug" that actually uses a single wire.   e.g. debugWIRE.

I am very happy with PDI on Xmega or SWD on ARM-Cortex but both use two wires.  

Single wire operation is always going to be slower.   debugWIRE with ATMEL-ICE is slow.  debugWIRE with mEDBG is painful.

uPDI with mEDBG is not bad.   I suspect that ATMEL-ICE might be a bit quicker.

 

David.

Last Edited: Fri. Aug 4, 2017 - 10:54 AM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 1

According to the "Development Tools" at the bottom of this page:

http://www.microchip.com/wwwproducts/en/ATtiny817

the Power Debugger and STK600 supports the ATtiny817 (and must therefore support UPDI). I believe both also supports 12 V :)

 

If anyone else wonders, the default value of the RSTPINCFG fuses can be found in "6.9.4.5 System Configuration 0" descriptions for SYSCFG0.

 

If you have changed the RSTPINCFG fuse to something other than UPDI, why not disconnect the Atmel-ICE, power cycle the AVR and whack the reset pin with one 12 V pulse from your prefered 12 V supplier, before reconnecting the Atmel-ICE and doing your UPDI stuff. The way I read chapter 33.3.2.2, it should work... The UPDI pins should remain UPDI until the next POR, so you should have plenty of time to reconnect the Atmel-ICE.

 

CPL

 

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

Threiran wrote:
I believe both also supports 12 V :)
STK600 does.

Power Debugger does generate 12V from USB VBUS but 12V stops within the level converters.

Power Debugger

Programming and Debugging

http://www.atmel.com/webdoc/GUID-EAD481FD-28E6-4CD5-87FB-5165E7687C12/index.html?GUID-15319D51-090D-4BC4-9361-0FC2A4A0983B

...

All signal channels can be operated in the range 1.62 to 5.5V, although the Power Debugger hardware itself can not drive out a higher voltage than 5.0V.

...

 

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