Micro/Leonardo using Internal RC oscillator and USB

I have my own PCB using the ATmega32U4 micro controller wired as in the Arduino Micro or Leonardo but with no external crystal/resonator. I have (whilst temporarily supplying an external clock) set the fuses to allow operation from the internal 8MHz RC oscillator. I can up load test code (sketches) to the board using the ISP connection to check it (flashing various LEDs in sequence) and all works as expected. What is NOT working is the USB connection.

To eliminate my design/PCB I am repeating all tests on a Leonardo board. This is a working board when running from its 16MHz crystal, however, I get exactly the same results as my own PCB once I try running from the internal RC.... can upload via ISP and it works... but no USB working.

Only after the first sketch is uploaded via ISP, my computer recognises the devices is connected and can display the vendor id etc. read from it. The moment I try to upload via USB, the programmer fails to find the Leonardo board... the Tx an Rx LEDs flash quickly together and the reset button does not reset it, only power off... at which point the last sketch continues to run. I have set the fuse which allows the clock to output on PortC, pin7 and an 8MHz waveform is seen. This is extremely close to 8MHz so should be fine.

Has anyone here used the USB and internal RC together? Do I need a special or modified boot loader file (.hex) ? Using the Micro one at present. Do I need to include any specific code to use the USB?

Any help would be much appreciated.

Probably not. USB needs tight timing tolerances.

KeithRB: Probably not. USB needs tight timing tolerances.

It specifically states that it can be done in the ATmega32U4 data sheet....

21.4 Crystal-less operation To reduce external components count and BOM cost, the USB module can be configured to operate in low-speed mode with internal RC oscillator as input source clock for the PLL. The internal RC oscillator is factory calibrated to satisfy the USB low speed frequency accuracy within the 0°C and +40°C temperature range. For USB full-speed operation only external crystal oscillator or external source clock can be used.

OK problem sorted. New .hex boot loader file is required to take account of the lower speed. Board now working on internal RC oscillator only. USB communication all OK.

Can you share the source for the modified bootloader? Thanks