I am using an Arduino Pro Micro (basically a Leonardo in a smaller form factor) in a mobile application where power consumption is really important.
To reduce power consumption, I put the Arduino to sleep, but that disconnects USB. That's not really acceptable in this application, since reconnecting USB after the Arduino wakes takes pretty long (a second or two).
Is there some way to keep the USB connection alive while still conserving energy? E.g. by waking the ATMega32u4 frequently to keep the connection alive? Or is there some not-as-deep sleep moden where the USB connection stays alive?
Edits for clarification:
The device is an USB HID device. If the device goes to sleep after a few minutes of inactivity, having to reconnect after the user pressed a button causes quite a long delay between pressing the button and a reaction on the device.
I am using the ATMega32u4's native USB implementation, so no V-USB or anything similar.
I am putting the device to sleep like so:
Keyboard.end(); USBCON = 0; LowPower.powerDown(SLEEP_120MS, ADC_OFF, BOD_OFF);
This is how I wake it up again:
USBDevice.attach(); delay(50); Keyboard.begin(KeyboardLayout_en_US);