Kinetis assembler instructions

取消
显示结果 
搜索替代 
您的意思是: 

Kinetis assembler instructions

417 次查看
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 项奖励
2 回复数

296 次查看
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

296 次查看
mjbcswitzerland
Specialist V