This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

How to open and close the all interrupts?

Hi, There are some codes donot want to be interrupted. Before the execution of those codes, I want to close the all  interrupts, after the execution, I want to open the all interrupts, How do I realize this function?

Parents
  • Hi

    You may use "__enable_irq" and "__disable_irq" to disable/enable all interrupts. I would also recommend to have a look at this page from the ARM documentation that gives some background for this topic (Link).

    Nordic has in there SDK an slightly enhanced version of these functionality that allows nested calls of disable/enable IRQ. These are called "app_util_disable_irq" and "app_util_enable_irq".

    Regards Adrian

Reply
  • Hi

    You may use "__enable_irq" and "__disable_irq" to disable/enable all interrupts. I would also recommend to have a look at this page from the ARM documentation that gives some background for this topic (Link).

    Nordic has in there SDK an slightly enhanced version of these functionality that allows nested calls of disable/enable IRQ. These are called "app_util_disable_irq" and "app_util_enable_irq".

    Regards Adrian

Children
Related