From nobody Fri Apr 8 09:08:54 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 34BB21A9048B for ; Fri, 8 Apr 2022 09:09:00 +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 4KZXVg34HBz4XQC for ; Fri, 8 Apr 2022 09:08:59 +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=References:To:Cc:In-Reply-To:Date:Subject:Mime-Version: Content-Type:Message-Id:From:Sender:Reply-To:Content-Transfer-Encoding: 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=6hRI8QzRyEgVK7A2CRqkZWgXhhRxlBub73XmY9iw+18=; b=B4xwpGF+S/Af3NqB+dDyn9ueEc 4uvkgZU+QnHM65Zq/V3U4CrWNmPcQZxT2khG5sTaFbHeOtRaL0TQuAdv1aX/Pyz8cmH5n4d31cTD8 /DqkioRvbWrCxFFdglIIK+O+Z22SxvnKPEsKInVOfGaAueXFaEX5+IrJbCvJc7tfFzKEwo+HxKpyG zeZEFK4w94c+pL68myeflFblWBpSspAQR1YT/P2lwVXlccwOFdVxANYiLnFMgkTw2SdCeUN5EdEuK E/F4Zb4FzLBYhS1/Di6cxYa2QFs+VNcAqqWtSoH3zEsJ3RwQjX84Ak353VHqod78ZgThpQa2I9ES2 uNMIUovw==; Received: from [2a05:bec0:26:5::74] (helo=imap5.lrau.net) by mailout5.lrau.net with esmtp (Exim 4.95 (FreeBSD)) (envelope-from ) id 1nckbx-00012O-6y; Fri, 08 Apr 2022 09:08:57 +0000 Received: from Axel.Rau@chaos1.de by imap5.lrau.net (Archiveopteryx 3.2.0) with esmtpsa id 1649408935-28869-26670/7/2; Fri, 8 Apr 2022 09:08:55 +0000 From: Axel Rau Message-Id: <7CDFB049-241F-4C31-A7B1-A7D6BDE6A002@Chaos1.DE> Content-Type: multipart/alternative; boundary="Apple-Mail=_7BBA6BB0-F921-4DEE-81A2-A127D725402A" 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 Subject: Re: timeouts on USB ISP programmer Date: Fri, 8 Apr 2022 11:08:54 +0200 In-Reply-To: Cc: hardware@freebsd.org, Hans Petter Selasky To: Tomek CEDRO 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> X-Mailer: Apple Mail (2.3608.120.23.2.7) X-Rspamd-Queue-Id: 4KZXVg34HBz4XQC X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org; dkim=pass header.d=chaos1.de header.s=email1 header.b=B4xwpGF+; 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.81 / 15.00]; RCVD_VIA_SMTP_AUTH(0.00)[]; ARC_NA(0.00)[]; R_DKIM_ALLOW(-0.20)[chaos1.de:s=email1]; RCVD_IN_DNSWL_LOW(-0.10)[2a05:bec0:26:5::73:from]; FROM_HAS_DN(0.00)[]; RCPT_COUNT_THREE(0.00)[3]; MV_CASE(0.50)[]; NEURAL_HAM_LONG(-1.00)[-1.000]; MIME_GOOD(-0.10)[multipart/alternative,text/plain]; DMARC_NA(0.00)[chaos1.de]; NEURAL_HAM_MEDIUM(-0.91)[-0.912]; TO_DN_SOME(0.00)[]; RCVD_COUNT_THREE(0.00)[3]; TO_MATCH_ENVRCPT_SOME(0.00)[]; DKIM_TRACE(0.00)[chaos1.de:+]; NEURAL_HAM_SHORT(-1.00)[-0.997]; MLMMJ_DEST(0.00)[hardware]; R_SPF_NA(0.00)[no SPF record]; FROM_EQ_ENVFROM(0.00)[]; MIME_TRACE(0.00)[0:+,1:+,2:~]; RCVD_TLS_LAST(0.00)[]; ASN(0.00)[asn:197071, ipnet:2a05:bec0::/29, country:DE]; MID_RHS_MATCH_FROM(0.00)[]; DWL_DNSWL_NONE(0.00)[chaos1.de:dkim] X-ThisMailContainsUnwantedMimeParts: N --Apple-Mail=_7BBA6BB0-F921-4DEE-81A2-A127D725402A Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=utf-8 Hi Tomek, > Am 08.04.2022 um 05:33 schrieb Tomek CEDRO : >=20 > Mystery solved ;-) >=20 > For avrdude `-P` parameter defines the the programmer port __BUT__ (as > obviously stated in man page) if you use `usb:` device then you need > to provide programmer SERIAL NUMBER last bytes not the OS serial port > device ;-) I have no such serial number on the outside of my DIAMEX-ISP-USB. )-: All I have is this: root@home2l:/ # usbconfig -d 0.4 dump_device_desc ugen0.4: at usbus0, cfg=3D0 md=3DHOST spd=3DFULL = (12Mbps) pwr=3DON (500mA) bLength =3D 0x0012=20 bDescriptorType =3D 0x0001=20 bcdUSB =3D 0x0200=20 bDeviceClass =3D 0x0002 bDeviceSubClass =3D 0x0000=20 bDeviceProtocol =3D 0x0000=20 bMaxPacketSize0 =3D 0x0040=20 idVendor =3D 0x16c0=20 idProduct =3D 0x2a9b=20 bcdDevice =3D 0x4340=20 iManufacturer =3D 0x0001 iProduct =3D 0x0002 iSerialNumber =3D 0x0003 <19331-49101-552> bNumConfigurations =3D 0x0001=20 Would it help to create a section for programmer diamex-isp-usb ? >=20 > If you run avrdude with `-vvv` switch then you get increased > verbosity. It will tell you what it found. You will notice that it > found a device that matches VID:PID pair but not Serial NUMBER of the > device (not the port) ;-) >=20 > Details here: https://github.com/avrdudes/avrdude/issues/920 >=20 All I got with -vvv: avrdude: usbdev_open(): did not find any (matching) USB device "usb:552" = (0x03eb:0x2104) avrdude: usbdev_open(): did not find any (matching) USB device "usb:0552"= (0x03eb:0x2104) avrdude: usbdev_open(): did not find any (matching) USB device "usb:0003"= (0x03eb:0x2104) avrdude: usbdev_open(): did not find any (matching) USB device "usb:1552"= (0x03eb:0x2104) I=E2=80=99m still not convinced that this stick does real USB mode = (instead of serial emulation via ftdi. I=E2=80=99m willing to buy a quality programmer from ATmel to move on. Any recommendations? Please advice. All I currently need, is burning/flashing/fusing ATtinys: avrdude -c stk500v2 -p t861 -P /dev/ttyU1 \ -U hfuse:w:init.t861.elf \ -U efuse:w:init.t861.elf \ -U eeprom:w:init.t861.elf \ -U flash:w:init.t861.elf But debugging support would be helpful in the future. Sorry, I'm a newbie in the MCU business. Thank you so much for all the time you did spend to help me, Axel =2D-- =2D-- PGP-Key: CDE74120 =E2=98=80 computing @ chaos claudius --Apple-Mail=_7BBA6BB0-F921-4DEE-81A2-A127D725402A Content-Transfer-Encoding: quoted-printable Content-Type: text/html; charset=utf-8 Hi Tomek,

