Does anyone know how to configure the Atmega32u4 to run using an external 8MHz oscillator ?
I needs to still be responsive to the Arduino IDE
See §28.2 in Atmel-7766-8-bit-AVR-ATmega16U4-32U4_Datasheet.pdf, which explains usage of various fuse bits.
Also see engbedded.com/fusecalc, which lets you easily figure out fuse settings. Fusecalc also tells you the strings to use as part of avrdude command strings.
Once you know the fuse settings, send them to your device via a command like
avrdude -p m32u4 -c usbasp -u -U lfuse:w:0xEF:m -U hfuse:w:0xD5:m -U efuse:w:0x07:m
avrdude -p m32u4 -P $port -c arduino -u -U lfuse:w:0xEF:m -U hfuse:w:0xD5:m -U efuse:w:0x07:m
$port represents a port name like
Note, it makes sense to read the fuses first, and put the readings into Fusecalc to see what they correspond to. You can read the fuses via a command like
avrdude -p m32u4 -P $port -c arduino -U hfuse:r:-:i