I have a USB powered board, that should consume as little power when idle as possible, while keeping the USB connection alive.
The device only sends data to the host, doesn't receive any, so the connection itself doesn't necessarily have to be working while idle, but the host needs to be able to see the device as connected. So the device should never disconnect.
I can set the Atmega32u4 to idle mode while keeping the USB connection up, but the power consumption is really high (hardly lower than when active). I disabled all the peripherals I can disable in idle mode, but it didn't change much.
As soon as I enter any other sleep mode (power down, stand-by or ADC noise reduction) the connection is lost and the host can't see the device any more, even though the documentation says, that in ADC noise reduction mode, the USB clock stays active, and in power down/stand by, asynchronous USB interrupts should keep working.
Is there anything else I can do to reduce power consumption?
Is there anything I need to do to use power down, stand-by or ADC noise reduction modes while keeping the USB connection alive?
idle()
withADC_OFF
,TIMER4_OFF
... and everything else OFF? Try measuring the current draw with bothUSB_OFF
andUSB_ON
: this will tell you whether it's the USB peripheral itself that is drawing too much current. You can also check the datasheet to see if there are other peripherals not taken care of by the library, which you could disable with thepower_*_disable()
function from the avr-libc.USB_OFF
reduces the power consumption significantly (even lower than ADC noise reduction mode), while keeping USB alive. I am still well above the current usage that I get in powerdown mode, but that's a significant improvement already. This leads me to think that powerdown should be possible, but that I need to somehow need to add interrupts or something for USB to correctly react to SUSPI/WAKEUPI while in powerdown mode.