I have an idea for a data logger or remote wireless sensor. I want to run it on 2xAA alkaline cells which is no problem for the MCU (ATmega328P), but I may want to use sensors that require 5V. I found a switching regulator (MCP1640C) that has a bypass mode, which can be controlled by an MCU pin. When in bypass mode, the regulator sleeps, lowering power requirements and passes the input battery voltage straight through. When the MCU wakes, it can enable the regulator and boost the supply voltage to 5V. (The MCU will also mostly sleep when the regulator isn't running.)
My question is whether it's reasonable to expect reliable MCU operation with the supply voltage going from a minimum of say 2.7V to 5V, and then back, or is this just a Very Bad Idea? The voltage transition will take a few (2-5) milliseconds. I can always just give it a try, and probably will, but I've been reading the ATmega328 datasheet and googling around and not finding anything, so wondering if anyone can comment.
I have a little breadboard power supply (LM317) that can be switched between 3.3V and 5V, I've been abusing an ATmega328P (at 16MHz) by switching it rapidly back and forth, and it never seems to burp, but I don't consider this to prove much, if anything. (If I build the circuit described above, I'd clock the MCU at 8MHz so it was always in the safe operating area regardless of Vcc.)