Could you use WFE instead of WFI? WFE (Wake for Event) will cause the processor to wake on arrival of an interrupt (if they aren't masked) or an Event. Where an Event can be generated by executing SEV.If you put a SEV instruction into your interrupt handler you'd know that the event register was set, meaning the next WFE instruction would "fail". As long as you have the WFE in a loop (re-checking the sleep condition on waking) this shouldn't be a problem.