0

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:

  1. The USB port is providing 5 volt power for the micro controller.
  2. I am modifying the keyboard file of LUFA.
  3. I tested the microcontroller with small blinking program and 16MHZ crystal, and it blinks, but no luck on LUFA.
  4. 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.
JRE
  • 67,678
  • 8
  • 104
  • 179
  • What is the supply voltage of your ATmega32U4, 5V, or does it run at 3.3V? Better yet, show the schematics. – Justme Dec 25 '20 at 18:23
  • this may or may not help ... check this directory in the arduino IDE ... `arduino-1.8.12\hardware\arduino\avr\bootloaders\caterina` – jsotola Dec 25 '20 at 19:27

0 Answers0