I am looking for pointers on a strange behavior I see in a test program of mine.
I have an ATmega328P, on which I use Timer 2 in synchronous, CTC mode to get a regular tick at 250Hz.
For testing, my interrupt handler just toggles a pin connected to a LED.
The main loop simply sleeps.
Now, when the main loop sleeps in IDLE mode, everything works fine, the LED appears dimmed (because it's actually blinking at 125Hz).
However, just changing sleep mode to PWR_SAVE make the LED blink really, really slowly, perhaps 8Hz.
Is this the expected behavior? Does timer2 clock change when going in PWR_SAVE mode? Did I miss something about it in the documentation?
Or should I look for a bug in my code?