

PCB updi unbricker
UPDI High Voltage programmer for AVR Dx/Ex and ATtiny series
- Size
- 54 × 47.5 mm
- Copper layers
- 2
- Thickness
- 1.6 mm
- Parts
- 63
- Nets
- 45
- Pads
- 190
- Tracks, vias
- 472, 58
- Pours
- 2
- Routed
- Yes
- KiCad
- KiCad 10.0 (file 20260206)
- Created
- 12 Sep 2026
- Updated
- 6 Nov 2026
Overview
PCB updi unbricker is an open-source printed circuit board by k-takata, from the k-takata/PCB_updi_unbricker repository on GitHub. It is a 2-layer board of 54 × 47.5 mm with 63 parts on 45 nets, routed with 472 tracks and 58 vias.
It is built around the ATTINY412-SSN, CH340K and TPS61040DBV, with the 74LVC1G3157, LM1117GS-3.3 and BAT43WS among its other parts. Its parts include 17 resistors, 12 diodes, 7 capacitors, 7 connectors and 6 transistors. It belongs with the interfaces and adapters boards and the AVR (ATmega, ATtiny) boards of this library.
Main components
12ATTINY412-SSN
SOIC-8-40℃~+105℃ 1.8V~5.5V 10bit 128Byte 20MHz 256Byte 4KB 6 8 Bit 8bit AVR Built-in FLASH SOIC-8 Microcontrollers (MCU/MPU/SOC) ROHSMicrochip TechnologyMicrocontrollers (MCU/MPU/SOC)CH340K
ESSOP-10-150mil-1mm-20℃~+70℃ 2Mbps 3.3V、5V USB 2.0 USB to serial ESSOP-10-150mil-1mm USB Converters ROHSWCH (Nanjing Qinheng Microelectronics)USB ConvertersTPS61040DBV
SOT-23-5-40℃~+125℃@(TJ) 1 1.8V~6V 1MHz 28V 28uA 400mA Adjustable Boost Boost Built-in No Overcurrent Protection、Light load efficient mode SOT-23-5 DC-DC Converters ROHSTexas InstrumentsLED Drivers74LVC1G3157
UncategorisedDiodes IncorporatedLM1117GS-3.3
SOT-223-3L-40℃~+125℃@(Tj) 1 1.2V@(1A) 100uV 12V 1A 3.3V 5mA 75dB@(120Hz) Fixed Over Current Protection、Over Temperature Protection Positive SOT-223-3L Voltage Regulators - Linear, Low Drop Out (LDO) Regulators ROHSHTCVoltage Regulators - Linear, Low Drop Out (LDO) RegulatorsBAT43WS
SOD-323-55℃~+125℃ 1 Independent 1V@0.2A 200mA 30V 4A 500nA@25V SOD-323 Schottky Diodes ROHSDiodes IncorporatedSchottky DiodesBSS138
SOT-23-55℃~+150℃ 1 N-channel 1.1Ω@10V、1.2Ω@4.5V 1.2V 1.7nC@10V 17.5pF 340mA 350mW 50V 6.5pF N-Channel SOT-23 MOSFETs ROHShongjiachengMOSFETsBSS84
SOT-23-55℃~+150℃ 1 P-Channel 130mA 2.8pF 24.6pF 2V 3.2Ω@5V 300mW 4.7pF 50V 590pC@10V SOT-23 MOSFETs ROHSDiodes IncorporatedMOSFETs1N5819WS
SOD-3231 Independent 1A 25A 40V 500uA@40V 600mV@1A SOD-323 Schottky Diodes ROHSGuangdong HottechSchottky DiodesAO3401A
SOT-231 P-Channel 14nC@10V 30V 47mΩ@10V、60mΩ@4.5V、85mΩ@2.5V 4A 55pF 645pF 80pF 900mV SOT-23 MOSFETs ROHSAlpha & Omega SemiconductorMOSFETsBZT52C3V6
SOD-123Zener DiodeshongjiachengBZT52C5V6
SOD-123Zener Diodeshongjiacheng
README
README.mdUPDI Unbricker (Rev. 3)
Overview
This board is a UPDI programmer for AVR DA, DB, DD, DU, EA, and EB-series 7.5 V high-voltage (HV) programming and modern ATtiny-series (tinyAVR 0/1/2) 12 V HV programming. It injects HV pulses to restore programming capability when the UPDI pin has been accidentally or deliberately reconfigured, preventing normal UPDI programming with a standard UPDI tool.
The UPDI section of the circuit is based on the design from UPDI Adapter for AE-CH9102F (Rev. 3), and it includes an automatic mode switch controlled by the RTS signal.
Supported scope
| Item | Status | Notes |
|---|---|---|
| AVR Dx/Ex 7.5 V HV UPDI | Supported | Applies 7.5 V pulse to RESET pin |
| ATtiny 12 V HV UPDI | Supported | Applies 12 V pulse to UPDI pin |
| Normal UPDI programming | Supported | SerialUPDI is used as the programmer |
| Devices verified so far | AVR64DD28, ATtiny1604, ATtiny402, etc. | As of README creation |
Software used
- KiCad 10.0
- Arduino IDE 2.3.10
- megaTinyCore 2.6.11
Switch and jumper roles
This board switches operating modes using three switches and one jumper.
| Part | Role | Main setting |
|---|---|---|
| SW1 | Enables/disables HV pulse generation | OFF = safe mode, ON = HV programming enabled |
| SW2 | Selects target supply voltage | Choose 5 V or 3.3 V |
| SW3 | Enables/disables power output from this board to the target | ON = power supplied, OFF = avoids double-powering when externally powered |
| J2 | Selects programming target | FW = firmware write, Target = target programming |
Set J2 to the FW side for firmware programming and the Target side for UPDI programming. In the FW state, your PC connects to U4 to program it. In the Target state, it connects to the target device for UPDI communication and HV programming.
Quick start
Before first use, write the firmware to the onboard MCU (U4).
- Set J2 to the FW side.
- Open
src/updi_unbricker/updi_unbricker.inoin Arduino IDE and select the appropriate board and chip. - Set the programmer to SerialUPDI and write the firmware to U4.
- After programming, return J2 to the Target side.
- Connect either J5 or J6 according to the target device, and configure SW2 and SW3 as needed. (Set SW3 to ON if the board should supply power to the target.)
- Turn SW1 ON to enable the HV circuit, then press the START button to inject the HV pulse.
- In Arduino IDE, set the programmer to SerialUPDI and perform normal programming.
See “Usage” for detailed procedures.
Safety precautions
- The UPDI pin on J5 outputs a 12 V HV pulse. The RESET pin on J6 outputs a 7.5 V HV pulse. Always verify the target circuit's voltage tolerance and protection measures.
- If the target is powered from an external source, set SW3 to OFF to avoid double-powering.
- When running HV, it is recommended to leave J3 disconnected.
- For the first test, avoid the complete target board if possible; use a bare chip or a minimal setup instead.
Schematic
PCB layout

