1
\$\begingroup\$

I am trying to cut down the power consumption for an ATMega32u4.

The datasheet says, for USB 2.0 it needs an external clock, which it uses to generate a 48 MHz clock by multiplying the external clock up.

But it doesn't say anything about what frequency that external clock should have.

What is the minimum clock frequency that I can use while still retaining USB 2.0 capabilities?

Does the CLKDIV8 fuse affect that in any way?

\$\endgroup\$
2
  • 1
    \$\begingroup\$ Have you read the datasheet? Section 6.1.5 seems to cover it. \$\endgroup\$
    – Finbarr
    Commented Jun 4, 2022 at 13:04
  • \$\begingroup\$ Thanks! I read the datasheet, but missed this. \$\endgroup\$
    – Dakkaron
    Commented Jun 5, 2022 at 7:30

1 Answer 1

1
\$\begingroup\$

The USB module needs a 48MHz clock. This is generated by a PLL circuit. The input frequency for the PLL typically is 8 MHz or 16 MHz, but other relations can be configured. You don't need an external clock generator but the allowed frequency deviation of USB systems require that the crystal oscillator mode is used.

To reduce power consumption you setup an 8 MHz crystal oscillator and use sleep modes. A USB connect event can be configured to wake up the MCU, however the USB setup code should run again for proper operation.

I like to use the watchdog timer to create a wake up interval where the control processing is performed with high speed and let the MCU sleep the remaining time.

As I understand, the CLKDIV8 fuse cannot be used in this context.

\$\endgroup\$
1
  • \$\begingroup\$ From what I understand (and experimented) all sleep modes higher than light sleep cut the USB connection and need to reinitialize the connection after waking up. Is there a way to keep the connection alive during deep sleep? \$\endgroup\$
    – Dakkaron
    Commented Jun 5, 2022 at 7:28

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.