mraardvark / pyupdi

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

Raspberry Pi UPDI initialisation failed #38

Open jgmeinen opened 4 years ago

jgmeinen commented 4 years ago

I use a Raspberry PI without a Resistor between RX and TX and a level converter between ATmega4809 and the Raspberry.

I got this output:

python3 pyupdi.py -d mega4809 -c /dev/ttyAMA0 -fr -v INFO:phy Opening /dev/ttyAMA0 at 115200 baud INFO:phy send : [0x0] INFO:link STCS to 0x03 INFO:phy send : [0x55, 0xc3, 0x8] INFO:link STCS to 0x02 INFO:phy send : [0x55, 0xc2, 0x80] INFO:link LDCS from 0x00 INFO:phy send : [0x55, 0x80] INFO:phy receive : [] INFO:link UPDI not OK - reinitialisation required INFO:phy Sending double break INFO:phy Opening /dev/ttyAMA0 at 115200 baud INFO:link STCS to 0x03 INFO:phy send : [0x55, 0xc3, 0x8] INFO:link STCS to 0x02 INFO:phy send : [0x55, 0xc2, 0x80] INFO:link LDCS from 0x00 INFO:phy send : [0x55, 0x80] INFO:phy receive : [] INFO:link UPDI not OK - reinitialisation required Traceback (most recent call last): File "pyupdi.py", line 178, in _main() File "pyupdi.py", line 95, in _main device=Device(args.device)) File "/home/pi/piupdi/pyupdi/updi/nvm.py", line 17, in init self.application = UpdiApplication(comport, baud, device) File "/home/pi/piupdi/pyupdi/updi/application.py", line 17, in init self.datalink = UpdiDatalink(comport, baud) File "/home/pi/piupdi/pyupdi/updi/link.py", line 31, in init raise Exception("UPDI initialisation failed") Exception: UPDI initialisation failed INFO:phy Closing /dev/ttyAMA0

I checked the level with a scope, they are correct on the Raspberry Pi side and on the AVR side. Do you have any advice to get further?

becky001 commented 4 years ago

Hi, I built a UPDI programmer based on Raspi Zero W running PYUPDI. I am using it for Attiny814. You can see it on my fork. Hope that helps.