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.

ARM WFI Instruction

Other Parts Discussed in Thread: OMAPL138

I am writing a simple C application for the ARM side of the OMAPL138 in CCS4.

When I compile asm("  WFI"); or asm("  wfi");

I get the following error:

 [E0002]        Instruction only available in V7        WFI

Can someone please help me?

Cheers!

  • It looks like the this version of the ARM does not support WIF, so I am trying to call the following from a C file:

    asm(" MOV R0, #0");
    asm(" MCR p15, 0, r0, c7, c0, 4");

    But I get the following error:

     [E0004]
             Coprocessor information field must be an absolute constant
         MCR p15, 0, r0, c7, c0, 4

     

    Any help would be greatly appreciated.

    Cheers!

  • Immediate value needs a #in front of it. the MCR line should be

    MCR p15, #0, r0, c7, c0, #4

    For more info on asm syntax please look up SPNU118 (ARM Assembly Language Tools V4.7 User's Guide)

     

    ---------------------------------------------------------------------------------------------------------

    Please click the Verify Answer button on this post if it answers your question.
    ---------------------------------------------------------------------------------------------------------