I have an Atmega32u4 micro controller with minimum hardware design. It has an embedded USB compatibility which can be enable/used with some software like LUFA.
Everything works fine (the computer detects the device as I defined in descriptor file and makefile) with 8MHz, setting in the makefile line 83:
F_CPU = 8000000
I also set the fuse bit settings of the microcontroller to use the internal 8MHz clock.
When I use a 16MHz crystal and set the low fuse bit to 111 (datasheet page 30) to use the 16MHz oscillation, and change the F_CPU line of the makefile to 16000000, the computer doesn't recognize the USB anymore.
I didn't disconnect from the microcontroller. I can change the setting back, so I assumed there is something that I should change in the code of LUFA. Is there anywhere else to modify the code to use 16MHz crystal?
PS:
- The USB port is providing 5 volt power for the micro controller.
- I am modifying the keyboard file of LUFA.
- I tested the microcontroller with small blinking program and 16MHZ crystal, and it blinks, but no luck on LUFA.
- I uploaded the Arduino Leonardo bootloader(which works fine with 16MHz) to the chip, and it works perfectly, but I don't like to use Arduino code.