This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

Putting ARM into wait-for-interrupt sleep mode. Need example code.

Hello,

I see section 10.6 of spruh77a says to use a CP15 instruction (MCR p15, #0, <Rd>, c7, c0, #4) to put the ARM into wait-for-interrupt sleep mode, but does anyone have example code of how to actually do this?  Can a CP15 instruction be embedded in C/C++ code?  Again, a complete example of how to put the ARM into WFI state, from within C/C++ code would be really helpful.

thanks,

- Matt.