代码暂存 修复看门狗在关闭RC32K时偶现无法复位问题
This commit is contained in:
parent
6e091395d9
commit
dc9559625f
|
@ -5,7 +5,7 @@
|
||||||
"type": "mrs-debugger",
|
"type": "mrs-debugger",
|
||||||
"request": "launch",
|
"request": "launch",
|
||||||
"name": "IoT_SCV_CH584M1",
|
"name": "IoT_SCV_CH584M1",
|
||||||
"cwd": "c:\\Users\\123\\Desktop\\纯电自闭阀\\iot_-scv_-ch584-m",
|
"cwd": "c:\\Users\\123\\Desktop\\自闭阀项目\\CDZBF\\iot_-scv_-ch584-m",
|
||||||
"openOCDCfg": {
|
"openOCDCfg": {
|
||||||
"useLocalOpenOCD": true,
|
"useLocalOpenOCD": true,
|
||||||
"executable": "d:/MounRiverV2/MounRiver_Studio2/resources/app/resources/win32/components/WCH/OpenOCD/OpenOCD/bin/openocd.exe",
|
"executable": "d:/MounRiverV2/MounRiver_Studio2/resources/app/resources/win32/components/WCH/OpenOCD/OpenOCD/bin/openocd.exe",
|
||||||
|
@ -39,8 +39,8 @@
|
||||||
"additionalCommands": []
|
"additionalCommands": []
|
||||||
},
|
},
|
||||||
"loadedFiles": {
|
"loadedFiles": {
|
||||||
"executableFile": "c:\\Users\\123\\Desktop\\纯电自闭阀\\iot_-scv_-ch584-m\\obj\\IoT_SCV_CH584M1.elf",
|
"executableFile": "c:\\Users\\123\\Desktop\\自闭阀项目\\CDZBF\\iot_-scv_-ch584-m\\obj\\IoT_SCV_CH584M1.elf",
|
||||||
"symbolFile": "c:\\Users\\123\\Desktop\\纯电自闭阀\\iot_-scv_-ch584-m\\obj\\IoT_SCV_CH584M1.elf",
|
"symbolFile": "c:\\Users\\123\\Desktop\\自闭阀项目\\CDZBF\\iot_-scv_-ch584-m\\obj\\IoT_SCV_CH584M1.elf",
|
||||||
"executableFileOffset": 0,
|
"executableFileOffset": 0,
|
||||||
"symbolFileOffset": 0
|
"symbolFileOffset": 0
|
||||||
},
|
},
|
||||||
|
|
|
@ -231,6 +231,14 @@ void HAL_Init()
|
||||||
{
|
{
|
||||||
halTaskID = TMOS_ProcessEventRegister(HAL_ProcessEvent);
|
halTaskID = TMOS_ProcessEventRegister(HAL_ProcessEvent);
|
||||||
HAL_TimeInit();
|
HAL_TimeInit();
|
||||||
|
#if 1
|
||||||
|
// 开启独立看门狗会强制开启内部32K但是开启状态没有跟内部的RC32K寄存器同步
|
||||||
|
// ,而复位时候是根据内部RC32K寄存器状态来决定是否启动RC32K
|
||||||
|
// 不关闭ch584的内部32KRC
|
||||||
|
sys_safe_access_enable();
|
||||||
|
R8_CK32K_CONFIG |= RB_CLK_INT32K_PON;
|
||||||
|
sys_safe_access_disable();
|
||||||
|
#endif
|
||||||
#if(defined HAL_SLEEP) && (HAL_SLEEP == TRUE)
|
#if(defined HAL_SLEEP) && (HAL_SLEEP == TRUE)
|
||||||
HAL_SleepInit();
|
HAL_SleepInit();
|
||||||
#endif
|
#endif
|
||||||
|
|
Loading…
Reference in New Issue