Am 08.04.2022 um 05:33 schrieb Tomek CEDRO <tomek@cedro.info>:

Myste= ry solved ;-)

For avrdude `-P` parameter = defines the the programmer port __BUT__ (as
obviously = stated in man page) if you use `usb:` device then you need
= to provide programmer SERIAL NUMBER last bytes not the OS serial port
device ;-)
I have no = such serial number on the outside of my DIAMEX-ISP-USB. )-:
All= I have is this:

root@home2l:/ # usbconfig -d 0.4 dump_device_desc
ugen0.4: <ERFOS AVR-ISP2> at usbus0, cfg=3D0 md=3DHOST = spd=3DFULL (12Mbps) pwr=3DON (500mA)

  bLength =3D = 0x0012 
  bDescriptorType =3D = 0x0001 
  bcdUSB =3D 0x0200 
  bDeviceClass =3D 0x0002  <Communication = device>
  bDeviceSubClass =3D 0x0000 
  bDeviceProtocol =3D 0x0000 
  bMaxPacketSize0 =3D 0x0040 
  idVendor =3D 0x16c0 
  = idProduct =3D 0x2a9b 
  bcdDevice = =3D 0x4340 
  iManufacturer =3D 0x0001&nb= sp; <ERFOS>
  iProduct =3D 0x0002  = <AVR-ISP2>
  iSerialNumber =3D 0x0003&nb= sp; <19331-49101-552>
  bNumConfigura= tions =3D 0x0001 

Would it help to create a section for programmer = diamex-isp-usb ?
<= div class=3D"">

If you run avrdude with = `-vvv` switch then you get increased
verbosity. It will = tell you what it found. You will notice that it
found a = device that matches VID:PID pair but not Serial NUMBER of the
device (not the port) ;-)

Details= here: https://github.com/avrdudes/avrdude/issues/920


All I got with -vvv:

avrdude: usbdev_open(): did not find any (matching) USB = device "usb:552" (0x03eb:0x2104)
avrdude: = usbdev_open(): did not find any (matching) USB device "usb:0552" = (0x03eb:0x2104)
avrdude: usbdev_open():= did not find any (matching) USB device "usb:0003" (0x03eb:0x2104)
<= div style=3D"margin: 0px; font-stretch: normal; font-size: 11px; = line-height: normal; font-family: Monaco; background-color: rgb(255, = 255, 255);" class=3D"">avrdude: usbdev_open(): did not find any (matching) = USB device "usb:1552" (0x03eb:0x2104)

I=E2=80=99m still not convinced that = this stick does real USB mode (instead of serial emulation via ftdi.=

I=E2=80=99m willing to buy a = quality programmer from ATmel to move on.
Any recommendations?<= /div>
Please advice.

All I = currently need, is burning/flashing/fusing ATtinys:

 avrdude -c stk500v2 -p t861 -P /dev/ttyU= 1 \
    -U hfuse:w:init.t861.elf \
  =   -U efuse:w:init.t861.elf \
    -U eeprom:w:ini= t.t861.elf \
    -U flash:w:init.t861.elf

But debugging support would = be helpful in the future.

Sorry, I'm = a newbie in the MCU business.

Thank = you so much for all the time you did spend to help me,
Axel


---=
---
PGP-Key: CDE74120  =E2=98=80 =  computing @ chaos claudius

--Apple-Mail=_7BBA6BB0-F921-4DEE-81A2-A127D725402A--