From nobody Fri Apr 08 23:39:51 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 10CCE1A97836 for ; Fri, 8 Apr 2022 23:40:12 +0000 (UTC) (envelope-from tomek@cedro.info) Received: from mail-oi1-x22c.google.com (mail-oi1-x22c.google.com [IPv6:2607:f8b0:4864:20::22c]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "GTS CA 1D4" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4KZvqv272pz3QTS for ; Fri, 8 Apr 2022 23:40:11 +0000 (UTC) (envelope-from tomek@cedro.info) Received: by mail-oi1-x22c.google.com with SMTP id e4so10403491oif.2 for ; Fri, 08 Apr 2022 16:40:10 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cedro.info; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc:content-transfer-encoding; bh=sYgojwY5g3txC2HOqEu53Pf8kPQ+GFPxQk44oK87z5I=; b=LlOVXCdoxkKylO3bKAgYmMqXM0B8rY4dFW//BJ3oqX9F2q8h8jRcAWvx49rMxn0Egu g7s7x7UoODVleSkjhTBWZR/Rr9WzgDtJkPlmkqDP2TdC1+ZpxNPpwZx42Hgb64an9zCQ uPkAKlkv0vv1xDz0A8rJMLYg0PLgEn1lGCwIxusAvXHXZ6SSNdezq+YMSbawhztFCg5r o6HAJ0YNPoIkL4mHD+yQ9uC1K6N/v5cQ5xMRPsdmbbF0oiyKlBWuCAcpNRPLfyoGanUc bX0IxTkLR7ClW4LXhTFaMUXGsBeloS9Wei1CwjmsyJ54BcB0hjO9JxXg5XIRaYLelbUP V5qg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc:content-transfer-encoding; bh=sYgojwY5g3txC2HOqEu53Pf8kPQ+GFPxQk44oK87z5I=; b=1APOQwsn9/YuWAf8zsZuo4Zvqr638zQThfLB10M9vL66wK8QSwN2kORgFp+YN7/o8L iKFxeAG5lJntvvgyliZhdy7vuCiouTldR4KJlMBSmDHHYdgK0XRTOzrab+Q5bThnWZx5 aCN99f8pow8HM5nAVYgbwSGqGM91p+yJp0o+o82+i+k9k5k9c1O1Ql3sVfZfuyK37q5q 8+OaO6nhaQ83FMDjx8ZdcDezjtK7MAdhOagifWsF6JqwF8PY8mJO5QuMxXq9rnBZfrTo Be6b0YaBGusr9H/1gBxUhvcSNreO4wpnhmC82b8TIulPr5u39qnpy/u2LQYAlTIWrOWs u4Mw== X-Gm-Message-State: AOAM531U88PMrNhFbW/TdeYeRFVAzmDndIyAIt1YEdwktxdRvywSbSN3 FUV/iJZ3EdgYCME3UeGaBWYaZnHYcd42S/aX X-Google-Smtp-Source: ABdhPJykxMK5JrtLy+ViaZYmS11Dd/HhLrynZycXKu8qGPlGDUyc1lANqzpdnydTZumQEy1jsohJJg== X-Received: by 2002:a05:6808:318:b0:2ec:b689:dceb with SMTP id i24-20020a056808031800b002ecb689dcebmr1013578oie.103.1649461204068; Fri, 08 Apr 2022 16:40:04 -0700 (PDT) Received: from mail-oa1-f41.google.com (mail-oa1-f41.google.com. [209.85.160.41]) by smtp.gmail.com with ESMTPSA id f50-20020a9d03b5000000b005c959dd643csm9720295otf.3.2022.04.08.16.40.03 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Fri, 08 Apr 2022 16:40:03 -0700 (PDT) Received: by mail-oa1-f41.google.com with SMTP id 586e51a60fabf-deb9295679so11329848fac.6 for ; Fri, 08 Apr 2022 16:40:03 -0700 (PDT) X-Received: by 2002:a05:6870:9589:b0:dc:4640:ef89 with SMTP id k9-20020a056870958900b000dc4640ef89mr9758377oao.175.1649461203430; Fri, 08 Apr 2022 16:40:03 -0700 (PDT) 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 References: <3A781DFA-1E2C-41A5-8053-C90A806244DC@Chaos1.DE> <34a747ea-2ee5-660f-71c6-dc00d5de337f@selasky.org> <9334c4f0-3ecf-c046-420f-516e39379981@selasky.org> <976BDBEB-8B57-4541-A0B7-3F2C89498DC6@Chaos1.DE> <7190bdde-22bc-79ee-06d0-d0114a3ffbad@selasky.org> <7CDFB049-241F-4C31-A7B1-A7D6BDE6A002@Chaos1.DE> <24AA646A-698B-4D41-9668-3F9F99732D02@Chaos1.DE> <1A94816D-E3C1-4488-A5A9-784BAC68AE74@Chaos1.DE> In-Reply-To: <1A94816D-E3C1-4488-A5A9-784BAC68AE74@Chaos1.DE> From: Tomek CEDRO Date: Sat, 9 Apr 2022 01:39:51 +0200 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: timeouts on USB ISP programmer To: Axel Rau Cc: Hans Petter Selasky , hardware@freebsd.org Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Rspamd-Queue-Id: 4KZvqv272pz3QTS X-Spamd-Bar: --- Authentication-Results: mx1.freebsd.org; dkim=pass header.d=cedro.info header.s=google header.b=LlOVXCdo; dmarc=none; spf=none (mx1.freebsd.org: domain of tomek@cedro.info has no SPF policy when checking 2607:f8b0:4864:20::22c) smtp.mailfrom=tomek@cedro.info X-Spamd-Result: default: False [-3.18 / 15.00]; RCVD_VIA_SMTP_AUTH(0.00)[]; ARC_NA(0.00)[]; R_DKIM_ALLOW(-0.20)[cedro.info:s=google]; NEURAL_HAM_MEDIUM(-1.00)[-0.998]; FROM_HAS_DN(0.00)[]; RCPT_COUNT_THREE(0.00)[3]; TO_DN_SOME(0.00)[]; NEURAL_HAM_LONG(-1.00)[-1.000]; MIME_GOOD(-0.10)[text/plain]; PREVIOUSLY_DELIVERED(0.00)[hardware@freebsd.org]; DMARC_NA(0.00)[cedro.info]; RCVD_COUNT_THREE(0.00)[4]; TO_MATCH_ENVRCPT_SOME(0.00)[]; DKIM_TRACE(0.00)[cedro.info:+]; NEURAL_HAM_SHORT(-0.88)[-0.881]; RCVD_IN_DNSWL_NONE(0.00)[209.85.160.41:received,2607:f8b0:4864:20::22c:from]; MLMMJ_DEST(0.00)[hardware]; R_SPF_NA(0.00)[no SPF record]; FROM_EQ_ENVFROM(0.00)[]; MIME_TRACE(0.00)[0:+]; ASN(0.00)[asn:15169, ipnet:2607:f8b0::/32, country:US]; RCVD_TLS_ALL(0.00)[] X-ThisMailContainsUnwantedMimeParts: N On Fri, Apr 8, 2022 at 11:02 PM Axel Rau wrote: > Am 08.04.2022 um 20:39 schrieb Tomek CEDRO : > > Is it possible to disassemble your interface and take photos of the > electronics inside? We need to make sure what exact chip is inside :-) > https://www.chaos1.de/downloads/diamex_photos.tar.gz This is not an FT2232H based device this is why libftdi could not reset it = :-) What I can see is from the photo: 1. 74HC125 Quad Buffer Line Driver [1]. 2. STM32F042F6P6 ARM-Cortex-M0 MCU [2]. As stated on product website [3] this Diamex-Avr-USB supports STK500v2 and AVRISPV2 protocols. Details on internal dip switch configuration and available functions is provided in product documentation [4]. Documentation does not mention Debug, only Flashing. From the default avrdude.conf we can read that AVRISPV2 programmer also uses STK500V2 protocol. There is no VID:PID provided in STK500V2 programmer definition so there may be some autodetection mechanism implemented. Just try `avrdude -c stk500v2 -p 85 -vvv -t` :-) It also matters on how you connect to the Target AVR - is it already powered on some working board or you are connecting to a "bare" AVR? Also what is the Target i85 or t861? From the configuration of your dip switches it looks like you are providing 5V from the programmer to the Target, so you are connecting to a "bare" AVR..? Both ATtiny85 [5] and ATtiny861 [6] are up to 5.5V tolerant so it should not burn them "alone". But if you are connecting to some board with other components it is critical to first verify what is the acceptable maximum voltage that components can work with. Old electronics used 5V. New electronics use 1,8..3.3V. If you provide 5V from the programmer to the board working with 3.3V or 1.8V you can burn the board components. If you use some bigger board with its own power supply both dip-switches should be in position OFF. VCC connection from Programmer to AVR does not seem required. Here is an extract from Diamex-Avr-USB documentation [4]: Switch position for normal programming in user=E2=80=99s switching=3D both = switch OFF If voltage supply of the target is needed. For a single AVR controller only without own switching 5V are required (for example Diamex program adapter/pivot lever) 1=3Don 2=3Don General: 3.3V max. 120mA, 5V 150-500mA. Depending on which computer is used= . Switch 1 off=3D target voltage off/on, switch 2 off=3D 3.3V / on=3D5.0V. Th= e programmer doesn=E2=80=99t need a power supply from the target for the programming operation. Long story short: * Put both dip-switches to OFF if you use external board (no VCC connection required). They may stay ON if you program "bare" AVR (you need to connect VCC, SW1=3DON, SW2 OFF=3D3.3V ON=3D5V). * Try `avrdude -c stk500v2 -p 85 -vvv -t` and see of that connects to Programmer. * If programmer is connected but AVR communication problems you may slow down the STK500v2 bit clock with `-B` parameter or ISP clock with `-i` according to [4] (i.e. `-B 250` will result in 4kHz bit clock). Good luck and let us know if that works :-) Tomek [1] https://assets.nexperia.com/documents/data-sheet/74HC_HCT125.pdf [2] https://www.st.com/en/microcontrollers-microprocessors/stm32f042f6.html [3] https://www.diamex.de/dxshop/DIAMEX-USB-ISP-Programmer-Stick-fuer-AVR [4] https://www.diamex.de/dxshop/mediafiles/Sonstiges/ENG%20ISP%20Programme= r.pdf [5] https://ww1.microchip.com/downloads/en/DeviceDoc/Atmel-2586-AVR-8-bit-M= icrocontroller-ATtiny25-ATtiny45-ATtiny85_Datasheet-Summary.pdf [6] https://ww1.microchip.com/downloads/en/DeviceDoc/Atmel-2588-8-bit-AVR-M= icrocontrollers-tinyAVR-ATtiny261-ATtiny461-ATtiny861_Datasheet-Summary.pdf --=20 CeDeROM, SQ7MHZ, http://www.tomek.cedro.info