LPCXpresso with LPC4357 => disable all global interrupts (cli, sei) ?

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

LPCXpresso with LPC4357 => disable all global interrupts (cli, sei) ?

589 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by Georg on Wed Oct 29 23:53:24 MST 2014
Hi,

i use LPCXpresso with LPC4357 and need a funktion to disable and enable all interrupts.

I tryed  asm volatile("cli"::) and asm volatile("sei"::) but it does not work.

Can someone give me some help so solve it?

thx.

Georg.
0 Kudos
2 Replies

391 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by Georg on Thu Oct 30 04:11:33 MST 2014
Hi,

thx.

i use now this funktions:

__asm volatile ("cpsid i")
__asm volatile ("cpsie i")

Georg.
0 Kudos

391 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by LabRat on Thu Oct 30 02:28:10 MST 2014

What's wrong with core_cmFunc.h  :quest:

/** \brief  Enable IRQ Interrupts

  This function enables IRQ interrupts by clearing the I-bit in the CPSR.
  Can only be executed in Privileged modes.
 */
__attribute__( ( always_inline ) ) __STATIC_INLINE [color=#f00]void __enable_irq(void)[/color]
{
  __ASM volatile ("cpsie i" : : : "memory");
}


/** \brief  Disable IRQ Interrupts

  This function disables IRQ interrupts by setting the I-bit in the CPSR.
  Can only be executed in Privileged modes.
 */
__attribute__( ( always_inline ) ) __STATIC_INLINE[color=#f00] void __disable_irq(void)[/color]
{
  __ASM volatile ("cpsid i" : : : "memory");
}

0 Kudos