The hardware sleep state change can take some time after wake-up interrupt. Use busy waiting instead of directly assert