diff --git a/.mrs/launch.json b/.mrs/launch.json index 6cba574..9cb812b 100644 --- a/.mrs/launch.json +++ b/.mrs/launch.json @@ -5,7 +5,7 @@ "type": "mrs-debugger", "request": "launch", "name": "IoT_SCV_CH584M1", - "cwd": "c:\\Users\\123\\Desktop\\纯电自闭阀\\iot_-scv_-ch584-m", + "cwd": "c:\\Users\\123\\Desktop\\自闭阀项目\\CDZBF\\iot_-scv_-ch584-m", "openOCDCfg": { "useLocalOpenOCD": true, "executable": "d:/MounRiverV2/MounRiver_Studio2/resources/app/resources/win32/components/WCH/OpenOCD/OpenOCD/bin/openocd.exe", @@ -39,8 +39,8 @@ "additionalCommands": [] }, "loadedFiles": { - "executableFile": "c:\\Users\\123\\Desktop\\纯电自闭阀\\iot_-scv_-ch584-m\\obj\\IoT_SCV_CH584M1.elf", - "symbolFile": "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\\自闭阀项目\\CDZBF\\iot_-scv_-ch584-m\\obj\\IoT_SCV_CH584M1.elf", "executableFileOffset": 0, "symbolFileOffset": 0 }, diff --git a/HAL/MCU.c b/HAL/MCU.c index 82faba7..ba321ed 100644 --- a/HAL/MCU.c +++ b/HAL/MCU.c @@ -231,6 +231,14 @@ void HAL_Init() { halTaskID = TMOS_ProcessEventRegister(HAL_ProcessEvent); 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) HAL_SleepInit(); #endif