Kinetis assembler instructions

cancel
Showing results for 
Search instead for 
Did you mean: 

Kinetis assembler instructions

388 Views
pvidic
Contributor I

Hi, examining Kinetis bootloader source code I found assembler instruction below:

file cmsis_gcc.h:

__attribute__( ( always_inline ) ) __STATIC_INLINE void __disable_irq(void)
{
  __ASM volatile ("cpsid i" : : : "memory");
}

can anyone help me find explanation for the instruction?

0 Kudos
2 Replies

267 Views
BlackNight
NXP Employee
NXP Employee

"cpsid i" is an assembly instruction to mask (disable) the interrupts on ARM Cortex-M.

About the GNU assembler have a read at

Using as: Top and there is a tuturial and good explanation at ARM GCC Inline Assembler Cookbook 

I hope this helps,

Erich

267 Views
mjbcswitzerland
Specialist V