This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

How to use CPS instruction in ARM ? Example Needed.

Is this is correct way to use CPS

CPSID ABT

To disable interrupt and enter Abort Mode ?

Parents
  • Not quite, but close.

    The syntax to enable/disable interrupts is "CPS<IE/ID> <i/f/a>" for example:

    CPSID   i   <-- mask IRQs
    CPSIE   f   <-- unmask FIQs
    CPSID   if  <-- mask IRQs and FIQs
    

    The syntax to change mode is "CPS <mode>" where <mode> is the number for the mode you want to enter.  For example:

    CPS     #23  <-- Change to mode "23" (which is the code for abort mode)
    

    You can also do both at once, for example:

    CPSID   if, #23  <-- mask IRQs and FIQs, and change to mode "23" (abort mode)
    

    You can find more information here:

      ARM Compiler armasm User Guide : 10.30 CPS

Reply
  • Not quite, but close.

    The syntax to enable/disable interrupts is "CPS<IE/ID> <i/f/a>" for example:

    CPSID   i   <-- mask IRQs
    CPSIE   f   <-- unmask FIQs
    CPSID   if  <-- mask IRQs and FIQs
    

    The syntax to change mode is "CPS <mode>" where <mode> is the number for the mode you want to enter.  For example:

    CPS     #23  <-- Change to mode "23" (which is the code for abort mode)
    

    You can also do both at once, for example:

    CPSID   if, #23  <-- mask IRQs and FIQs, and change to mode "23" (abort mode)
    

    You can find more information here:

      ARM Compiler armasm User Guide : 10.30 CPS

Children
No data