Index: fw/core/misc.h
===================================================================
--- /YC3121_SDK/fw/core/misc.h	(revision 621)
+++ /YC3121_SDK/fw/core/misc.h	(working copy)
@@ -19,7 +19,7 @@
 	SCI0_IRQn  = 9,
 	SCI1_IRQn  = 10,
 	BT_IRQn    = 11,
-	GPIO_IRQn	 = 12,
+	GPIO_IRQn  = 12,
 	TIM0_IRQn  = 13,
 	TIM1_IRQn  = 14,
 	TIM2_IRQn  = 15,
@@ -57,8 +57,21 @@
  */
 uint32_t NVIC_SetPriority(IRQn_Type IRQn, uint8_t priority);
 
+/**
+ * @brief  System Reset
+ * @param  none
+ * @retval none
+ */
 void soft_reset(void);
 
+
+/**
+ * @brief  get cortex M0 PRIMASK REG value
+ * @param  none
+ * @retval 0:interrupt not masking; 1:interrupt is masking
+ */
+uint32_t get_primask();
+
 #ifdef __cplusplus
 }
 #endif

Index: fw/core/misc.c
===================================================================
--- /YC3121_SDK/fw/core/misc.c	(revision 621)
+++ /YC3121_SDK/fw/core/misc.c	(working copy)
@@ -27,3 +27,9 @@
 	SYSCTRL_RESET = 0x55;
 	while(1);
 }
+
+
+uint32_t get_primask(void)
+{
+	__asm volatile("MRS R0,PRIMASK");
+}
