Closed Risca closed 7 years ago
That error is fairly nonspecific, and basically means the device never answered one of the first few requests.
If your clock is running at 24MHz instead of 32MHz, you may need to change the USB clock configuration.
Try adding the option -fno-jump-tables
(see https://github.com/nonolith/USB-XMEGA/issues/5 on the repo for the predecessor of this code base). Not sure if that bug has been fixed in avr-gcc.
Hope that helps. I haven't used the xmega port in a couple of years, so that's about all I have to suggest.
I'll port my clock setup code from my LUFA experiments and see what happens. I'll check out that flag as well when I get home.
Well, what do you know: adding -fno-jump-tables
made a difference. It now enumerates correctly when I plug it in. The AVR-GCC manual says:
NOTE: The tablejump instructions use the LPM assembler instruction for access to jump tables. Always use -fno-jump-tables switch, if compiling a bootloader for devices with more than 64 KB of code memory.
Do you want me to add the flag to the example makefile and submit a pull request?
That would be great, thanks!
Hello,
Just tried your library on my atxmega128a4u chipset but couldn't get it to work. Here are my local changes:
I'm running
and had to remove the
-flto
flag (see https://gcc.gnu.org/bugzilla/show_bug.cgi?id=59396). When I plugin the board to the PC (Sabayon Linux), I get:I'm afraid I don't know where to begin to debug this problem. Could you help me out?