Update: changed ATmega4809 to AVR128DA28
The other day I was sorting through some ideas for interfacing an R-Pi to an AVR so it could program. That got me thinking about UPDI; I have been looking at ElTangas/jtag2updi and mraardvark/pyupdi.
I have decided to try pyupdi with an R-Pi; I will have the R-Pi enable some buffers depending on if I want a standard UART or UPDI.
Part labels: K38 is NMOS BSS138, K84 is PMOS BSS84, DMB is PMOS DMP3098L, Z4 is buffer 74LVC2G07.
The 74LVC2G07 is a buffer with IOFF; it is Hi-Z when its power is off (both input and output). So, in theory, I can power the +5V (the SMPS is optional), and that will run the AVR. I can push the button to start (and latch) the R-Pi power; then I can do programming (or whatever). I can also halt (shutdown) the R-Pi with the other switch and then kill the power to clear the R-Pi power latch. It is a bit hacky.
For programming, I plan to have a Makefile set the R-Pi BCM24 pin before running pyupdi and then clear it after. When other programs connect to the serial, they are attached to the UART on PA0 and PA1.