Date: Thu, 21 Apr 2022 19:05:19 +0200 From: Axel Rau <Axel.Rau@Chaos1.DE> To: hardware@freebsd.org, "hps@selasky.org tomek"@cedro.info Subject: [RESOLVED] Re: timeouts on USB ISP programmer Message-ID: <77ae0110-0b36-8c00-c40e-efd110843f60@Chaos1.DE> 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
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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?77ae0110-0b36-8c00-c40e-efd110843f60>