|
|
Microchip/Atmel UPDIUPDI stands for Unified Program and Debug Interface and may be a "game changer". In many cases programming and debugging take place over a single pin, which can be used as a logic pin when not used for programming. The official programming connector is still six pin:
It is tempting to consider having a module design with a single programming pin. Even if the pin had a normal function UPDI could be activated using a 12V pulse, and the pulse could be isolated from the rest of the circuit using the series MOSFET technique if required. Based on a little searching the UPDI interface appears to be half-duplex serial, and a typical "programmer" appears to be a USB UART with a 1K resistor in series with its output then the output and input are connected together. The resistor allows the device to overrule the interface when it needs to respond. The Arduino Nano Every appears to use UPDI instead of a bootloader, though details seem vague. Apparently something needs to be sent at 1200 baud to activate the pin then it communicates at a high speed like 57600 baud (considered slow) or greater. If a long pulse is needed I would have thought a serial "break" would be the simplest solution. Information seems to be scattered around the internet, much of it in forum posts. Microchip https://microchip.my.site.com/s/article/How-to-program-an-AVR-Microcontroller my.site.com appears to be a Salesforce service. The page is disappointing as it lacks detail. Elsewhere PDI looks a lot like two-wire SPI. https://microchipsupport.force.com/s/article/AVR---Hardware-Design-Considerations-for-UPDI-pin So a pull-up if used must be at least 10K possibly greater. This would ensure that a programmer with a 1K output resistor could pull down to at least 0.5V. Adafruit https://learn.adafruit.com/adafruit-updi-friend/overview Some useful information. Note that Adafruit Seesaw is a hardware platform and framework for configuring microcontrollers as I2C peripherals. The hardware is also potentially useful as a generic breakout board. Github jtag2updi repositories https://github.com/ElTangas/jtag2updi https://github.com/SpenceKonde/jtag2updi https://github.com/Dlloydev/jtag2updi Three versions of firmware to make a UPDI programmer. The Dlloydev version seems to be the one to use. Specifically a hardware design exists supporting high voltage programming. "JTAG" refers to "jtagice mkii" protocol, the communication protocol used by a discontinued programming tool. As I understand it AVRDUDE uses this protocol to communicate with a jtag2updi programmer. Another protocol is described as "STK500" because it was used by the STK500 programmer. Basing open source tools on existing development tools has ensured a degree of interoperability. AVRDUDE https://avrdudes.github.io/avrdude/7.0/avrdude_19.html#SerialUPDI-programmer Instructions for direct UPDI
|