Pullups on UPDI, RST...

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

Change my mind:

 

For the modern (Mega-0, Tiny-0, Tiny-1) pullups are unnecessary on the UPDI or RST pins...

At worst, they interfere with other desirable functions (HV UPDI, use of pin as GPIO, etc.)  At best, they might provide slightly better noise immunity that probably isn't relevant...

 

 

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

Atmel-ICE

(top of page 49)

When designing a target application PCB where UPDI interface will be used, the following considerations must be made for correct operation:

• Pull-up resistors on the UPDI line must not be smaller (stronger) than 10kΩ. A pull-down resistor should not be used, or it should be removed when using UPDI. The UPDI physical is push-pull capable, so only a weak pull-up resistor is required to prevent false start bit triggering when the line is idle.

• If the UPDI pin is to be used as a RESET pin, any stabilizing capacitor must be disconnected when using UPDI, since it will interfere with correct operation of the interface

• If the UPDI pin is used as RESET or GPIO pin, all external drivers on the line must be disconnected during programming or debugging since they may interfere with the correct operation of the interface

via

AVR Microcontroller Hardware Design Considerations

(page 13)

Note:  Refer to the respective programmer user guide for more information about the capabilities and physical interface of UPDI.

MPLAB PICkit 4 can push and pull a 1K ohm; with that strong of a driver, add series termination to

  • current limit a worst case (voltage regulator pass transistor short to VCC through the UPDI pull-up transistor)
  • impedance match (usually over-damped, IIRC 15cm max for cable length, reduces reflection's amplitude)

1K ohm seems popular for the series termination and should be functional at UPDI's max frequency of 900KHz (Atmel-ICE is 750KHz max)

ATmega4809_Curiosity_Nano (schematic)

(page 3, C4, R108)

 

edit :

To increase UPDI's ESD tolerance :

  • megaAVR 0-series, R-TVS(rail clamp)-R, R << 1K
  • tinyAVR 0-series and 1-series, R-C-R with a time constant of 100ns (marginal on max UPDI frequency)

AVR don't have a spec ESD though do have enough ESD suppression (likely to some energy between CDM and HBM)

Another option are the voltage translators that are pass FETs with active pull-ups to increase edge speed; some of those are spec'd to 20MHz (for SPI)

A voltage translator typically has an ESD spec; such are in the mega4809 Curiosity Nano.

 


Art electronics 3rd edition | Electronics for physicists | Cambridge University Press

12.1.5 Input Protection

 

edit :

ATL431LI / ATL432LI High Bandwidth Low-Iq Programmable Shunt Regulator datasheet (Rev. B)

[page 4]

...

(1) JEDEC document JEP155 states that 500-V HBM allows safe manufacturing with a standard ESD control process.

(2) JEDEC document JEP157 states that 250-V CDM allows safe manufacturing with a standard ESD control process.

...

 

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

Last Edited: Fri. Aug 16, 2019 - 03:15 PM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

I kept saying it quite often here, I have tested these UPDI without pull-ups and it worked perfect. there is no pull-ups resistors needed at all when using UPDI. I dont even know why they mention it...

 

Regards,

Moe

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

Atmel-ICE

• Pull-up resistors on the UPDI line must not be smaller (stronger) than 10kΩ.

Ah.  So a Microchip SNAP requires a pullup of about 1k, and an Atmel-ICE requires that any pullup be >10k.  Lovely.
I guess I'm off to make a special SNAP cable...

 

(FWIW, the PICKit4 works fine with no pullup.)

 

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

I don't think a pull-up is mandatory, but recommended and doesn't hurt.  Pull-downs on the other hand are not good.  SNAP has pull-downs (for PIC), which should really be removed when using it with UPDI/PDI/TPI.

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

I don't think a pull-up is mandatory

It is for SNAP, according to the recent SNAP release notes:  https://www.avrfreaks.net/comment/2744311#comment-2744311

 

"A 1K ohm pull-up resistor must be installed between the MPLAB Snap ICD ICSP connector's (PCB reference designator J4) pin 4 (PGD) and pin 2 (VDD) to allow proper programming/debugging support for AVR parts that support the UPDI/PDI/TPI interface.

Note: If this 1K ohm pull-up resistor is not installed a 'PDI physical timed out. (25)' message will be issued for various operations in the MPLAB X IDE or MPLAB X IPE GUI."

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

Yes.   You must make a hardware mod to the SNAP i.e. remove a single SMD resistor for UPDI/PDI/TPI.

Yes.   You can add a pullup to the SNAP interface (or target)

 

I would guess that a future hardware revision of the SNAP pcb will solve this.

I suspect that the current "SNAP deal" is designed to use up the stock of "problem" pcb

 

Of course this will just result in a lot of unhappy punters.    They will not want to get out the soldering iron.    Mind you,   the SNAP is so cheap that it is worth the inconvenience.     (and not all punters will be needing UPDI/PDI/TPI )

 

AvrFreaks would be the obvious place to ask AVR questions.   And probably the best place for Microchip to receive feedback from AVR users.

 

David.

Last Edited: Fri. Aug 9, 2019 - 08:21 AM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

I have used a 1k resistor with the SNAP, and works ok. I have not tried other values, or played around with updi speeds though. If the removal of the pulldown didn't harm the usage of pic8/32, I would just remove it, otherwise it stays.

 

The mclr pin would be unused in updi mode I assume (floating/input), so it could be used to enable a pulldown if needed when programming pic8. When programming pic8 in low voltage mode (which SNAP can only do), the mclr line is held low during programming so then it could be used to switch a pulldown on. The pic32 only needs the mclr line low to enter programming, then needs to release, so that would be a different story. I guess what one would really want is to get at the dir pin controlling the mclr line (or the icspclk dir pin I suppose). Or just be happy with a 1k resistor and leave it alone.

 

Maybe I will modify my SNAPmate board to take care of this somehow. I would also like to add a way to enter updi programming when updi pin is set to use gpio/reset. From what I can tell, just need a hv pulse to get the mcu to switch the pin to updi. The SNAP has no control over power, so it wouldn't know any better., but also means it would be up to user to do a power cycle to get back to gpio/reset mode.

https://photos.app.goo.gl/HA7Egm...

 

 

 

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

We use Atmel ICE with a 50cm cable for low volume production. All boards have no resistor and UPDI and everything works perfect. We use UPDI only for programming and nothing is connected, even a reset button.

extronic.pl

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

I made a little adapter from protoboard.   8x1 female to 5x2 for JTAG and 3x2 for ICSP/dW/PDI/UPDI/TPI.

 

I simply added a 1k with a 2x1 jumper.

From memory,  I experimented with weaker pullups.   PDI on an Xmega required 1k.

 

I have never tried the SNAP with PIC.   I only have PIC18F458 and ? PIC18K351.    I can always use a PicKit2 if I wanted.

 

Regarding future SNAP electronics.    I am sure that they could switch pullup/pulldown in any pcb revision with the appropriate firmware.

Meanwhile,  a manual jumper is not too onerous.

 

My point in the "other" Snap thread was:   Describe any problem setup so that readers can replicate (or solve)

It is no good owning a SNAP if you do not use it.

It is no good complaining about a SNAP if you do not try it.

 

David.

Last Edited: Fri. Aug 9, 2019 - 11:53 AM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

The UPDI interface can be set in 2 different drive modes and this might be the source of some of this confusion with pullups.

 

In one mode, it has a collision detector and this basically means that, when UPDI is working as output (it's half-duplex, as you know), the driver is only enabled for a short pulse and relies on capacitance to keep its logical value for the rest of the bit time.

In this mode, the pullup is actually bad as I comment here: https://www.avrfreaks.net/commen...

 

In the other mode it works as a normal output (well, "normal" within the very low driver strength of the UPDI pin compared to regular I/O pins).

I must say, Atmel staff recommended me to disable the collision detector when I was writing the jtag2updi programmer: https://www.avrfreaks.net/commen...

 

Which I didn't do, actually cheeky no one has complained yet. Do the new Arduino models have a pullup on UPDI or not? Anyone checked?

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

I've chcecked my boards from Atmel:

  • ATtiny416 XNANO - a 1k resistor between programmer and MCU
  • ATmega4809 Curiosity - direct connection between MCU and programmer
  • AVR-IoT - this is really strange, UPDI from MCU to programmer's RX pin connected directly, byt to TX connected via 1k resistor

Anyway, on official boards there are no pull-ups on UPDI

extronic.pl

Last Edited: Fri. Aug 9, 2019 - 12:09 PM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

El Tangas wrote:
Do the new Arduino models have a pullup on UPDI or not?
4.7K

https://content.arduino.cc/assets/NANOEveryV3.0_sch.pdf (B4)

via Arduino Nano Every

 

P.S.

pass FET, active pull-up for speed, bus hold 10K ohm pull-up :

NLSX4373: Level Translator, 2-Bit, 20 Mbps, Dual-Supply

via ON Semiconductor - Level Translators

most of this kind have a bus hold pull-up; a relative few don't have the bus hold.

 

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

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

 

Right, so the Every has a pull-up, and even a 3V3 Zener Schottky protection diode, they really are scared about that UPDI pin frown 

(edit: do they really need the level shifter? Because of the diode, a resistor would be enough, right? 3.3V HI can be understood by 5V logic.)

The other FET level shifters don't have such protection.

 

 

 

Ah, here it is. On the modified jtag2updi they are using on the nano Every, they changed my code from:

 

	UPDI_io::put(UPDI_io::double_break);
	UPDI::stcs(UPDI::reg::Control_A, 6);

 

to:

 

  UPDI_io::put(UPDI_io::double_break);
  UPDI::stcs(UPDI::reg::Control_B, 8);
  UPDI::stcs(UPDI::reg::Control_A, 0x80);

 

This means: use more conservative timing (cuz Arduino I/O has function call overheads, right? devil), and disable collision detection (because of the pull-up resistor). OK, these people seem to know what they are doingcheeky

 

Last Edited: Fri. Aug 9, 2019 - 05:29 PM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Schottky, Do Not Place

A level translator IC likely has spec ESD one of which goes to HBM (better than an AVR)

`

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

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

El Tangas wrote:
3.3V HI can be understood by 5V logic.
SAM D11 is not 5V tolerant (UPDI is bi-directional); PIC32 have a significant number of 5V tolerant pins.

 

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

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

El Tangas wrote:
The other FET level shifters don't have such protection.
the active pull-up is a current source.

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

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

gchapman wrote:

SAM D11 is not 5V tolerant (UPDI is bi-directional); PIC32 have a significant number of 5V tolerant pins.

 

The Schottky limits the voltage.

 

edit: ah ok, I see it's not to be placed. So they changed their minds?

Last Edited: Fri. Aug 9, 2019 - 08:01 PM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Try both then pick the one that's the best. 

Planet Analog - Articles - SIGNAL CHAIN BASICS #66: How to interface a 5V transceiver to a 3V controller

(paragraph below Figure 2)

...

This causes current to flow through the level-shifter, thus, occurring at times when current isn’t actually needed but rather wasted. Of course, it is possible to increase the resistor values in order to reduce current consumption, but higher impedance in combination with the input capacitance of MCU I/O can lead to signal distortion at higher data rates.

...

10KR * 10pF = 100ns

That will limit UPDI's frequency.

If UPDI is as finicky as PDI is on symmetry and impedance then worth the effort of tries (though PDI is two orders of magnitude faster than UPDI)

UPDI is an excellent follow on to debugWIRE.

El Tangas wrote:
So they changed their minds?
I recall Carnac the Magnificent - Wikipedia

 

 

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

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

The Arduino "Uno WiFi 2" (which has a 32u4 mEDBG) has a DNP pullup on UPDI, and a 100k pullup on RST (with 39ohm resistor to the button, and 330ohms to the mEDBG "trigger reset" signal.)