|
|
@@ -194,9 +194,8 @@ struct err_t g_err_entxt[] =
|
|
|
{0 ,"Encryption chip error"},
|
|
|
};
|
|
|
|
|
|
-
|
|
|
-atomic_uint g_err_cnt_hw; // 硬件错误计数
|
|
|
-atomic_uint g_err_cnt_sw; // 软件错误计数
|
|
|
+atomic_uint g_err_cnt_hw = ATOMIC_VAR_INIT(0); // 硬件错误计数
|
|
|
+atomic_uint g_err_cnt_sw = ATOMIC_VAR_INIT(0); // 软件错误计数
|
|
|
|
|
|
uint32_t g_err_bit[BITS_TO_INTS(ERR_CODE_NUM)];
|
|
|
|
|
|
@@ -226,8 +225,9 @@ int rt_err_init(void)
|
|
|
dp_err_n_c_rt("rt_err_init error(ERR_CODE_NUM=%d,num=%d).", ERR_CODE_NUM, num);
|
|
|
return -1;
|
|
|
}
|
|
|
- atomic_init(&g_err_cnt_hw, 0);
|
|
|
- atomic_init(&g_err_cnt_sw, 0);
|
|
|
+ // 此处赋0会将bsp_init中set的err_cnt清除,因此屏蔽 EWen
|
|
|
+ // atomic_init(&g_err_cnt_hw, 0);
|
|
|
+ // atomic_init(&g_err_cnt_sw, 0);
|
|
|
|
|
|
return 0;
|
|
|
}
|