From nobody Thu Apr 21 17:05:19 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 922221989DBA for ; Thu, 21 Apr 2022 17:05:30 +0000 (UTC) (envelope-from Axel.Rau@Chaos1.DE) Received: from mailout5.lrau.net (mailout5.lrau.net [IPv6:2a05:bec0:26:5::73]) (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-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "mailout5.lrau.net", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4KkkST4jcqz4RML for ; Thu, 21 Apr 2022 17:05:29 +0000 (UTC) (envelope-from Axel.Rau@Chaos1.DE) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=chaos1.de; s=email1; h=Content-Transfer-Encoding:Content-Type:In-Reply-To:References:To: From:Subject:Mime-Version:Date:Message-Id:Sender:Reply-To:Cc:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Id:List-Help:List-Unsubscribe:List-Subscribe: List-Post:List-Owner:List-Archive; bh=ZGvh4yy4zZXBm1xIFgzRk+ZWrUTX7rIUdZdZg2a8+Dk=; b=dGl6K+8rvcZo7FywoPBWy8MoSF WA8k6llZUXtaNQUQtAMlwtVPZiZfekfbEZ2BwiTx9S99XKiluLWqcfNLe1Wm31e8kXZUce5tW2KNP 7F6ye6sp8fG/LsoxVe5XLZLMR5uyd7shphrxqtx/PxcTuBix6HdVD62lyCtRZz/ibeBeRj/MlWHFX nqhxKJyrfgsyOhMml4JjB0f88xru6sC+QJGOtoaLpcLrYdmdj47R64wkIt9W3cVOB8zbtE4Ce8SAc yaxfwq7/hqDLcSd8YUQy8N8drjNkr/TtRACTw9d+KtA0T07wvF1dJqqardeuSZVVKbMCOeGVmCYTY Ema+j4LA==; Received: from [2a05:bec0:26:5::74] (helo=imap5.lrau.net) by mailout5.lrau.net with esmtp (Exim 4.95 (FreeBSD)) (envelope-from ) id 1nhaF6-000KFO-6j for hardware@freebsd.org; Thu, 21 Apr 2022 17:05:20 +0000 Received: from Axel.Rau@Chaos1.DE by imap5.lrau.net (Archiveopteryx 3.2.0) with esmtpsa id 1650560719-7097-6030/7/13; Thu, 21 Apr 2022 17:05:19 +0000 Message-Id: <77ae0110-0b36-8c00-c40e-efd110843f60@Chaos1.DE> Date: Thu, 21 Apr 2022 19:05:19 +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 (Macintosh; Intel Mac OS X 10.15; rv:91.0) Gecko/20100101 Thunderbird/91.8.0 Subject: [RESOLVED] Re: timeouts on USB ISP programmer Content-Language: de-DE From: Axel Rau To: hardware@freebsd.org, "hps@selasky.org tomek"@cedro.info References: <3A781DFA-1E2C-41A5-8053-C90A806244DC@Chaos1.DE> In-Reply-To: <3A781DFA-1E2C-41A5-8053-C90A806244DC@Chaos1.DE> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: quoted-printable X-Rspamd-Queue-Id: 4KkkST4jcqz4RML X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org; dkim=pass header.d=chaos1.de header.s=email1 header.b=dGl6K+8r; dmarc=none; spf=none (mx1.freebsd.org: domain of Axel.Rau@Chaos1.DE has no SPF policy when checking 2a05:bec0:26:5::73) smtp.mailfrom=Axel.Rau@Chaos1.DE X-Spamd-Result: default: False [-2.90 / 15.00]; RCVD_VIA_SMTP_AUTH(0.00)[]; ARC_NA(0.00)[]; R_DKIM_ALLOW(-0.20)[chaos1.de:s=email1]; NEURAL_HAM_MEDIUM(-1.00)[-1.000]; FROM_HAS_DN(0.00)[]; TO_DN_SOME(0.00)[]; MV_CASE(0.50)[]; NEURAL_HAM_LONG(-1.00)[-1.000]; MIME_GOOD(-0.10)[text/plain]; DMARC_NA(0.00)[Chaos1.DE]; NEURAL_HAM_SHORT(-1.00)[-1.000]; RCVD_COUNT_THREE(0.00)[3]; TO_MATCH_ENVRCPT_SOME(0.00)[]; DKIM_TRACE(0.00)[chaos1.de:+]; RCPT_COUNT_TWO(0.00)[2]; DWL_DNSWL_NONE(0.00)[chaos1.de:dkim]; MLMMJ_DEST(0.00)[hardware]; R_SPF_NA(0.00)[no SPF record]; FROM_EQ_ENVFROM(0.00)[]; MIME_TRACE(0.00)[0:+]; RCVD_TLS_LAST(0.00)[]; ASN(0.00)[asn:197071, ipnet:2a05:bec0::/29, country:DE]; MID_RHS_MATCH_FROM(0.00)[]; RCVD_IN_DNSWL_LOW(-0.10)[2a05:bec0:26:5::73:from] X-ThisMailContainsUnwantedMimeParts: N Hi Hans, Tomek, all Am 07.04.22 um 13:33 schrieb Axel Rau: > my DIAMEX-AVR-USB gets timeouts while talking to the target: > - - - With the trace, recorded by Joerg Wunsch (author of avrdude), Hans found the implementation bug in the device. He wrote to Joerg: =3D=3D=3D=3D I see from the Ellisys .png's what is wrong. The device doesn't support resetting the data-toogle (CLEAR ENDPOINT HALT) which is a mandatory USB control endpoint command. So the USB stack tries a couple of times and = then gives up and resets the device! The device is not USB.org class compliant! :-( Probably setting: sysctl hw.usb.no_cs_fail=3D1 may help. =3D=3D=3D=3D Indeed with this setting the device works perfectly: - - - root@home2l:/usr/local/home2l/share/brownies # avrdude -c stk500v2 \ -p t85 -P /dev/cuaU0 \ -U hfuse:w:init.t85.elf \ -U efuse:w:init.t85.elf \ -U eeprom:w:init.t85.elf \ -U flash:w:init.t85.elf avrdude: AVR device initialized and ready to accept instructions Reading | ################################################## | 100% 0.00s avrdude: Device signature =3D 0x1e930b (probably t85) avrdude: NOTE: "flash" memory has been specified, an erase cycle will be=20 performed To disable this feature, specify the -D option. avrdude: erasing chip avrdude: reading input file "init.t85.elf" avrdude: input file init.t85.elf auto detected as ELF avrdude: writing hfuse (1 bytes): Writing | ################################################## | 100% 0.01s avrdude: 1 bytes of hfuse written avrdude: verifying hfuse memory against init.t85.elf: avrdude: load data hfuse data from input file init.t85.elf: avrdude: input file init.t85.elf auto detected as ELF avrdude: input file init.t85.elf contains 1 bytes avrdude: reading on-chip hfuse data: Reading | ################################################## | 100% 0.00s avrdude: verifying ... avrdude: 1 bytes of hfuse verified avrdude: reading input file "init.t85.elf" avrdude: input file init.t85.elf auto detected as ELF avrdude: writing efuse (1 bytes): Writing | ################################################## | 100% 0.01s avrdude: 1 bytes of efuse written avrdude: verifying efuse memory against init.t85.elf: avrdude: load data efuse data from input file init.t85.elf: avrdude: input file init.t85.elf auto detected as ELF avrdude: input file init.t85.elf contains 1 bytes avrdude: reading on-chip efuse data: Reading | ################################################## | 100% 0.00s avrdude: verifying ... avrdude: 1 bytes of efuse verified avrdude: reading input file "init.t85.elf" avrdude: input file init.t85.elf auto detected as ELF avrdude: writing eeprom (50 bytes): Writing | ################################################## | 100% 0.07s avrdude: 50 bytes of eeprom written avrdude: verifying eeprom memory against init.t85.elf: avrdude: load data eeprom data from input file init.t85.elf: avrdude: input file init.t85.elf auto detected as ELF avrdude: input file init.t85.elf contains 50 bytes avrdude: reading on-chip eeprom data: Reading | ################################################## | 100% 0.02s avrdude: verifying ... avrdude: 50 bytes of eeprom verified avrdude: reading input file "init.t85.elf" avrdude: input file init.t85.elf auto detected as ELF avrdude: writing flash (1976 bytes): Writing | ################################################## | 100% 0.86s avrdude: 1976 bytes of flash written avrdude: verifying flash memory against init.t85.elf: avrdude: load data flash data from input file init.t85.elf: avrdude: input file init.t85.elf auto detected as ELF avrdude: input file init.t85.elf contains 1976 bytes avrdude: reading on-chip flash data: Reading | ################################################## | 100% 0.71s avrdude: verifying ... avrdude: 1976 bytes of flash verified avrdude: safemode: Fuses OK (E:FE, H:D7, L:62) avrdude done. Thank you. - - - diamex.de has been notified about the bug. Man thanks to all, who responded, especially Hans and Tomek, Axel =2D-=20 PGP-Key: CDE74120 =E2=98=80 computing @ chaos claudius