9.2.10.2 Programming AVR Devices with UPDI

MPLAB PICkit 5 supports using the high-voltage mechanism to activate the AVR Unified Program and Debug Interface (UPDI). On low pin count AVR devices with UPDI, the UPDI pin can be configured as GPIO or RESET by configuring the RSTPINCFG configuration bits. To do further programming, the debugger will have to use a high voltage pulse to reactivate the UPDI interface. When using the high voltage pulse, you must make sure that all circuits connected to the UPDI wire can tolerate a pulse of at least 12V.

GPIO vs. UPDI Operation:

When using a high voltage pulse to reactivate the UPDI interface, the reactivation is only temporary, but it will retain the UPDI functionality until the next reset. After the next reset, the pin will go back to the configuration as specified by the RSTPINCFG configuration bits. To have the pin configured as UPDI after a reset, the user will have to change the RSTPINCFG configuration bits back to UPDI.

It is possible to perform a debug session when the RSTPINCFG is configured to GPIO, but the pin will be temporarily configured as UPDI, and the pin will not operate as a GPIO pin.

Table 9-11. SYSCFG0 RSTPINCFG[1:0] Configuration Bits
Values Function
0x0 GPIO
0x1 UPDI
0x2 RESET
0x3 Reserved