I have tried implementing a design involving AT90usb646 about four times but in each case the board gets connected and immediately disconnects . lsusb outputs that an Atmel Corp device has been connected so I know that the board is working but it gets disconnected before I can do anything with it . I usually fabricate it with Oshpark and have had no troubles whatsoever but this time I tried etching the PCB at home since this is a hobby project and I wanted to try out things rather quickly . The boards are two layered and I followed every guideline for laying out the USB portion namely keeping the tracks small and components close , calculating the trace width with impedance calculators , not breaking the ground pour underneath the usb data lines and keeping the VBUS and Ground pour away from the usb data lines to prevent noise. This is the image [![enter image description here]] The data sheet from Microchip for AT90USB646 suggests a couple of caps for VBUS and UCAP and I have placed them accordingly . I have rechecked everything and also cross-checked with Teensy ++ which uses AT90USB1286 which is similar to AT90USB646 but can't figure out what it is I'm doing wrong. Here's the schematic
This chip uses full-speed USB mode. In this mode there is absolutely no reason to split hairs about 90-Ohm differential impedance, especially on traces that are few mm long. Any trace will work just fine. And cables will make no difference.
Since the device initially connects (half-way maybe) and descriptors were read by the host, it likely means that the device system frequency is out of whack. Initial control transfers use relatively short packets, so, even if the USB frequency is off by several percent, the GET_DESCRIPTOR will be fine. However, longer packets might run out of host receiver flexibility. Fix your clock, and everything will be fine.
BTW, the ground wire at the connector is unreasonably skinny.