mraardvark / pyupdi

Python UPDI driver for programming "new" tinyAVR and megaAVR devices
MIT License
212 stars 73 forks source link

UPDI not OK - reinitialisation required #57

Open 2ni opened 4 years ago

2ni commented 4 years ago

Hi I'm using a CH330N as serial chip an connected rxd and txd with a 4.7k resistor as described. When communicating with the attiny3217 over pyupdi it always needs to reinitialize no matter what baud rate. The 2nd attempt always works, but it makes the process to flash quite slow. Any hints what I could try? Here the output:

INFO:phy Opening /dev/cu.wchusbserial1430 at 115200 baud
INFO:phy send 1 bytes
INFO:phy data:  : [0x0]
INFO:link STCS 0x08 to 0x03
INFO:phy send 3 bytes
INFO:phy data:  : [0x55, 0xc3, 0x8]
INFO:link STCS 0x80 to 0x02
INFO:phy send 3 bytes
INFO:phy data:  : [0x55, 0xc2, 0x80]
INFO:link LDCS from 0x00
INFO:phy send 2 bytes
INFO:phy data:  : [0x55, 0x80]
INFO:phy receive : []
INFO:link UPDI not OK - reinitialisation required
INFO:phy Sending double break
INFO:phy Opening /dev/cu.wchusbserial1430 at 115200 baud
INFO:link STCS 0x08 to 0x03
INFO:phy send 3 bytes
INFO:phy data:  : [0x55, 0xc3, 0x8]
INFO:link STCS 0x80 to 0x02
INFO:phy send 3 bytes
INFO:phy data:  : [0x55, 0xc2, 0x80]
INFO:link LDCS from 0x00
INFO:phy send 2 bytes
INFO:phy data:  : [0x55, 0x80]
INFO:phy receive : [0x40]
INFO:link UPDI init OK
...