microchip-pic-avr-tools / pymcuprog

a Python utility for programming various Microchip MCU devices using Microchip CMSIS-DAP based debuggers
MIT License
96 stars 22 forks source link

Suggestion to use a switch in the circuit #14

Open paulskirk53 opened 2 years ago

paulskirk53 commented 2 years ago

I have used the circuit here which is a simple modification to the pymcuprog UPDI diagram. You can use an FTDI device as a programming conduit as well as a serial comms device. I've tested this on my AVR4809. Do serial comms in one switch position and program the chip using pymcuprog in the other position. Hope it helps.

Voncky commented 2 years ago

Hello,

I found following solution working well in application in which you would like to use FTDI chip for both programming and UART communication. It consists of smart circuit utilizing RTS signal which I tested is being switched at the beginning of programming cycle. This signal is being used to control a relay which re-routes RxD, TxD and UPDI signals. With this solution I can connect via UART immediately just after programming cycle is finished. It works well in my case - maybe just because by simple coincidence. It works at least with current version of both pymcuprog as well as pyupdi. I hope authors of both programming scripts will not change this behavior in near future :). I hope you can find it working as well :). updi_FT232_with_switch