Wake Up State Machine Code