Browse Source

[bsp][stm32] fix mdk simulator

ZYH 5 năm trước cách đây
mục cha
commit
8fd800fea3
1 tập tin đã thay đổi với 5 bổ sung0 xóa
  1. 5 0
      bsp/stm32/libraries/HAL_Drivers/drv_common.c

+ 5 - 0
bsp/stm32/libraries/HAL_Drivers/drv_common.c

@@ -125,8 +125,13 @@ RT_WEAK void rt_hw_board_init()
     /* HAL_Init() function is called at the beginning of the program */
     HAL_Init();
 
+    /* enable interrupt */
+    __set_PRIMASK(0);
     /* System clock initialization */
     SystemClock_Config();
+    /* disbale interrupt */
+    __set_PRIMASK(1);
+
     rt_hw_systick_init();
 
     /* Heap initialization */