Closed kuro68k closed 7 years ago
The A4U USB peripheral seems to be identical to the A3U one, so I can't see any issues there.
Confirmed solid 48MHz clock via CLKOUT.
usb_xmega.c:
CLK.USBCTRL = CLK_USBPSDIV_1_gc | CLK_USBSRC_PLL_gc | CLK_USBSEN_bm;
Still no joy though.
In the end I needed the -fno-jump-tables compiler option, after which it worked. I thought that was fixed in gcc, but I guess not.
I'm trying to get the minimal example for XMEGA to work on a 128 A3U. So far I imported all the code into Atmel Studio 7 and set the device type to 128A3U. I also set F_CPU and F_USB.
The code compiles but the device does not enumerate. The Windows PC can't even read the VID/PID.
The hardware is proven and works fine with the ASF USB stack. It's literally just the USB port, a voltage regulator, 16MHz crystal and the micro.
I tried setting the clock to use the 16MHz crystal and PLL to generate 48MHz for USB and 24MHz for the CPU clock, but that didn't work either.
Any ideas? Thanks.