|ARM Technical Support Knowledge Articles|
Applies to: Cortex processors
A difference between the WFI and WFE instructions is that interrupt events will cause a wake-up from WFE, unless they are masked by I,F,A bits. Interrupts will cause a wake-up from WFI irrespective of the status of the interrupt mask bits. This suggests that you have an active interrupt preventing entry into WFI state, but because it is masked it does not prevent entry into WFE state. This could be an nIRQ of nFIQ interrupt signal but it could also be a pending asynchronous abort. I suggest you try clearing the CPSR.A bit and handling any abort before trying to enter WFI state. If you ensure that CPSR A,F,I bits are clear then WFI should behave the same as WFE with respect to interrupts (there will still be the difference due to WFE checking the event flag).
Did you find this article helpful? Yes No
How can we improve this article?