ARM Technical Support Knowledge Articles

WFI instruction doesn't work with inline assembler

Applies to: ARMv7 Architecture, RealView Development Suite (RVDS)


I am trying to execute a WFI instruction using inline assembler and targetting the Cortex-A8 processor but I get an "#1083: Inline assembler syntax error" from RVCT3.1. Why is this?


WFI is an ARM Architecture v7 instruction; unfortunately, the inline assembler only supports instructions up to architecture v5TE.

To issue a Wait For Interrupt using the Cortex A8 you must use the intrinsic function __wfi(). This is used just like a C function - you do not need __asm().

Rate this article

Disagree? Move your mouse over the bar and click

Did you find this article helpful? Yes No

How can we improve this article?

Link to this article
Copyright © 2011 ARM Limited. All rights reserved. External (Open), Non-Confidential