Date: Thu, 7 Apr 2022 14:12:34 +0200 From: Hans Petter Selasky <hps@selasky.org> To: Axel Rau <Axel.Rau@chaos1.de>, hardware@freebsd.org Subject: Re: timeouts on USB ISP programmer Message-ID: <34a747ea-2ee5-660f-71c6-dc00d5de337f@selasky.org> In-Reply-To: <3A781DFA-1E2C-41A5-8053-C90A806244DC@Chaos1.DE> References: <3A781DFA-1E2C-41A5-8053-C90A806244DC@Chaos1.DE>
next in thread | previous in thread | raw e-mail | index | archive | help
On 4/7/22 13:33, Axel Rau wrote: > Hi all, > > my DIAMEX-AVR-USB gets timeouts while talking to the target: > - - - > root@home2l:/ # avrdude -c stk500v2 -p t85 -P /dev/cuau1 -t -v -i 10 > > avrdude: Version 6.4 > Copyright (c) Brian Dean, http://www.bdmicro.com/ > Copyright (c) Joerg Wunsch > > System wide configuration file is "/usr/local/etc/avrdude.conf" > User configuration file is "/root/.avrduderc" > User configuration file does not exist or is not a regular file, skipping > > Using Port : /dev/cuau1 > Using Programmer : stk500v2 > Setting isp clock delay : 10 > avrdude: stk500v2_ReceiveMessage(): timeout > avrdude: stk500v2_ReceiveMessage(): timeout > avrdude: stk500v2_ReceiveMessage(): timeout > avrdude: stk500v2_ReceiveMessage(): timeout > avrdude: stk500v2_ReceiveMessage(): timeout > avrdude: stk500v2_ReceiveMessage(): timeout > avrdude: stk500v2_getsync(): timeout communicating with programmer > AVR Part : ATtiny85 > Chip Erase delay : 4500 us > PAGEL : P00 > BS2 : P00 > RESET disposition : possible i/o > RETRY pulse : SCK > serial program mode : yes > parallel program mode : yes > Timeout : 200 > StabDelay : 100 > CmdexeDelay : 25 > SyncLoops : 32 > ByteDelay : 0 > PollIndex : 3 > PollValue : 0x53 > Memory Detail : > > Block Poll Page Polled > Memory Type Mode Delay Size Indx Paged Size Size #Pages MinW MaxW ReadBack > ----------- ---- ----- ----- ---- ------ ------ ---- ------ ----- ----- --------- > eeprom 65 6 4 0 no 512 4 0 4000 4500 0xff 0xff > flash 65 6 32 0 yes 8192 64 128 4500 4500 0xff 0xff > signature 0 0 0 0 no 3 1 0 0 0 0x00 0x00 > lock 0 0 0 0 no 1 1 0 9000 9000 0x00 0x00 > lfuse 0 0 0 0 no 1 1 0 9000 9000 0x00 0x00 > hfuse 0 0 0 0 no 1 1 0 9000 9000 0x00 0x00 > efuse 0 0 0 0 no 1 1 0 9000 9000 0x00 0x00 > calibration 0 0 0 0 no 1 1 0 0 0 0x00 0x00 > > Programmer Type : STK500V2 > Description : Atmel STK500 Version 2.x firmware > Programmer Model: Unknown > avrdude: stk500v2_ReceiveMessage(): timeout > . . . > avrdude: stk500v2_getsync(): timeout communicating with programmer > avrdude: stk500v2_command(): failed miserably to execute command 0x11 > avrdude: stk500v2_disable(): failed to leave programming mode > > root@home2l:/ # usbconfig > ugen0.1: <0x8086 XHCI root HUB> at usbus0, cfg=0 md=HOST spd=SUPER (5.0Gbps) pwr=SAVE (0mA) > ugen0.2: <vendor 0x046a product 0x0023> at usbus0, cfg=0 md=HOST spd=LOW (1.5Mbps) pwr=ON (100mA) > ugen0.3: <Logitech USB Optical Mouse> at usbus0, cfg=0 md=HOST spd=LOW (1.5Mbps) pwr=ON (100mA) > ugen0.4: <ERFOS AVR-ISP2> at usbus0, cfg=0 md=HOST spd=FULL (12Mbps) pwr=ON (500mA) > root@home2l:/ # usbconfig -d ugen0.4 dump_device_desc > ugen0.4: <ERFOS AVR-ISP2> at usbus0, cfg=0 md=HOST spd=FULL (12Mbps) pwr=ON (500mA) > > bLength = 0x0012 > bDescriptorType = 0x0001 > bcdUSB = 0x0200 > bDeviceClass = 0x0002 <Communication device> > bDeviceSubClass = 0x0000 > bDeviceProtocol = 0x0000 > bMaxPacketSize0 = 0x0040 > idVendor = 0x16c0 > idProduct = 0x2a9b > bcdDevice = 0x4340 > iManufacturer = 0x0001 <ERFOS> > iProduct = 0x0002 <AVR-ISP2> > iSerialNumber = 0x0003 <19331-49101-552> > bNumConfigurations = 0x0001 > - - - > > Loading uftdi.ko did not help. > Try: usbdump -i usbus0 -f 4 -s 65536 -vvv To see exactly what is going on. Maybe some other kernel driver is attached at the same time, consuming the response from the programmer. BTW: /dev/cuau1 is not a USB port! Maybe try: /dev/cuaU1 --HPS
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?34a747ea-2ee5-660f-71c6-dc00d5de337f>