BOM
| Reference | Quantity | Value | Description |
|---|---|---|---|
| C1, C2, C4 | 3 | 10 μF | 1608M |
| C3, C6 | 2 | 0.1 μF | 1608M |
| C5 | 1 | 10 μF | 2012M, ≥ 25 V |
| C7 | 1 | 33 pF | 1608M |
| D1, D3-D5 | 4 | BAT43WS | SOD-323 |
| D2 | 1 | BZT52C5V6 | 5.6 V Zener diode, SOD-123, for overvoltage protection (*1) |
| D6 | 1 | 1N5819WS | SOD-323, ≥ 300 mA |
| D7 | 1 | BZT52C3V6 | 3.6 V Zener diode, SOD-123; adjust value as needed for LED (3.0 V to 3.6 V) (*2) |
| D8 | 1 | NCD0805R1 | 2012M, VDD voltage indicator |
| D9 | 1 | KT-0805G | 2012M, VDD voltage indicator |
| D10 | 1 | BZT52C7V5 | 7.5 V Zener diode, SOD-123 (*3) |
| D11 | 1 | Optional | 5.6 V Zener diode, DO-41 (*1) |
| D12 | 1 | Optional | 3.6 V Zener diode, DO-35 (*2) |
| D13 | 1 | Optional | 7.5 V Zener diode, DO-41 (*3) |
| F1 | 1 | SMD1206P050TF | Resettable fuse, 0.5 A |
| J1 | 1 | TYPE-C16PIN | USB Type-C receptacle |
| J2 | 1 | 1 × 3 pin header for selecting the programming target | |
| J3 | 1 | L-shaped 1 × 6 pin socket for TTL serial connection | |
| J5 | 1 | 1 × 3 pin socket for ATtiny UPDI connection | |
| J4 | 1 | 1 × 3 pin header for RTS/DTR switching | |
| J6 | 1 | 1 × 4 pin socket for AVR Dx/Ex UPDI connection | |
| J7 | 1 | 1 × 4 pin header for firmware programming (*4) | |
| L1 | 1 | DFE322512F-100M=P2 | 10 μH, ≥ 300 mA |
| (Q1, Q2) | - | - | Not used |
| Q3, Q6, Q8 | 3 | BSS138 | N-ch MOSFET |
| Q5, Q7 | 2 | BSS84 | P-ch MOSFET |
| Q4 | 1 | AO3401A | P-ch MOSFET |
| R1, R15 | 2 | 470 Ω | 1608M |
| R2, R3 | 2 | 5.1 kΩ | 1608M |
| R4 | 1 | 100 kΩ | 1608M |
| R5 | 1 | 220 Ω | 1608M |
| (R6) | - | - | Not used |
| R7, R8, R16-R19 | 6 | 10 kΩ | 1608M |
| (R9) | - | - | Not used |
| R10 | 1 | 470 kΩ 1% | 1608M (*5) |
| R11 | 1 | 10 MΩ 1% | 1608M (*5) |
| R12 | 1 | 51 kΩ 1% | 1608M (*5) |
| R13 | 1 | 220 Ω | 1608M; adjust according to LED (47 Ω to 220 Ω) |
| R14 | 1 | 15 kΩ | 1608M; adjust according to LED |
| SW1-SW3 | 3 | SS-12D00G3 | Slide switch, SPDT, PCB mount |
| SW4 | 1 | Push button switch | |
| U1 | 1 | CH340K | |
| U2 | 1 | AMS1117-3.3 | Or LM1117GS-3.3 |
| U3 | 1 | 74LVC1G3157 | Analog switch (SPDT) |
| U4 | 1 | ATtiny402-SSNR | Or ATtiny412-SSNR |
| U5 | 1 | TPS61040DBVR | Step-up converter |
(*1) Install either D2 or D11.
(*2) Install either D7 or D12.
(*3) Install either D10 or D13.
(*4) It is acceptable not to mount the pin header and instead use pogo pins or similar.
(*5) R10 and R11 are connected in parallel. Adjust the ratio of the effective resistance of R10∥R11 to the value of R12 to approximately 8.732.
About UPDI HV programming
UPDI (Unified Program and Debug Interface) is a programming method used in newer AVR devices.
UPDI uses a dedicated pin, but you can reconfigure the UPDI pin as a GPIO through fuse settings. However, if UPDI is disabled, the next UPDI programming attempt requires a special method to re-enable it. That method is high-voltage (HV) programming.
There are two types of HV programming. One is the 12 V pulse applied to the UPDI pin used in ATtiny devices, and the other is the 7.5 V pulse applied to the RESET pin used in AVR Dx/Ex devices.
- ATtiny series:
Apply a 12 V pulse to the UPDI pin within 8.8 ms after power-on reset (POR), with a width of 100 μs to 1 ms.
If the pulse is not applied within the required time after POR, the pin function may interfere with the intended operation. - AVR Dx/Ex series:
Apply a 7.5 V pulse to the RESET pin for at least 10 μs, then send a valid UPDI key within 65 ms.
If the UPDI key transmission is not completed in time, a reset is triggered automatically.
(The UPDI key includes three types: the Chip Erase key, the NVMPROG key, and the USERROW-Write key.)
Unlike ATtiny devices, AVR Dx/Ex series have a separate RESET pin, and it cannot be used as an output pin; there are no POR-to-HV-pulse timing restrictions.
For safety, this board uses separate connectors for ATtiny and AVR Dx/Ex devices. For simplified processing, this board resets both ATtiny and AVR Dx/Ex devices with POR, then applies an HV pulse, and finally sends the NVMPROG key. POR is unnecessary for AVR Dx/Ex, and sending the NVMPROG key is unnecessary for ATtiny, but it should be harmless.
For AVR Dx/Ex series, locked devices may not accept the NVMPROG key in some cases. This board sends the Chip Erase key if you keep pressing the START button for over 5 seconds, and forcibly unlocks the device by erasing it.
Reference material:
- ATtiny202/204/402/404/406 Data Sheet [PDF]
See “30. UPDI - Unified Program and Debug Interface” and “33. Electrical Characteristics” (33.18. UPDI Timing). - AVR64DD32/28 Datasheet [PDF]
See “36. UPDI - Unified Program and Debug Interface” and “38. Electrical Characteristics” (38.5.18. UPDI).
Devices verified
- AVR DD series
- AVR64DD28
- AVR EB series
- AVR16EB14
- tinyAVR 0 series
- ATtiny1604
- ATtiny402
- tinyAVR 1 series
- ATtiny412
Usage
Connections
Connect J1 to the PC.
Connect the target using J5 or J6. J5 is the connector for ATtiny devices.
| Pin | Function |
|---|---|
| 1 | VDD (5 V / 3.3 V) |
| 2 | GND |
| 3 | UPDI (max 12 V) |
The UPDI pin outputs a 12 V HV pulse, so the target circuit must be designed to tolerate this voltage.
On the Rev. 3 board, to communicate with an ATtiny via J5, a 10 kΩ pull-up resistor must be added between UPDI_TGT and VDD_TGT. See "Pull-up resistor for ATtiny (J5)".
J6 is the connector for AVR Dx/Ex devices and matches the UPDI v2 connector used by the AVR Programming Adapter.
| Pin | Function | Color |
|---|---|---|
| 1 | RESET (max 7.5 V) | White |
| 2 | VDD (5 V / 3.3 V) | Red |
| 3 | GND | Black |
| 4 | UPDI | Green |
The RESET pin outputs a 7.5 V HV pulse, so the target circuit must be designed to tolerate this voltage.
J3 is a standard 6-pin TTL serial connector. You can select pin 6 on J3 as either RTS or DTR by inserting a jumper on J4.
| Pin | Function | Color |
|---|---|---|
| 1 | GND | Black |
| 2 | CTS | Brown |
| 3 | VDD (5 V / 3.3 V) | Red |
| 4 | TxD | Orange |
| 5 | RxD | Yellow |
| 6 | RTS / DTR | Green |
SW1 selects whether HV programming is enabled. For safety, it is normally recommended to keep it OFF.
SW2 selects the target supply voltage and the signal levels of J3, J5, and J6 from 5 V or 3.3 V. Even if the target is powered from an external source, set SW2 to match the target's voltage.
SW3 selects whether the board supplies power to the target. If set to ON, it supplies power; if set to OFF, it does not. If the target is already powered by another path, set this to OFF.
To power the target with this board, select the supply voltage with SW2 and set SW3 to ON. The illumination of LEDs changes with the supply voltage: green at 3.3 V and green + red at 5 V. If SW3 is OFF and the target is not connected, the LED is turned off. If the target is connected and powered externally, the LED lights from the target supply.
Firmware programming
Normal programming
To program the firmware to U4, configure and connect the switches and connectors as follows.
| Part | Setting / connection |
|---|---|
| SW1 | Any |
| SW2 | 5 V |
| SW3 | Any |
| J1 | Connect PC |
| J2 | FW |
| J3 | Disconnected |
| J4 | Any |
| J5 | Disconnected |
| J6 | Disconnected |
| J7 | Disconnected |
Open the sketch in the src directory in Arduino IDE.
Select the appropriate board and chip for the AVR mounted on U4.
| Part | Board | Chip |
|---|---|---|
| U4 | megaTinyCore → ATtiny412/402/212/202 | ATtiny402 (or ATtiny412) |
ATtiny402 has been mainly used for verification, but ATtiny412 should also work. ATtiny2xx doesn't have enough flash memory.
Set the programmer to SerialUPDI to write the firmware.
HV programming for firmware recovery
If the UPDI pin of U4 has been disabled and you need to re-enable it via HV programming, you can recover the board by connecting another HV programmer to J7.
| Part | Setting / connection |
|---|---|
| SW1 | Any |
| SW2 | Any |
| SW3 | Any |
| J1 | Disconnected |
| J2 | Remove jumper |
| J3 | Disconnected |
| J4 | Any |
| J5 | Disconnected |
| J6 | Disconnected |
| J7 | Connect another HV programmer |
To avoid effects from the 12 V pulse, remove the J2 jumper or set it to the Target side.
Also disconnect all other connectors except J7.
UPDI programming
Normal mode
Configure and connect the switches and connectors as follows.
| Part | Setting / connection |
|---|---|
| SW1 | OFF for safety |
| SW2 | Select 5 V or 3.3 V according to the target |
| SW3 | Normally ON |
| J1 | Connect PC |
| J2 | Target |
| J3 | Connected or disconnected |
| J4 | Any |
| J5 / J6 | Connect the appropriate target connector |
| J7 | Disconnected |
SW3 is normally set to ON, but if the target is powered from another source, set it to OFF.
J3 can remain connected without issue. The UPDI mode and serial communication mode are automatically switched by the RTS signal.
In the Arduino IDE, set the programmer to SerialUPDI, and programming can proceed normally.
HV programming
Configure and connect the switches and connectors as follows.
| Part | Setting / connection |
|---|---|
| SW1 | ON |
| SW2 | Select 5 V or 3.3 V according to the target |
| SW3 | Normally ON |
| J1 | Connect PC |
| J2 | Target |
| J3 | Disconnected |
| J4 | Any |
| J5 / J6 | Connect the appropriate target connector |
| J7 | Disconnected |
SW3 is normally set to ON. For ATtiny targets in particular, keep it ON so this board supplies power.
Connect either J5 or J6, depending on the target. Use J5 for ATtiny and J6 for AVR Dx/Ex. Connecting J5/J6 to the target circuit is fine as long as it supports HV, but connecting a bare chip is safer.
J3 should remain disconnected.
With the connection set, press the START button. The board resets the target, sends the HV pulse and NVMPROG key, enabling UPDI. Then follow the usual Arduino IDE programming procedure; the device should be ready for programming.
For a locked AVR Dx/Ex device, keep pressing the START button for over 5 seconds; you can forcibly unlock the target by erasing it.
Error notification
If the board fails to enable UPDI or to erase the chip, it notifies the error by blinking the VDD indicator LEDs (D8/D9) after the operation. The number of blinks shows the cause.
| Blinks | Cause |
|---|---|
| 1 | UPDI could not be enabled. The UPDI line did not return to high after the enable pulse. Check the target connection (J5/J6), SW1, and SW3. |
| 2 | No response when reading the key status (Chip Erase). |
| 3 | The target did not accept the Chip Erase key. |
| 4 | No response when reading the lock status after Chip Erase. |
| 5 | Chip Erase did not finish in time. |
Notes:
- Blinking is done by switching the target power off and on, so the target is reset. The LEDs do not blink if SW3 is OFF or if the target is powered externally.
- A normal START press (without erasing) can only report 1 blink. The board cannot check whether the NVMPROG key was accepted.
Serial communication
Configure and connect the switches and connectors as follows.
| Part | Setting / connection |
|---|---|
| SW1 | OFF for safety |
| SW2 | Select 5 V or 3.3 V according to the target |
| SW3 | Normally ON |
| J1 | Connect PC |
| J2 | Target |
| J3 | Connect the target |
| J4 | Select according to purpose |
| J5 / J6 | Connected or disconnected |
| J7 | Disconnected |
J5/J6 may be connected without issue. The UPDI mode and serial communication mode are automatically switched by the RTS signal.
You can select pin 6 on J3 as RTS or DTR by inserting a jumper on J4.
AVRDUDE usage examples
Here is an example of setting fuses using AVRDUDE. AVRDUDE requires v7.0 or later with SerialUPDI support. (v8.1 is used here.)
The command used in this example is:
> avrdude -c <programmer> -p <device name> -P <port name> -b <baud rate> -v -U <memory operation>(The > at the beginning of the line is a prompt. You don't need to input it.)
The programmer is specified as serialupdi.
The device name (part name) is described later.
The port name is something like COM8 on Windows.
A baud rate such as 115200 or 230400 is recommended; it seems that higher rates do not work reliably.
-v is an option for verbose output.
The memory operation is described later.
AVR64DD28
For AVR64DD28, the UPDI pin setting is controlled by the UPDIPINCFG bit in the SYSCFG0 fuse.
Use -p 64dd28 to specify the device name.
Reading the fuse
To read SYSCFG0, specify -U fuse5:r:-:h.
fuse5 indicates SYSCFG0, r means read, - means standard output, and h means hexadecimal output.
> avrdude -c serialupdi -p 64dd28 -P COM8 -b 115200 -v -U fuse5:r:-:h
Avrdude version 8.1
Copyright see https://github.com/avrdudes/avrdude/blob/main/AUTHORS
System wide configuration file is C:\Users\<USER>\AppData\Local\Arduino15\packages\DxCore\tools\avrdude\avrdude_v8.1-released\etc\avrdude.conf
Using port : COM8
Using programmer : serialupdi
Setting baud rate : 115200
AVR part : AVR64DD28
Programming modes : SPM, UPDI
Programmer type : serialupdi
Description : SerialUPDI
NVM type 2: 24-bit, word oriented write
Entering NVM programming mode
Chip silicon revision: 1.3
AVR device initialized and ready to accept instructions
Device signature = 1E 96 1B (AVR64DD28)
Reading fuse5/syscfg0 memory ...
Writing 1 byte to output file <stdout>
0xd9
Leaving NVM programming mode
Avrdude done. Thank you.The default value of SYSCFG0 is 0xd0, but it is currently set to 0xd9.
Change the UPDI pin to GPIO
Change the UPDIPINCFG bit (Bit 4) from 1 to 0 to switch the UPDI pin to GPIO.
Use -U fuse5:w:0xc9:m to set SYSCFG0 to 0xc9. w means write, and m means immediate value.
> avrdude -c serialupdi -p 64dd28 -P COM8 -b 115200 -v -U fuse5:w:0xc9:m
Avrdude version 8.1
Copyright see https://github.com/avrdudes/avrdude/blob/main/AUTHORS
System wide configuration file is C:\Users\<USER>\AppData\Local\Arduino15\packages\DxCore\tools\avrdude\avrdude_v8.1-released\etc\avrdude.conf
Using port : COM8
Using programmer : serialupdi
Setting baud rate : 115200
AVR part : AVR64DD28
Programming modes : SPM, UPDI
Programmer type : serialupdi
Description : SerialUPDI
NVM type 2: 24-bit, word oriented write
Entering NVM programming mode
Chip silicon revision: 1.3
AVR device initialized and ready to accept instructions
Device signature = 1E 96 1B (AVR64DD28)
Reading 1 byte for fuse5/syscfg0 from input file 0xc9
in 1 section [0, 0]
Writing 1 byte (0xC9) to fuse5/syscfg0, 1 byte written, 1 verified
Leaving NVM programming mode
Avrdude done. Thank you.Reading the fuse again
Read SYSCFG0 again. Since the UPDI pin has been changed to GPIO, the UPDI link cannot be established and the read fails.
> avrdude -c serialupdi -p 64dd28 -P COM8 -b 115200 -v -U fuse5:r:-:h
Avrdude version 8.1
Copyright see https://github.com/avrdudes/avrdude/blob/main/AUTHORS
System wide configuration file is C:\Users\<USER>\AppData\Local\Arduino15\packages\DxCore\tools\avrdude\avrdude_v8.1-released\etc\avrdude.conf
Using port : COM8
Using programmer : serialupdi
Setting baud rate : 115200
AVR part : AVR64DD28
Programming modes : SPM, UPDI
Programmer type : serialupdi
Description : SerialUPDI
Error: UPDI link initialization failed
Error: initialization failed (rc = -1)
- double check the connections and try again
- use -b to set lower baud rate, e.g. -b 57600
- use -F to override this check
Leaving NVM programming mode
Avrdude done. Thank you.Press START to restore the UPDI pin
Pressing the START button temporarily makes UPDI usable again. With that state, change the UPDIPINCFG bit back to 1 and restore the UPDI pin.
Use -U fuse5:w:0xd9:m to set SYSCFG0 back to 0xd9.
> avrdude -c serialupdi -p 64dd28 -P COM8 -b 115200 -v -U fuse5:w:0xd9:m
Avrdude version 8.1
Copyright see https://github.com/avrdudes/avrdude/blob/main/AUTHORS
System wide configuration file is C:\Users\<USER>\AppData\Local\Arduino15\packages\DxCore\tools\avrdude\avrdude_v8.1-released\etc\avrdude.conf
Using port : COM8
Using programmer : serialupdi
Setting baud rate : 115200
AVR part : AVR64DD28
Programming modes : SPM, UPDI
Programmer type : serialupdi
Description : SerialUPDI
Device in NVM programming state, leaving programming mode
Device in reset status, trying to release it
NVM type 2: 24-bit, word oriented write
Entering NVM programming mode
Chip silicon revision: 1.3
AVR device initialized and ready to accept instructions
Device signature = 1E 96 1B (AVR64DD28)
Reading 1 byte for fuse5/syscfg0 from input file 0xd9
in 1 section [0, 0]
Writing 1 byte (0xD9) to fuse5/syscfg0, 1 byte written, 1 verifiedLock / unlock
You can lock a device by manipulating the Lock Key register. A locked device can no longer read data through UPDI. To unlock it, you must erase the device.
First, try reading the Lock Key register. Specify -U lock:r:-:h.
> avrdude -c serialupdi -b 115200 -P COM8 -p 64dd28 -U lock:r:-:h -v
Avrdude version 8.1
Copyright see https://github.com/avrdudes/avrdude/blob/main/AUTHORS
System wide configuration file is C:\Users\<USER>\AppData\Local\Arduino15\packages\DxCore\tools\avrdude\avrdude_v8.1-released\etc\avrdude.conf
Using port : COM8
Using programmer : serialupdi
Setting baud rate : 115200
AVR part : AVR64DD28
Programming modes : SPM, UPDI
Programmer type : serialupdi
Description : SerialUPDI
NVM type 2: 24-bit, word oriented write
Entering NVM programming mode
Chip silicon revision: 1.3
AVR device initialized and ready to accept instructions
Device signature = 1E 96 1B (AVR64DD28)
Reading lock memory ...
Writing 4 bytes to output file <stdout>
0x5c,0xc5,0xc5,0x5c
Leaving NVM programming mode
Avrdude done. Thank you.The Lock Key register is 4 bytes long, and its value is 0x5c,0xc5,0xc5,0x5c.
If you write a different value to the register, the device becomes locked. Here, try writing 0x00.
> avrdude -c serialupdi -b 115200 -P COM8 -p 64dd28 -U lock:w:0x00:m -v
Avrdude version 8.1
Copyright see https://github.com/avrdudes/avrdude/blob/main/AUTHORS
System wide configuration file is C:\Users\<USER>\AppData\Local\Arduino15\packages\DxCore\tools\avrdude\avrdude_v8.1-released\etc\avrdude.conf
Using port : COM8
Using programmer : serialupdi
Setting baud rate : 115200
AVR part : AVR64DD28
Programming modes : SPM, UPDI
Programmer type : serialupdi
Description : SerialUPDI
NVM type 2: 24-bit, word oriented write
Entering NVM programming mode
Chip silicon revision: 1.3
AVR device initialized and ready to accept instructions
Device signature = 1E 96 1B (AVR64DD28)
Reading 1 byte for lock from input file 0x00
in 1 section [0, 0]
Writing 1 byte (0x00) to lock, 1 byte written, 1 verified
Leaving NVM programming mode
Avrdude done. Thank you.Read the Lock Key register again.
> avrdude -c serialupdi -b 115200 -P COM8 -p 64dd28 -U lock:r:-:h -v
Avrdude version 8.1
Copyright see https://github.com/avrdudes/avrdude/blob/main/AUTHORS
System wide configuration file is C:\Users\<USER>\AppData\Local\Arduino15\packages\DxCore\tools\avrdude\avrdude_v8.1-released\etc\avrdude.conf
Using port : COM8
Using programmer : serialupdi
Setting baud rate : 115200
AVR part : AVR64DD28
Programming modes : SPM, UPDI
Programmer type : serialupdi
Description : SerialUPDI
Device is locked
NVM type 2: 24-bit, word oriented write
Entering NVM programming mode
Error: timeout waiting for device to unlock
Error: unable to enter NVM programming mode: device is locked
AVR device initialized and ready to accept instructions
Error: unable to read signature data for part AVR64DD28 (rc = -3)
Error: double check chip or use -F to override this check
Leaving NVM programming mode
Avrdude done. Thank you.Because the device is locked, the UPDI communication cannot read the device signature, and the command fails.
As the error message says, retry with the -F option.
> avrdude -c serialupdi -b 115200 -P COM8 -p 64dd28 -U lock:r:-:h -v -F
Avrdude version 8.1
Copyright see https://github.com/avrdudes/avrdude/blob/main/AUTHORS
System wide configuration file is C:\Users\<USER>\AppData\Local\Arduino15\packages\DxCore\tools\avrdude\avrdude_v8.1-released\etc\avrdude.conf
Using port : COM8
Using programmer : serialupdi
Setting baud rate : 115200
AVR part : AVR64DD28
Programming modes : SPM, UPDI
Programmer type : serialupdi
Description : SerialUPDI
Device is locked
NVM type 2: 24-bit, word oriented write
Entering NVM programming mode
Error: timeout waiting for device to unlock
Error: unable to enter NVM programming mode: device is locked
AVR device initialized and ready to accept instructions
Error: unable to read signature data for part AVR64DD28 (rc = -3)
Error: unable to read signature data (rc = -3)
Error: unable to read signature data for part AVR64DD28 (rc = -3)
Error: unable to read signature data for part AVR64DD28 (rc = -3)As the device is locked, you still cannot read the Lock Key register. To make the device readable again through UPDI, you need to erase the device. To erase the device, specify -e.
> avrdude -c serialupdi -b 115200 -P COM8 -p 64dd28 -e -v
Avrdude version 8.1
Copyright see https://github.com/avrdudes/avrdude/blob/main/AUTHORS
System wide configuration file is C:\Users\<USER>\AppData\Local\Arduino15\packages\DxCore\tools\avrdude\avrdude_v8.1-released\etc\avrdude.conf
Using port : COM8
Using programmer : serialupdi
Setting baud rate : 115200
AVR part : AVR64DD28
Programming modes : SPM, UPDI
Programmer type : serialupdi
Description : SerialUPDI
Device is locked
NVM type 2: 24-bit, word oriented write
Entering NVM programming mode
Error: timeout waiting for device to unlock
Error: unable to enter NVM programming mode: device is locked
AVR device initialized and ready to accept instructions
Error: unable to read signature data for part AVR64DD28 (rc = -3)
Unlocking the chip and trying again
Device signature = 1E 96 1B (AVR64DD28)
Leaving NVM programming mode
Avrdude done. Thank you.The error messages are confusing, but it shows "Unlocking the chip and trying again" afterward, meaning the device erase was performed and the device became readable again via UPDI.
If you read the Lock Key register again, you will see it has returned to its original value.
> avrdude -c serialupdi -b 115200 -P COM8 -p 64dd28 -U lock:r:-:h
Reading lock memory ...
Writing 4 bytes to output file <stdout>
0x5c,0xc5,0xc5,0x5c
Avrdude done. Thank you.Lock and GPIO reconfiguration of the UPDI pin
Try locking the device and switching the UPDI pin to GPIO at the same time.
Specify -U lock:w:0x00:m and -U fuse5:w:0xc9:m together.
> avrdude -c serialupdi -b 115200 -P COM8 -p 64dd28 -U lock:w:0x00:m -U fuse5:w:0xc9:m -v
Avrdude version 8.1
Copyright see https://github.com/avrdudes/avrdude/blob/main/AUTHORS
System wide configuration file is C:\Users\<USER>\AppData\Local\Arduino15\packages\DxCore\tools\avrdude\avrdude_v8.1-released\etc\avrdude.conf
Using port : COM8
Using programmer : serialupdi
Setting baud rate : 115200
AVR part : AVR64DD28
Programming modes : SPM, UPDI
Programmer type : serialupdi
Description : SerialUPDI
NVM type 2: 24-bit, word oriented write
Entering NVM programming mode
Chip silicon revision: 1.3
AVR device initialized and ready to accept instructions
Device signature = 1E 96 1B (AVR64DD28)
Processing -U lock:w:0x00:m
Reading 1 byte for lock from input file 0x00
in 1 section [0, 0]
Writing 1 byte (0x00) to lock, 1 byte written, 1 verifiedRead the Lock Key register as-is.
> avrdude -c serialupdi -b 115200 -P COM8 -p 64dd28 -U lock:r:-:h -v
Avrdude version 8.1
Copyright see https://github.com/avrdudes/avrdude/blob/main/AUTHORS
System wide configuration file is C:\Users\<USER>\AppData\Local\Arduino15\packages\DxCore\tools\avrdude\avrdude_v8.1-released\etc\avrdude.conf
Using port : COM8
Using programmer : serialupdi
Setting baud rate : 115200
AVR part : AVR64DD28
Programming modes : SPM, UPDI
Programmer type : serialupdi
Description : SerialUPDI
Error: UPDI link initialization failed
Error: initialization failed (rc = -1)
- double check the connections and try again
- use -b to set lower baud rate, e.g. -b 57600
- use -F to override this check
Leaving NVM programming mode
Avrdude done. Thank you.The UPDI link could not be established.
Press the START button and try again.
> avrdude -c serialupdi -b 115200 -P COM8 -p 64dd28 -U lock:r:-:h -v
Avrdude version 8.1
Copyright see https://github.com/avrdudes/avrdude/blob/main/AUTHORS
System wide configuration file is C:\Users\<USER>\AppData\Local\Arduino15\packages\DxCore\tools\avrdude\avrdude_v8.1-released\etc\avrdude.conf
Using port : COM8
Using programmer : serialupdi
Setting baud rate : 115200
AVR part : AVR64DD28
Programming modes : SPM, UPDI
Programmer type : serialupdi
Description : SerialUPDI
Device is locked
Device in reset status, trying to release it
NVM type 2: 24-bit, word oriented write
Entering NVM programming mode
Error: timeout waiting for device to unlock
Error: unable to enter NVM programming mode: device is locked
AVR device initialized and ready to accept instructions
Error: unable to read signature data for part AVR64DD28 (rc = -3)
Error: double check chip or use -F to override this check
Leaving NVM programming mode
Avrdude done. Thank you.The UPDI link is established, but because the device is locked, the device signature cannot be read, and the command fails.
You can recover it by specifying the -e option in the avrdude command, but alternatively, if you hold down the START button for more than 5 seconds, you can erase the device using this board alone without using the avrdude command.
After holding down the START button for more than 5 seconds, reading the Lock Key register shows that it has returned to its original value.
> avrdude -c serialupdi -b 115200 -P COM8 -p 64dd28 -U lock:r:-:h
Reading lock memory ...
Writing 4 bytes to output file <stdout>
0x5c,0xc5,0xc5,0x5c
Avrdude done. Thank you.Erasing the device does not clear the fuse settings, so the UPDI pin configuration remains unchanged.
> avrdude -c serialupdi -b 115200 -P COM8 -p 64dd28 -U fuse5:r:-:h
Reading fuse5/syscfg0 memory ...
Writing 1 byte to output file <stdout>
0xc9
Avrdude done. Thank you.To restore the UPDI pin setting, you need to write the original value back.
> avrdude -c serialupdi -b 115200 -P COM8 -p 64dd28 -U fuse5:w:0xd9:m
Reading 1 byte for fuse5/syscfg0 from input file 0xd9
Writing 1 byte (0xD9) to fuse5/syscfg0, 1 byte written, 1 verified
Avrdude done. Thank you.ATtiny1604
For ATtiny1604, the UPDI pin setting is controlled by the RSTPINCFG bits in the SYSCFG0 fuse.
Use -p t1604 to specify the device name.
Reading the fuse
To read SYSCFG0, specify -U fuse5:r:-:h.
fuse5 indicates SYSCFG0, r means read, - means standard output, and h means hexadecimal output.
> avrdude -c serialupdi -p t1604 -P COM8 -b 115200 -v -U fuse5:r:-:h
Avrdude version 8.1
Copyright see https://github.com/avrdudes/avrdude/blob/main/AUTHORS
System wide configuration file is C:\Users\<USER>\AppData\Local\Arduino15\packages\DxCore\tools\avrdude\avrdude_v8.1-released\etc\avrdude.conf
Using port : COM8
Using programmer : serialupdi
Setting baud rate : 115200
AVR part : ATtiny1604
Programming modes : SPM, UPDI
Programmer type : serialupdi
Description : SerialUPDI
NVM type 0: 16-bit, page oriented write
Entering NVM programming mode
Chip silicon revision: 0.0
AVR device initialized and ready to accept instructions
Device signature = 1E 94 25 (ATtiny1604)
Reading fuse5/syscfg0 memory ...
Writing 1 byte to output file <stdout>
0xf6
Leaving NVM programming mode
Avrdude done. Thank you.The default value of SYSCFG0 is 0xf6.
Change the UPDI pin to GPIO
Change the RSTPINCFG bits (Bit 3:2) from 1 to 0 to switch the UPDI pin to GPIO.
Use -U fuse5:w:0xf2:m to set SYSCFG0 to 0xf2. w means write, and m means immediate value.
Note that if you change the RSTPINCFG bits to 2 (SYSCFG0: 0xfa), the UPDI pin becomes the RESET pin.
> avrdude -c serialupdi -p t1604 -P COM8 -b 115200 -v -U fuse5:w:0xf2:m
Avrdude version 8.1
Copyright see https://github.com/avrdudes/avrdude/blob/main/AUTHORS
System wide configuration file is C:\Users\<USER>\AppData\Local\Arduino15\packages\DxCore\tools\avrdude\avrdude_v8.1-released\etc\avrdude.conf
Using port : COM8
Using programmer : serialupdi
Setting baud rate : 115200
AVR part : ATtiny1604
Programming modes : SPM, UPDI
Programmer type : serialupdi
Description : SerialUPDI
NVM type 0: 16-bit, page oriented write
Entering NVM programming mode
Chip silicon revision: 0.0
AVR device initialized and ready to accept instructions
Device signature = 1E 94 25 (ATtiny1604)
Reading 1 byte for fuse5/syscfg0 from input file 0xf2
in 1 section [0, 0]
Writing 1 byte (0xF2) to fuse5/syscfg0, 1 byte written, 1 verified
Leaving NVM programming mode
Avrdude done. Thank you.Reading the fuse again
Read SYSCFG0 again. Since the UPDI pin has been changed to GPIO, the UPDI link cannot be established, and the read fails.
> avrdude -c serialupdi -p t1604 -P COM8 -b 115200 -v -U fuse5:r:-:h
Avrdude version 8.1
Copyright see https://github.com/avrdudes/avrdude/blob/main/AUTHORS
System wide configuration file is C:\Users\<USER>\AppData\Local\Arduino15\packages\DxCore\tools\avrdude\avrdude_v8.1-released\etc\avrdude.conf
Using port : COM8
Using programmer : serialupdi
Setting baud rate : 115200
AVR part : ATtiny1604
Programming modes : SPM, UPDI
Programmer type : serialupdi
Description : SerialUPDI
Error: UPDI link initialization failed
Error: initialization failed (rc = -1)
- double check the connections and try again
- use -b to set lower baud rate, e.g. -b 57600
- use -F to override this check
Leaving NVM programming mode
Avrdude done. Thank you.Press START to restore the UPDI pin
Pressing the START button temporarily makes UPDI usable again. With that state, change the RSTPINCFG bits back to 1 and restore the UPDI pin.
Use -U fuse5:w:0xf6:m to set SYSCFG0 back to 0xf6.
> avrdude -c serialupdi -p t1604 -P COM8 -b 115200 -v -U fuse5:w:0xf6:m
Avrdude version 8.1
Copyright see https://github.com/avrdudes/avrdude/blob/main/AUTHORS
System wide configuration file is C:\Users\<USER>\AppData\Local\Arduino15\packages\DxCore\tools\avrdude\avrdude_v8.1-released\etc\avrdude.conf
Using port : COM8
Using programmer : serialupdi
Setting baud rate : 115200
AVR part : ATtiny1604
Programming modes : SPM, UPDI
Programmer type : serialupdi
Description : SerialUPDI
NVM type 0: 16-bit, page oriented write
Entering NVM programming mode
Chip silicon revision: 0.0
AVR device initialized and ready to accept instructions
Device signature = 1E 94 25 (ATtiny1604)
Reading 1 byte for fuse5/syscfg0 from input file 0xf6
in 1 section [0, 0]
Writing 1 byte (0xF6) to fuse5/syscfg0, 1 byte written, 1 verified
Leaving NVM programming mode
Avrdude done. Thank you.Lock / unlock
This is almost the same as AVR64DD28, so it is omitted here. Be careful about the difference in the -p option.
Also, the register for lock control is called Key Bits, and it is 1 byte.
Lock and GPIO reconfiguration of the UPDI pin
This is almost the same as AVR64DD28, so it is omitted here. Be careful about the difference in the -p option and the SYSCFG0 fuse value.
Troubleshooting
Cannot program even after HV
- Confirm that J2 is set to the Target side.
- Confirm that the programmer is set to SerialUPDI.
- Do not wait too long after pressing START before starting the programming operation.
- If the VDD indicator LEDs blink after pressing START, see “Error notification”.
Target does not start or is unstable
- Check the SW2 and SW3 settings and ensure there is no double-powering from an external source.
- Check that GND is common.
- Re-check the orientation and pin mapping of J5 and J6.
Cannot communicate with an ATtiny (J5)
- Check that the 10 kΩ pull-up resistor between UPDI_TGT and VDD_TGT has been added. See "Pull-up resistor for ATtiny (J5)".
- Check that SW2 is set to match the target voltage.
USB connection is dropped (at 3.3 V)
At 3.3 V, the USB connection may be dropped for a moment when the target power is turned on (e.g., when the START button is released). On the Rev. 3 board, it is solved by changing C2 (the output capacitor of U2) from 10 μF to 22 μF.
- The cause is presumably that the output voltage of U2 (the 3.3 V regulator) sags when an inrush current flows into the target, and the CH340K, which is powered by the same VDD, is reset (the power-on reset threshold is 2.4 to 2.8 V). The margin is small at 3.3 V.
- The datasheet of the LM1117 recommends a 10 μF output capacitor, but the datasheet of the AMS1117 recommends 22 μF (a tantalum capacitor is recommended). The effective capacitance of a ceramic capacitor is reduced by the DC bias.
- After changing C2 to 22 μF (an MLCC of 1608M size was used), the USB connection was no longer dropped at 3.3 V.
- It happened more often when the target had additional circuits such as LEDs. When the target was powered from an external source (SW3 OFF), it did not happen at the release of the START button.
- Adding a 0.1 μF decoupling capacitor between pin 7 (VCC) and GND of U1 did not make a clear difference. Turning on the target power gradually in the firmware (soft start by PWM) reduced the frequency, but it did not eliminate it.
Concern about the HV voltage
- Adjust R10, R11, and R12 so that the TP2 voltage is around 12 V (11.5 V to 12.5 V).
- Adjust D10 or D13 so that the TP3 voltage is around 7.5 V (Vdd + 2.0 V minimum, up to 8.5 V).
- For the first evaluation, use a bare chip or a minimal configuration and confirm that it works before connecting to the actual device.
Circuit description
12 V generation circuit
A TPS61040 generates the 12 V rail. The IC can switch up to 400 mA, but this design only requires roughly 20 mA, so it is configured accordingly.
In the R10, R11, and R12 divider network, the ratio of the effective resistance of R10∥R11 to R12 is tuned to be close to 8.732 (= 12 / 1.233). We used the 470 kΩ, 10 MΩ, and 51 kΩ combination because it was the closest match among the 1% resistors available.
The output voltage can be estimated with the following equation:
$$ V_{out} = 1.233 \times \left(1 + \frac{R_{top}}{R_{bottom}}\right) $$
Here, $R_{top}$ is the effective resistance of R10 and R11, and $R_{bottom}$ is R12. In practice, the divider ratio is adjusted close to 8.732 so that TP2 is about 12 V. R12 is selected from a range of 10 kΩ to 200 kΩ.
Example combinations:
| R10 | R11 | R12 | $V_{out}$ | Note |
|---|---|---|---|---|
| 390 k | 10 M | 43 k | 12.00 | E24 series |
| 470 k | 10 M | 51 k | 12.09 | E24 series |
| 680 k | 1 M | 47 k | 11.85 | E6 series |
| 680 k | 10 M | 75 k | 11.70 | E24 series |
| 680 k | - | 75 k | 12.41 | E24 series |
| 390 k | - | 43 k | 12.41 | E24 series |
| 1 M | 10 M | 100 k | 12.44 |
scripts/tps61040_resistors.py was used to calculate the resistor values.
(A script for Rev. 2 is also kept for reference: scripts/mt3608_resistors.py)
CH340K 3.3 V operation
When using CH340K at 3.3 V, the datasheet says to connect the V3 pin to the VCC pin. However, if no current is drawn from the V3 pin, it appears to work fine to connect only a 0.1 μF capacitor.
Reference: Non-Compliant Use of CH340 V3 Pin: Deep Dive for Engineers
Automatic switching between UPDI mode and serial communication mode
As described above, the UPDI section is based on the circuit from UPDI Adapter for AE-CH9102F (Rev. 3), which includes automatic mode switching using the RTS signal.
Switching is performed by taking advantage of the fact that RTS is active (low) during serial communication and inactive (high) during UPDI communication.
In general, a double-pole, double-throw (DPDT) switch is often used to switch between UPDI mode and serial communication mode. Here, the TxD line remains connected, allowing the mode to be selected with a single-pole, double-throw (SPDT) switch. Rev. 2 used a discrete-component implementation, while Rev. 3 uses a single-channel analog switch IC, 74LVC1G3157.
VDD voltage indicator
The illumination of LEDs D8 and D9 indicates the VDD voltage of the target. At 3.3 V, only D9 (green) lights up. At 5.0 V, both D8 (red) and D9 (green) light up. To reduce component count, the design uses only Zener diodes and resistors. If you change the LEDs, adjust the Zener voltage and resistor values to match the LED forward voltages; otherwise, the LEDs will not light cleanly. Another point to consider is that 3.3 V makes the LED slightly dimmer than 5.0 V.
UPDI high-voltage protection
ATtiny
The ATtiny (J5) UPDI data line receives a 12 V pulse, so it is necessary to protect the AVR Dx/Ex UPDI data line (UPDI_TGT), the ATtiny (U4) on this board, and the USB-to-serial converter chip (U1) from being exposed to that 12 V spike. At the same time, because UPDI is a bidirectional interface, the circuit must pass normal communication while blocking only the 12 V pulse.
In this design, an N-ch MOSFET (Q3) protects against the 12 V pulse. This is effectively an application of the logic level shifter using an N-ch MOSFET.
Reference: Logic Level Shifting Basics | DigiKey
In addition, D2 (or D11) and D4 are included to absorb high voltage in case Q3 fails.
AVR Dx/Ex
The AVR Dx/Ex (J6) RESET line receives a 7.5 V pulse, but outside the pulse period it only needs to receive VDD. Since communication is not required at that time, the circuit can be kept simple.
The design pulls the line up to VDD with R7 and blocks reverse current with D5.
Pull-up resistor for ATtiny (J5)
The N-ch MOSFET level shifter (Q3) requires pull-up resistors on both sides. The ATtiny side (UPDI_TINY) is pulled up by the internal pull-up of the UPDI pin of the target. On the Rev. 3 board, however, the UPDI_TGT side has no pull-up resistor. Without it, the high level of UPDI_TGT stops at about VDD - Vth of Q3 (about 4 V at 5 V) and the communication with an ATtiny becomes unreliable. (The internal pull-up of U4 was used for this purpose in the early firmware, but it pulled up the UPDI line of a 3.3 V target to 5 V, so it is no longer used.)
Add a 10 kΩ resistor between UPDI_TGT and VDD_TGT. On the Rev. 3 board, solder it between the anode of D4 (pin 2, the UPDI_TGT side) and pin 3 of Q4 (VDD_TGT).
The resistor is pulled up to VDD_TGT, not to VDD, on purpose. The line follows the voltage of the target, so it works with a 3.3 V target or a target powered from an external source, and it does not back-power the target through its protection diodes while the board does not supply power. (When pulled up to VDD, VDD_TGT was raised to about 2 V while the target power was off.)
AVR Dx/Ex (J6) works without this resistor because the target pulls up the UPDI line by itself.
High-speed serial communication (J3)
The datasheet of the CH340K recommends a 2 kΩ to 22 kΩ pull-up resistor for the RX pin of the MCU for communication above 120 kbps. The TXD pin of the CH340K is a weak-high output: its high level is held only by a built-in pull-up resistor of about 75 kΩ (and a built-in diode).
On the Rev. 3 board, add a 10 kΩ resistor between pin 1 of Q3 (VDD) and the cathode of D1 (TxD) to pull TxD up to VDD (the supply of the CH340K). With this resistor, serial communication at 2 Mbps worked and writing to U4 was not affected. Note that a current of about 0.3 to 0.4 mA with 10 kΩ flows into the RX pin of the target through its protection diode while the target is not powered. A larger resistance (up to 22 kΩ) reduces it.
Do not pull TxD up to VDD_TGT (e.g., by adding a resistor between J3 pin 4 and pin 3). In testing, it prevented writing to U4 (with J2 set to FW). The cause is presumably as follows (inferred from the datasheet and the schematic, not verified by measurement). TxD is also connected to the UPDI line through D1 and R1. While U4 is being written, VDD_TGT is 0 V because Q4 is off, so the resistor pulls the weak-high TxD down to about 0.1 × VCC, which is practically low, and D1 pulls the UPDI line down.
Issues with DxCore 1.6.2
Critical issue
The latest DxCore version at the time of writing (Sep. 2026), 1.6.2, had a critical problem that made it unusable with AVR DD-series devices. Two issues exist: one causes an error that prevents programming, and the other sets the fuse incorrectly and disables the UPDI pin.
- On 1.6.2 upload to AVR64DD14 fails with prog.py: error: unrecognized arguments · Issue #629 · SpenceKonde/DxCore
- Add missing zero-bit in SYSCFG0 for DD-chips by felias-fogg · Pull Request #638 · SpenceKonde/DxCore
If only the first issue is fixed and programming is attempted, the second issue makes UPDI programming impossible. This project (and the predecessor) was created specifically to address this issue.
If both issues are fixed, AVR DD-series devices can work with DxCore 1.6.2.
Specifically, on Windows, move to C:\Users\<USERNAME>\AppData\Local\Arduino15\packages\DxCore\hardware\megaavr\1.6.2 and change boards.txt as follows.
--- boards.txt.orig
+++ boards.txt
@@ -1209,7 +1209,7 @@
avrdd.bootloader.wdttimeotbits=0000
avrdd.bootloader.BODCFG=0b{bootloader.bodlevbits}{bootloader.bodmodebits}
avrdd.bootloader.updipinbit=1
-avrdd.bootloader.SYSCFG0=0b110{bootloader.updipinbit}{bootloader.resetpinbit}0{bootloader.eesavebit}
+avrdd.bootloader.SYSCFG0=0b110{bootloader.updipinbit}{bootloader.resetpinbit}00{bootloader.eesavebit}
avrdd.bootloader.SYSCFG1=0b000{bootloader.mviobits}{bootloader.sutbits}
avrdd.bootloader.CODESIZE=0x00
avrdd.bootloader.BOOTSIZE=0x01
@@ -1227,8 +1227,8 @@
avrdd.upload.maximum_data_size=0
# The maximum size and data size attributes are overridden by the selected chip. If you are avoiding specifying that somehow, there is no hope of anything working, so don't do that.
# Each top-level entry supports at least a dozen parts with varying memory constraints.
-avrdd.program.serupdifuse5="-Ufuse5:w:{bootloader.SYSCFG0}:m"
-avrdd.program.avrdudefuse5=5:{bootloader.SYSCFG0}
+avrdd.program.avrdudefuse5="-Ufuse5:w:{bootloader.SYSCFG0}:m"
+avrdd.program.serupdifuse5=5:{bootloader.SYSCFG0}
#----------------------------------------#This fix is overwritten when you update or reinstall DxCore via the Board Manager, so you must reapply it in those cases.
If you need new functions in DxCore 1.6.x (for example, support for AVR DU series), use this workaround until a fixed release becomes available. If you don't need those new features, using DxCore 1.5.11 is recommended.
Other issues
Besides the critical writing problem in DxCore 1.6.2, several additional issues have been found.
One of the most significant appears to be that analogReference() does not work, causing analogRead() to fail. See fix analogReference() by wke67 · Pull Request #643 · SpenceKonde/DxCore for details.
History
Rev. 3
The following changes were made in Rev. 3:
- Replaced the step-up converter from MT3608L to TPS61040. (JLCPCB's Promotional Extended part)
- Replaced the analog switch circuit from the discrete parts with the 74LVC1G3157.
Known issues:
- The UPDI_TGT side of Q3 has no pull-up resistor. Add a 10 kΩ resistor to communicate with an ATtiny. See "Pull-up resistor for ATtiny (J5)".
- At 3.3 V, the USB connection may be dropped for a moment when the target power is turned on. Change C2 from 10 μF to 22 μF. See "USB connection is dropped (at 3.3 V)".
Rev. 2
The following changes were made in Rev. 2:
- Switched the diodes, resistors, and capacitors used on the PCBA to surface-mount components.
(Through-hole parts are intended to be mounted by hand.) - Replaced the step-up converter from MC34063A to MT3608L to reduce the component count.
- Reduced the PCB size to 75%.
Finished product
License
CC0
Reference projects
Links to related projects and reference information for HV UPDI programming.
ATtiny only
There are many projects that support 12 V HV programming. The following are a few examples. (However, not many projects enforce the required timing to apply the HV pulse within the allowed time window after POR. Someone calls it Power Cycle HV (PCHV).)
- todopapa/UPDI_HV_WRITER-w-RESET: This is a new AVR ATTINY series UPDI programmer with HV pulse injection avility on power on reset timing.
- DIY Arduino Nano HV UPDI Programmer - Electronics-Lab
- UPDI HVP のための 12V を得る方法の試行 | シャポログ
- Dlloydev/Updi-Key: This DIY open source hardware connects inline with any UPDI programmer to provide a HV UPDI programming solution for tinyAVR® 0/1/2 series MCUs. Compatible with UPDI programmers that operate with jtag2updi, avrdude, pyupdi, MPLAB X IDE, MPLAB X IPE, PlatformIO and Arduino IDE using any target voltage from 3 to 5V.
- Create a 12V version of microUPDI · Issue #3 · MCUdude/microUPDI
- UPDI High-Voltage programmer -- Simple UPDI high voltage pulse generator
ATtiny / AVR Dx/Ex both supported
Others
- IMPLEMENTING UPDI FROM SCRATCH – www.CodeRancher.Us -- Detailed explanation of UPDI
Parts
63| Qty | Value | Footprint | References |
|---|---|---|---|
| 6 | 10k | Resistor_SMD:R_0603_1608Metric | R7, R8, R16, R17, R18, R19 |
| 3 | 10μ | Capacitor_SMD:C_0603_1608Metric | C1, C2, C4 |
| 3 | BAT43WS | Diode_SMD:D_SOD-323 | D1, D4, D5 |
| 3 | BSS138 | Package_TO_SOT_SMD:SOT-23 | Q3, Q6, Q8 |
| 3 | ~ | TestPoint:TestPoint_THTPad_D1.5mm_Drill0.7mm | TP1, TP2, TP3 |
| 2 | 0.1μ | Capacitor_SMD:C_0603_1608Metric | C3, C6 |
| 2 | 220 | Resistor_SMD:R_0603_1608Metric | R5, R13 |
| 2 | 470 | Resistor_SMD:R_0603_1608Metric | R1, R15 |
| 2 | 5.1k | Resistor_SMD:R_0603_1608Metric | R2, R3 |
| 2 | BSS84 | Package_TO_SOT_SMD:SOT-23 | Q5, Q7 |
| 1 | 0.5 A | Fuse:Fuse_1206_3216Metric | F1 |
| 1 | 100k | Resistor_SMD:R_0603_1608Metric | R4 |
| 1 | 10M 1% | Resistor_SMD:R_0603_1608Metric | R11 |
| 1 | 10μ | Inductor_SMD:L_1210_3225Metric | L1 |
| 1 | 10μ 25V | Capacitor_SMD:C_0805_2012Metric | C5 |
| 1 | 15k | Resistor_SMD:R_0603_1608Metric | R14 |
| 1 | 1N5819WS | Diode_SMD:D_SOD-323 | D6 |
| 1 | 3.6V | Diode_THT:D_DO-35_SOD27_P2.54mm_Vertical_CathodeUp | D12 |
| 1 | 33p | Capacitor_SMD:C_0603_1608Metric | C7 |
| 1 | 470k 1% | Resistor_SMD:R_0603_1608Metric | R10 |
| 1 | 5.6V | Diode_THT:D_DO-41_SOD81_P2.54mm_Vertical_CathodeUp | D11 |
| 1 | 51k 1% | Resistor_SMD:R_0603_1608Metric | R12 |
| 1 | 7.5V | Diode_THT:D_DO-41_SOD81_P2.54mm_Vertical_CathodeUp | D13 |
| 1 | 74LVC1G3157 | Package_TO_SOT_SMD:SOT-23-6 | U3 |
| 1 | AO3401A | Package_TO_SOT_SMD:SOT-23 | Q4 |
| 1 | ATtiny412-SS | Package_SO:SOIC-8_3.9x4.9mm_P1.27mm | U4 |
| 1 | BZT52C3V6 | Diode_SMD:D_SOD-123 | D7 |
| 1 | BZT52C5V6 | Diode_SMD:D_SOD-123 | D2 |
| 1 | BZT52C7V5 | Diode_SMD:D_SOD-123 | D10 |
| 1 | CH340K | Package_SO:SSOP-10-1EP_3.9x4.9mm_P1mm_EP2.1x3.3mm | U1 |
| 1 | HV | Connector_PinHeader_2.54mm:PinHeader_1x03_P2.54mm_Vertical | SW1 |
| 1 | KT-0805G | LED_SMD:LED_0805_2012Metric | D9 |
| 1 | LM1117GS-3.3 | Package_TO_SOT_SMD:SOT-223-3_TabPin2 | U2 |
| 1 | NCD0805R1 | LED_SMD:LED_0805_2012Metric | D8 |
| 1 | Power | Connector_PinHeader_2.54mm:PinHeader_1x03_P2.54mm_Vertical | SW3 |
| 1 | RTS / DTR | Connector_PinHeader_2.54mm:PinHeader_1x03_P2.54mm_Vertical | J4 |
| 1 | START | Button_Switch_THT:SW_PUSH_6mm | SW4 |
| 1 | TPS61040DBV | Package_TO_SOT_SMD:SOT-23-5 | U5 |
| 1 | TTL Serial | Connector_PinSocket_2.54mm:PinSocket_1x06_P2.54mm_Horizontal | J3 |
| 1 | Target | Connector_PinHeader_2.54mm:PinHeader_1x03_P2.54mm_Vertical | J2 |
| 1 | UPDI_DxEx | Connector_PinSocket_2.54mm:PinSocket_1x04_P2.54mm_Vertical | J6 |
| 1 | UPDI_FW | Connector_PinHeader_2.54mm:PinHeader_1x04_P2.54mm_Vertical | J7 |
| 1 | UPDI_TINY | Connector_PinSocket_2.54mm:PinSocket_1x03_P2.54mm_Vertical | J5 |
| 1 | USB_C_Receptacle_USB2.0_16P | Connector_USB:USB_C_Receptacle_GCT_USB4105-xx-A_16P_TopMnt_Horizontal | J1 |
| 1 | VDD | Connector_PinHeader_2.54mm:PinHeader_1x03_P2.54mm_Vertical | SW2 |
Similar boards
- 2 layers22.9 × 17.8 mm

- 4 layers100 × 100 mm

STM32Inverter
Zychlix/Inverter32
An open source, open hardware plug'n'play 3 phase motor inverter design. It
154 parts4 - 4 layers240 × 130 mm

TTF Base
dermatoid-collab/EVC_FW
Progetto hardware e firmware del sistema di controllo di un ascensore domestico a trazione (TTF) di LiftingItalia s.r.l. Quattro schede basate su STM32F446, collegate in CAN; il motore è comandato da un VFD.
420 parts - 4 layers61.3 × 61.3 mm

- 2 layers80 × 80 mm

Digital tone
barrybridges68/assorted_audio_projects
Assorted audio projects, most in working state
102 partsGPL-3.0 - 8 layers100 × 100 mm

- 4 layers97 × 105.5 mm

STARDRIVE SHIELD V1 0
themarcolab/Stardrive-Shield
With STARDRIVE SHIELD you can implement from 6 step to FOC motor control algorithms.
193 parts2 - 4 layers59.1 × 92.7 mm

Questions
How big is the PCB updi unbricker PCB?
It measures 54 × 47.5 mm and has 2 copper layers, 1.6 mm thick.
What parts does the PCB updi unbricker use?
63 parts, built around the ATTINY412-SSN, CH340K, TPS61040DBV and 74LVC1G3157. The full list of its parts is on this page, with links to each part's symbol and footprint where PCBKit's library has them.
Where can I download the PCB updi unbricker KiCad files?
From the k-takata/PCB_updi_unbricker repository on GitHub, at the commit this page was made from: the board is PCB_updi_unbricker.kicad_pcb and its schematic PCB_updi_unbricker.kicad_sch. PCBKit opens the board in the browser, with nothing to install.
Can I use the PCB updi unbricker design in my own project?
Its repository states no licence, so its author keeps all rights: ask k-takata before reusing the design.
