Is Atmel-START for real? - Page 1
Forum section: electronics / general

author: uncle bit
author_rank: Contributor
timestamp: September 30, 2018, 01:57:55 pm
content: Hello,I'm fighting against Atmel-START and ASF4, trying to setup a simple MSC USB host functionality on a SAMD51J19.The official ASF4 documentation is, IMHO, almost useless, because it barely lists some defines, structures and functions, without clarifying what has to be manually typed in by the user, and what is already included by START.There is some example code, but it seems to refer to the old ASF3 library, showing names and concepts that I don't recognize in any of the automatically generated files.I would like to use ASF3 (totally visible code) instead of ASF4 (hidden code), but Microchip doesn't support it on the SAMx51 family.Anyway, I successfully registered the handler and the callback functions, started the USB stack, and powered the bus, but when I plug a memory device, it doesn't trigger any response.I hope that the USB circuit is alive and clocked, since START shows 48 MHz from one of the PLLs and doesn't report any configuration error.Can anyone point me toward a working ASF4 example?

author: JPortici
author_rank: Super Contributor
timestamp: September 30, 2018, 02:59:32 pm
content: I am fighting a lot against usb host library for PIC32MK. the only example available for usb host (after two years and some months) is the MSD library.I tried that and of course none of the memory devices work.I then enabled the debug trace to one of the uarts (the USB stack will report its status on the debug trace, if enabled) and that, combined with usbslyzer on windows confirmed what others were telling me. The problem was in all the memory sticks i used, because none of them had a compatible descriptor. Apparently, MSD is really a mess because the devices have different descriptors for the same thing.. and you have to support all the possible variants.One of the memory sticks i have reports several descriptors with all zeros, the last one having the meaningful data. And the embedded stack was programmed to be able to list only so many.

author: uncle bit
author_rank: Contributor
timestamp: October 01, 2018, 07:06:47 am
content: I'm afraid I'm stuck at an early stage of the protocol: I don't get in touch with any device, or at least I don't receive a callback stating that a USB device is electrically plugged in and reachable.AFAIK, the USB host circuit recognizes a connection when the USB device pulls or pushes one of the data lines to a certain logic level, different from the default idle condition.After such a "first contact", the USB protocol goes ahead with some data exchange, where host and device must be in tune each other about what to ask and what to expect back as a suitable answer.Am I the only unlucky guy who picked up a so messy and poorly supported combination?

author: JPortici
author_rank: Super Contributor
timestamp: October 01, 2018, 07:41:16 am
content: Well i am, but for another targetI don't know, if i was not clear before i would suggest you look at the code to see if a software trace is implemented, enable it and see what happens..Maybe try to contact user ataradov as he is the local ATSAM expert?

author: technix
author_rank: Super Contributor
timestamp: October 05, 2018, 02:39:49 am
content: Why do I have the gut feeling that this might be a point people would start double thinking their choice of libraries...? I kind of hope the libusb_stm32 library can be ported to Atmel chips.