1 Reply Latest reply on Oct 16, 2018 9:01 PM by XiaoweiZ_71

    How to disable all interrupts

    JaSi_1632926

      Hi,

      With a PSoC 4 device, I can use CyGlobalIntDisable to disable all interrupts, but how can I achieve the same with a PSoC 6 (m4) device?

       

      Thanks, Jacob

        • 1. Re: How to disable all interrupts
          XiaoweiZ_71

          /* ###########################  Core Function Access  ########################### */

          /** \ingroup  CMSIS_Core_FunctionInterface

              \defgroup CMSIS_Core_RegAccFunctions CMSIS Core Register Access Functions

            @{

          */

           

           

          /**

            \brief   Enable IRQ Interrupts

            \details Enables IRQ interrupts by clearing the I-bit in the CPSR.

                     Can only be executed in Privileged modes.

          */

          __attribute__((always_inline)) __STATIC_INLINE void __enable_irq(void)

          {

            __ASM volatile ("cpsie i" : : : "memory");

          }

           

           

           

           

          /**

            \brief   Disable IRQ Interrupts

            \details Disables IRQ interrupts by setting the I-bit in the CPSR.

                     Can only be executed in Privileged modes.

          */

          __attribute__((always_inline)) __STATIC_INLINE void __disable_irq(void)

          {

            __ASM volatile ("cpsid i" : : : "memory");

          }

          /* ###########################  Core Function Access  ########################### */

          2 of 2 people found this helpful