Extending Arduino Wake Sources with AVR Pin Change Interrupts
Standard attachInterrupt() only reaches two pins on an ATmega328P. Pin change interrupts let any port pin wake the CPU, but they require direct register access and careful port-level handling.