From nobody Thu Apr 7 12:12:34 2022 X-Original-To: hardware@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 1DA781A95723 for ; Thu, 7 Apr 2022 12:12:37 +0000 (UTC) (envelope-from hps@selasky.org) Received: from mail.turbocat.net (turbocat.net [IPv6:2a01:4f8:c17:6c4b::2]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4KZ0d03KH1z3Gvf for ; Thu, 7 Apr 2022 12:12:36 +0000 (UTC) (envelope-from hps@selasky.org) Received: from [10.36.2.165] (unknown [178.17.145.105]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mail.turbocat.net (Postfix) with ESMTPSA id 376F42601AC; Thu, 7 Apr 2022 14:12:35 +0200 (CEST) Message-ID: <34a747ea-2ee5-660f-71c6-dc00d5de337f@selasky.org> Date: Thu, 7 Apr 2022 14:12:34 +0200 List-Id: General discussion of FreeBSD hardware List-Archive: https://lists.freebsd.org/archives/freebsd-hardware List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-hardware@freebsd.org MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:91.0) Gecko/20100101 Thunderbird/91.8.0 Subject: Re: timeouts on USB ISP programmer Content-Language: en-US To: Axel Rau , hardware@freebsd.org References: <3A781DFA-1E2C-41A5-8053-C90A806244DC@Chaos1.DE> From: Hans Petter Selasky In-Reply-To: <3A781DFA-1E2C-41A5-8053-C90A806244DC@Chaos1.DE> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Rspamd-Queue-Id: 4KZ0d03KH1z3Gvf X-Spamd-Bar: --- Authentication-Results: mx1.freebsd.org; dkim=none; dmarc=none; spf=pass (mx1.freebsd.org: domain of hps@selasky.org designates 2a01:4f8:c17:6c4b::2 as permitted sender) smtp.mailfrom=hps@selasky.org X-Spamd-Result: default: False [-3.28 / 15.00]; ARC_NA(0.00)[]; RCVD_VIA_SMTP_AUTH(0.00)[]; MID_RHS_MATCH_FROM(0.00)[]; FROM_HAS_DN(0.00)[]; TO_DN_SOME(0.00)[]; R_SPF_ALLOW(-0.20)[+a:mail.turbocat.net:c]; NEURAL_HAM_LONG(-1.00)[-1.000]; MIME_GOOD(-0.10)[text/plain]; DMARC_NA(0.00)[selasky.org]; NEURAL_HAM_MEDIUM(-1.00)[-1.000]; TO_MATCH_ENVRCPT_SOME(0.00)[]; NEURAL_HAM_SHORT(-0.98)[-0.982]; RCPT_COUNT_TWO(0.00)[2]; MLMMJ_DEST(0.00)[hardware]; FROM_EQ_ENVFROM(0.00)[]; R_DKIM_NA(0.00)[]; MIME_TRACE(0.00)[0:+]; ASN(0.00)[asn:24940, ipnet:2a01:4f8::/32, country:DE]; RCVD_COUNT_TWO(0.00)[2]; RCVD_TLS_ALL(0.00)[] X-ThisMailContainsUnwantedMimeParts: N 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: at usbus0, cfg=0 md=HOST spd=LOW (1.5Mbps) pwr=ON (100mA) > ugen0.3: at usbus0, cfg=0 md=HOST spd=LOW (1.5Mbps) pwr=ON (100mA) > ugen0.4: at usbus0, cfg=0 md=HOST spd=FULL (12Mbps) pwr=ON (500mA) > root@home2l:/ # usbconfig -d ugen0.4 dump_device_desc > ugen0.4: at usbus0, cfg=0 md=HOST spd=FULL (12Mbps) pwr=ON (500mA) > > bLength = 0x0012 > bDescriptorType = 0x0001 > bcdUSB = 0x0200 > bDeviceClass = 0x0002 > bDeviceSubClass = 0x0000 > bDeviceProtocol = 0x0000 > bMaxPacketSize0 = 0x0040 > idVendor = 0x16c0 > idProduct = 0x2a9b > bcdDevice = 0x4340 > iManufacturer = 0x0001 > iProduct = 0x0002 > 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