{"id":33646,"date":"2025-04-28T10:46:46","date_gmt":"2025-04-28T02:46:46","guid":{"rendered":"https:\/\/www.wsisp.com\/helps\/33646.html"},"modified":"2025-04-28T10:46:46","modified_gmt":"2025-04-28T02:46:46","slug":"stm32week7","status":"publish","type":"post","link":"https:\/\/www.wsisp.com\/helps\/33646.html","title":{"rendered":"stm32week7"},"content":{"rendered":"<h2>stm32\u5b66\u4e60<\/h2>\n<h3>\u4e09.\u901a\u4fe1<\/h3>\n<h4>10.BKP\u548cRTC<\/h4>\n<p>BKP(backup registers)\u5907\u4efd\u5bc4\u5b58\u5668 BKP\u53ef\u4ee5\u5b58\u50a8\u6570\u636e&#xff0c;\u6389\u7535\u4e22\u5931&#xff0c;\u5e73\u65f6\u7528\u5916\u90e8\u7535\u6e90\u4f9b\u7535&#xff0c;\u5916\u90e8\u7535\u6e90\u5207\u65ad\u540e\u7528VBAT\u7ef4\u6301\u4f9b\u7535&#xff0c;\u5f53\u7cfb\u7edf\u5728\u5f85\u673a\u72b6\u6001\u4e0b\u88ab\u5524\u9192&#xff0c;\u6216\u7cfb\u7edf\u590d\u4f4d\u6216\u7535\u6e90\u590d\u4f4d\u65f6&#xff0c;\u5b83\u4eec\u4e5f\u4e0d\u4f1a\u88ab\u590d\u4f4d TAMPER\u5f15\u811a\u53ef\u4ee5\u4ea7\u751f\u7684\u4fb5\u5165\u4e8b\u4ef6&#xff0c;\u5c06\u6240\u6709\u5907\u4efd\u5bc4\u5b58\u5668\u7684\u5185\u5bb9\u6e05\u9664 RTC\u5f15\u811a\u53ef\u4ee5\u8f93\u51faRTC\u6821\u51c6\u65f6\u949f(\u5bf9\u5185\u90e8RTC\u5fae\u5c0f\u7684\u8bef\u5dee\u8fdb\u884c\u6821\u51c6)\u3001RTC\u95f9\u949f\u8109\u51b2\u3001\u79d2\u8109\u51b2(\u53ef\u4ee5\u8f93\u51fa\u51fa\u6765&#xff0c;\u4e3a\u522b\u7684\u8bbe\u5907\u63d0\u4f9b\u4fe1\u53f7) PC13\u3001TAMPER\u3001RTC\u5171\u7528\u4e00\u4e2a\u5f15\u811a&#xff0c;\u540c\u65f6\u53ea\u80fd\u4f7f\u7528\u4e00\u4e2a\u529f\u80fd \u5b58\u50a8RTC\u65f6\u949f\u6821\u51c6\u5bc4\u5b58\u5668&#xff0c;\u8054\u5408RTC\u6821\u51c6\u65f6\u949f&#xff0c;\u5bf9RTC\u8fdb\u884c\u6821\u51c6 \u7528\u6237\u6570\u636e\u5b58\u50a8\u5bb9\u91cf&#xff1a;20\u5b57\u8282(\u4e2d\u5bb9\u91cf\u548c\u5c0f\u5bb9\u91cf)\/84\u5b57\u8282(\u5927\u5bb9\u91cf\u548c\u4e92\u8054\u578b)<\/p>\n<p><img decoding=\"async\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2025\/04\/20250428024639-680eec0fad6d9.png\" alt=\"\u56fe\u7247\u6d88\u5931\u4e86\" \/> <\/p>\n<p>RTC\u5b9e\u65f6\u65f6\u949f&#xff0c;\u662f\u4e00\u4e2a\u72ec\u7acb\u7684\u5b9a\u65f6\u5668&#xff0c;\u53ef\u4e3a\u7cfb\u7edf\u63d0\u4f9b\u65f6\u949f\u548c\u65e5\u5386\u7684\u529f\u80fd RTC\u548c\u65f6\u949f\u914d\u7f6e\u7cfb\u7edf\u5904\u4e8e\u540e\u5907\u533a\u57df&#xff0c;\u7cfb\u7edf\u590d\u4f4d\u65f6\u6570\u636e\u4e0d\u6e05\u96f6&#xff0c;VDD\u65ad\u7535\u540e\u53ef\u501f\u52a9VBAT\u4f9b\u7535 32\u4f4d\u7684\u53ef\u7f16\u7a0b\u8ba1\u6570\u5668&#xff0c;\u53ef\u5bf9\u5e94Unix\u65f6\u95f4\u6233\u7684\u79d2\u8ba1\u6570\u5668 20\u4f4d\u7684\u53ef\u7f16\u7a0b\u9884\u5206\u9891\u5668&#xff0c;\u53ef\u9002\u914d\u4e0d\u540c\u9891\u7387\u7684\u8f93\u5165\u65f6\u949f \u53ef\u9009\u62e9\u7684\u4e09\u79cdRTC\u65f6\u949f\u6e90&#xff1a;<\/p>\n<li>HSE\u65f6\u949f(\u9664\u4ee5128&#xff0c;\u56e0\u4e3a\u672c\u8eab8MHz&#xff0c;\u9884\u5206\u9891\u4e0d\u591f\u7528)<\/li>\n<li>LSE\u632f\u8361\u5668\u65f6\u949f(32.768kHz)<\/li>\n<li>LSI\u632f\u8361\u5668\u65f6\u949f(40kHz)<\/li>\n<p>RTC\u6846\u56fe&#xff1a;<\/p>\n<p><img decoding=\"async\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2025\/04\/20250428024639-680eec0fea263.png\" alt=\"\u56fe\u7247\u6d88\u5931\u4e86\" \/> <\/p>\n<p>RTC\u57fa\u672c\u7ed3\u6784&#xff1a;<\/p>\n<p><img decoding=\"async\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2025\/04\/20250428024640-680eec1026c13.png\" alt=\"\u56fe\u7247\u6d88\u5931\u4e86\" \/> <\/p>\n<p>\u786c\u4ef6\u7535\u8def&#xff1a;<\/p>\n<p><img decoding=\"async\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2025\/04\/20250428024640-680eec107dc50.png\" alt=\"\u56fe\u7247\u6d88\u5931\u4e86\" \/> <\/p>\n<p>RTC\u64cd\u4f5c\u6ce8\u610f\u4e8b\u9879&#xff1a;<\/p>\n<li>\u6267\u884c\u4ee5\u4e0b\u64cd\u4f5c\u5c06\u4f7f\u80fd\u5bf9BKP\u548cRTC\u7684\u8bbf\u95ee\n<li>\u8bbe\u7f6eRCC_APB1ENR\u7684PWREN\u548cBKPEN&#xff0c;\u4f7f\u80fdPWR\u548cBKP\u65f6\u949f<\/li>\n<li>\u8bbe\u7f6ePWR_CR\u7684DBP&#xff0c;\u4f7f\u80fd\u5bf9BKP\u548cRTC\u7684\u8bbf\u95ee<\/li>\n<\/li>\n<li>\u82e5\u5728\u8bfb\u53d6RTC\u5bc4\u5b58\u5668\u65f6&#xff0c;RTC\u7684APB1\u63a5\u53e3\u66fe\u7ecf\u5904\u4e8e\u7981\u6b62\u72b6\u6001&#xff0c;\u5219\u8f6f\u4ef6\u9996\u5148\u5fc5\u987b\u7b49\u5f85RTC_CRL\u5bc4\u5b58\u5668\u4e2d\u7684RSF\u4f4d(\u5bc4\u5b58\u5668\u540c\u6b65\u6807\u5fd7)\u88ab\u786c\u4ef6\u7f6e1<\/li>\n<li>\u5fc5\u987b\u8bbe\u7f6eRTC_CRL\u5bc4\u5b58\u5668\u4e2d\u7684CNF\u4f4d&#xff0c;\u4f7fRTC\u8fdb\u5165\u914d\u7f6e\u6a21\u5f0f\u540e&#xff0c;\u624d\u80fd\u5199\u5165RTC_PRL\u3001RTC_CNT\u3001RTC_ALR\u5bc4\u5b58\u5668<\/li>\n<li>\u5bf9RTC\u4efb\u4f55\u5bc4\u5b58\u5668\u7684\u5199\u64cd\u4f5c&#xff0c;\u90fd\u5fc5\u987b\u5728\u524d\u4e00\u6b21\u5199\u64cd\u4f5c\u7ed3\u675f\u540e\u8fdb\u884c\u3002\u53ef\u4ee5\u901a\u8fc7\u67e5\u8be2RTC_CR\u5bc4\u5b58\u5668\u4e2d\u7684RTOFF\u72b6\u6001\u4f4d&#xff0c;\u5224\u65adRTC\u5bc4\u5b58\u5668\u662f\u5426\u5904\u4e8e\u66f4\u65b0\u4e2d\u3002\u4ec5\u5f53RTOFF\u72b6\u6001\u4f4d\u662f1\u65f6&#xff0c;\u624d\u53ef\u4ee5\u5199\u5165RTC\u5bc4\u5b58\u5668<\/li>\n<p>\u8bfb\u5199\u5907\u4efd\u5bc4\u5b58\u5668\u7684\u521d\u59cb\u5316\u53ea\u9700\u8981<\/p>\n<p> \/*\u5f00\u542f\u65f6\u949f*\/<br \/>\n RCC_APB1PeriphClockCmd(RCC_APB1Periph_PWR, ENABLE);  \/\/\u5f00\u542fPWR\u7684\u65f6\u949f<br \/>\n RCC_APB1PeriphClockCmd(RCC_APB1Periph_BKP, ENABLE);  \/\/\u5f00\u542fBKP\u7684\u65f6\u949f<\/p>\n<p> \/*\u5907\u4efd\u5bc4\u5b58\u5668\u8bbf\u95ee\u4f7f\u80fd*\/<br \/>\n PWR_BackupAccessCmd(ENABLE);       \/\/\u4f7f\u7528PWR\u5f00\u542f\u5bf9\u5907\u4efd\u5bc4\u5b58\u5668\u7684\u8bbf\u95ee<\/p>\n<p>\u7136\u540e\u5c31\u53ef\u4ee5\u7528BKP_ReadBackupRegister\u548cBKP_WriteBackupRegister\u6765\u8bfb\u5199\u5bc4\u5b58\u5668<\/p>\n<p>RTC\u521d\u59cb\u5316\u548cRTC\u8bfb\u5199\u65f6\u95f4\u7684\u51fd\u6570&#xff1a;<\/p>\n<p>#include &#034;stm32f10x.h&#034;                  \/\/ Device header<br \/>\n#include &lt;time.h&gt;<\/p>\n<p>uint16_t MyRTC_Time[] &#061; {2023, 1, 1, 23, 59, 55}; \/\/\u5b9a\u4e49\u5168\u5c40\u7684\u65f6\u95f4\u6570\u7ec4&#xff0c;\u6570\u7ec4\u5185\u5bb9\u5206\u522b\u4e3a\u5e74\u3001\u6708\u3001\u65e5\u3001\u65f6\u3001\u5206\u3001\u79d2<\/p>\n<p>void MyRTC_SetTime(void);    \/\/\u51fd\u6570\u58f0\u660e<\/p>\n<p>\/**<br \/>\n  * \u51fd    \u6570&#xff1a;RTC\u521d\u59cb\u5316<br \/>\n  * \u53c2    \u6570&#xff1a;\u65e0<br \/>\n  * \u8fd4 \u56de \u503c&#xff1a;\u65e0<br \/>\n  *\/<br \/>\nvoid MyRTC_Init(void)<br \/>\n{<br \/>\n \/*\u5f00\u542f\u65f6\u949f*\/<br \/>\n RCC_APB1PeriphClockCmd(RCC_APB1Periph_PWR, ENABLE);  \/\/\u5f00\u542fPWR\u7684\u65f6\u949f<br \/>\n RCC_APB1PeriphClockCmd(RCC_APB1Periph_BKP, ENABLE);  \/\/\u5f00\u542fBKP\u7684\u65f6\u949f<\/p>\n<p> \/*\u5907\u4efd\u5bc4\u5b58\u5668\u8bbf\u95ee\u4f7f\u80fd*\/<br \/>\n PWR_BackupAccessCmd(ENABLE);       \/\/\u4f7f\u7528PWR\u5f00\u542f\u5bf9\u5907\u4efd\u5bc4\u5b58\u5668\u7684\u8bbf\u95ee<\/p>\n<p> if (BKP_ReadBackupRegister(BKP_DR1) !&#061; 0xA5A5)   \/\/\u901a\u8fc7\u5199\u5165\u5907\u4efd\u5bc4\u5b58\u5668\u7684\u6807\u5fd7\u4f4d&#xff0c;\u5224\u65adRTC\u662f\u5426\u662f\u7b2c\u4e00\u6b21\u914d\u7f6e<br \/>\n               \/\/if\u6210\u7acb\u5219\u6267\u884c\u7b2c\u4e00\u6b21\u7684RTC\u914d\u7f6e<br \/>\n {<br \/>\n  RCC_LSEConfig(RCC_LSE_ON);       \/\/\u5f00\u542fLSE\u65f6\u949f<br \/>\n  while (RCC_GetFlagStatus(RCC_FLAG_LSERDY) !&#061; SET); \/\/\u7b49\u5f85LSE\u51c6\u5907\u5c31\u7eea<\/p>\n<p>  RCC_RTCCLKConfig(RCC_RTCCLKSource_LSE);    \/\/\u9009\u62e9RTCCLK\u6765\u6e90\u4e3aLSE<br \/>\n  RCC_RTCCLKCmd(ENABLE);        \/\/RTCCLK\u4f7f\u80fd<\/p>\n<p>  RTC_WaitForSynchro();        \/\/\u7b49\u5f85\u540c\u6b65<br \/>\n  RTC_WaitForLastTask();        \/\/\u7b49\u5f85\u4e0a\u4e00\u6b21\u64cd\u4f5c\u5b8c\u6210<\/p>\n<p>  RTC_SetPrescaler(32768 &#8211; 1);      \/\/\u8bbe\u7f6eRTC\u9884\u5206\u9891\u5668&#xff0c;\u9884\u5206\u9891\u540e\u7684\u8ba1\u6570\u9891\u7387\u4e3a1Hz<br \/>\n  RTC_WaitForLastTask();        \/\/\u7b49\u5f85\u4e0a\u4e00\u6b21\u64cd\u4f5c\u5b8c\u6210<\/p>\n<p>  MyRTC_SetTime();         \/\/\u8bbe\u7f6e\u65f6\u95f4&#xff0c;\u8c03\u7528\u6b64\u51fd\u6570&#xff0c;\u5168\u5c40\u6570\u7ec4\u91cc\u65f6\u95f4\u503c\u5237\u65b0\u5230RTC\u786c\u4ef6\u7535\u8def<\/p>\n<p>  BKP_WriteBackupRegister(BKP_DR1, 0xA5A5);   \/\/\u5728\u5907\u4efd\u5bc4\u5b58\u5668\u5199\u5165\u81ea\u5df1\u89c4\u5b9a\u7684\u6807\u5fd7\u4f4d&#xff0c;\u7528\u4e8e\u5224\u65adRTC\u662f\u4e0d\u662f\u7b2c\u4e00\u6b21\u6267\u884c\u914d\u7f6e<br \/>\n }<br \/>\n else             \/\/RTC\u4e0d\u662f\u7b2c\u4e00\u6b21\u914d\u7f6e<br \/>\n {<br \/>\n  RTC_WaitForSynchro();        \/\/\u7b49\u5f85\u540c\u6b65<br \/>\n  RTC_WaitForLastTask();        \/\/\u7b49\u5f85\u4e0a\u4e00\u6b21\u64cd\u4f5c\u5b8c\u6210<br \/>\n }<br \/>\n}<\/p>\n<p>\/\/\u5982\u679cLSE\u65e0\u6cd5\u8d77\u632f\u5bfc\u81f4\u7a0b\u5e8f\u5361\u6b7b\u5728\u521d\u59cb\u5316\u51fd\u6570\u4e2d<br \/>\n\/\/\u53ef\u5c06\u521d\u59cb\u5316\u51fd\u6570\u66ff\u6362\u4e3a\u4e0b\u8ff0\u4ee3\u7801&#xff0c;\u4f7f\u7528LSI\u5f53\u4f5cRTCCLK<br \/>\n\/\/LSI\u65e0\u6cd5\u7531\u5907\u7528\u7535\u6e90\u4f9b\u7535&#xff0c;\u6545\u4e3b\u7535\u6e90\u6389\u7535\u65f6&#xff0c;RTC\u8d70\u65f6\u4f1a\u6682\u505c<br \/>\n\/*<br \/>\nvoid MyRTC_Init(void)<br \/>\n{<br \/>\n RCC_APB1PeriphClockCmd(RCC_APB1Periph_PWR, ENABLE);<br \/>\n RCC_APB1PeriphClockCmd(RCC_APB1Periph_BKP, ENABLE);<\/p>\n<p> PWR_BackupAccessCmd(ENABLE);<\/p>\n<p> if (BKP_ReadBackupRegister(BKP_DR1) !&#061; 0xA5A5)<br \/>\n {<br \/>\n  RCC_LSICmd(ENABLE);<br \/>\n  while (RCC_GetFlagStatus(RCC_FLAG_LSIRDY) !&#061; SET);<\/p>\n<p>  RCC_RTCCLKConfig(RCC_RTCCLKSource_LSI);<br \/>\n  RCC_RTCCLKCmd(ENABLE);<\/p>\n<p>  RTC_WaitForSynchro();<br \/>\n  RTC_WaitForLastTask();<\/p>\n<p>  RTC_SetPrescaler(40000 &#8211; 1);<br \/>\n  RTC_WaitForLastTask();<\/p>\n<p>  MyRTC_SetTime();<\/p>\n<p>  BKP_WriteBackupRegister(BKP_DR1, 0xA5A5);<br \/>\n }<br \/>\n else<br \/>\n {<br \/>\n  RCC_LSICmd(ENABLE);    \/\/\u5373\u4f7f\u4e0d\u662f\u7b2c\u4e00\u6b21\u914d\u7f6e&#xff0c;\u4e5f\u9700\u8981\u518d\u6b21\u5f00\u542fLSI\u65f6\u949f<br \/>\n  while (RCC_GetFlagStatus(RCC_FLAG_LSIRDY) !&#061; SET);<\/p>\n<p>  RCC_RTCCLKConfig(RCC_RTCCLKSource_LSI);<br \/>\n  RCC_RTCCLKCmd(ENABLE);<\/p>\n<p>  RTC_WaitForSynchro();<br \/>\n  RTC_WaitForLastTask();<br \/>\n }<br \/>\n}*\/<\/p>\n<p>\/**<br \/>\n  * \u51fd    \u6570&#xff1a;RTC\u8bbe\u7f6e\u65f6\u95f4<br \/>\n  * \u53c2    \u6570&#xff1a;\u65e0<br \/>\n  * \u8fd4 \u56de \u503c&#xff1a;\u65e0<br \/>\n  * \u8bf4    \u660e&#xff1a;\u8c03\u7528\u6b64\u51fd\u6570\u540e&#xff0c;\u5168\u5c40\u6570\u7ec4\u91cc\u65f6\u95f4\u503c\u5c06\u5237\u65b0\u5230RTC\u786c\u4ef6\u7535\u8def<br \/>\n  *\/<br \/>\nvoid MyRTC_SetTime(void)<br \/>\n{<br \/>\n time_t time_cnt;  \/\/\u5b9a\u4e49\u79d2\u8ba1\u6570\u5668\u6570\u636e\u7c7b\u578b<br \/>\n struct tm time_date; \/\/\u5b9a\u4e49\u65e5\u671f\u65f6\u95f4\u6570\u636e\u7c7b\u578b<\/p>\n<p> time_date.tm_year &#061; MyRTC_Time[0] &#8211; 1900;  \/\/\u5c06\u6570\u7ec4\u7684\u65f6\u95f4\u8d4b\u503c\u7ed9\u65e5\u671f\u65f6\u95f4\u7ed3\u6784\u4f53<br \/>\n time_date.tm_mon &#061; MyRTC_Time[1] &#8211; 1;<br \/>\n time_date.tm_mday &#061; MyRTC_Time[2];<br \/>\n time_date.tm_hour &#061; MyRTC_Time[3];<br \/>\n time_date.tm_min &#061; MyRTC_Time[4];<br \/>\n time_date.tm_sec &#061; MyRTC_Time[5];<\/p>\n<p> time_cnt &#061; mktime(&amp;time_date) &#8211; 8 * 60 * 60; \/\/\u8c03\u7528mktime\u51fd\u6570&#xff0c;\u5c06\u65e5\u671f\u65f6\u95f4\u8f6c\u6362\u4e3a\u79d2\u8ba1\u6570\u5668\u683c\u5f0f<br \/>\n             \/\/- 8 * 60 * 60\u4e3a\u4e1c\u516b\u533a\u7684\u65f6\u533a\u8c03\u6574<\/p>\n<p> RTC_SetCounter(time_cnt);      \/\/\u5c06\u79d2\u8ba1\u6570\u5668\u5199\u5165\u5230RTC\u7684CNT\u4e2d<br \/>\n RTC_WaitForLastTask();       \/\/\u7b49\u5f85\u4e0a\u4e00\u6b21\u64cd\u4f5c\u5b8c\u6210<br \/>\n}<\/p>\n<p>\/**<br \/>\n  * \u51fd    \u6570&#xff1a;RTC\u8bfb\u53d6\u65f6\u95f4<br \/>\n  * \u53c2    \u6570&#xff1a;\u65e0<br \/>\n  * \u8fd4 \u56de \u503c&#xff1a;\u65e0<br \/>\n  * \u8bf4    \u660e&#xff1a;\u8c03\u7528\u6b64\u51fd\u6570\u540e&#xff0c;RTC\u786c\u4ef6\u7535\u8def\u91cc\u65f6\u95f4\u503c\u5c06\u5237\u65b0\u5230\u5168\u5c40\u6570\u7ec4<br \/>\n  *\/<br \/>\nvoid MyRTC_ReadTime(void)<br \/>\n{<br \/>\n time_t time_cnt;  \/\/\u5b9a\u4e49\u79d2\u8ba1\u6570\u5668\u6570\u636e\u7c7b\u578b<br \/>\n struct tm time_date; \/\/\u5b9a\u4e49\u65e5\u671f\u65f6\u95f4\u6570\u636e\u7c7b\u578b<\/p>\n<p> time_cnt &#061; RTC_GetCounter() &#043; 8 * 60 * 60;  \/\/\u8bfb\u53d6RTC\u7684CNT&#xff0c;\u83b7\u53d6\u5f53\u524d\u7684\u79d2\u8ba1\u6570\u5668<br \/>\n             \/\/&#043; 8 * 60 * 60\u4e3a\u4e1c\u516b\u533a\u7684\u65f6\u533a\u8c03\u6574<\/p>\n<p> time_date &#061; *localtime(&amp;time_cnt);    \/\/\u4f7f\u7528localtime\u51fd\u6570&#xff0c;\u5c06\u79d2\u8ba1\u6570\u5668\u8f6c\u6362\u4e3a\u65e5\u671f\u65f6\u95f4\u683c\u5f0f<\/p>\n<p> MyRTC_Time[0] &#061; time_date.tm_year &#043; 1900;  \/\/\u5c06\u65e5\u671f\u65f6\u95f4\u7ed3\u6784\u4f53\u8d4b\u503c\u7ed9\u6570\u7ec4\u7684\u65f6\u95f4<br \/>\n MyRTC_Time[1] &#061; time_date.tm_mon &#043; 1;<br \/>\n MyRTC_Time[2] &#061; time_date.tm_mday;<br \/>\n MyRTC_Time[3] &#061; time_date.tm_hour;<br \/>\n MyRTC_Time[4] &#061; time_date.tm_min;<br \/>\n MyRTC_Time[5] &#061; time_date.tm_sec;<br \/>\n}<\/p>\n<p>\u7136\u540e\u5728main.c\u7684while\u91cc\u9762\u8c03\u7528MyRTC_ReadTime\u5c31\u80fd\u8bfb\u53d6\u5b9e\u65f6\u65f6\u949f\u4e86<\/p>\n<h4>11.PWR<\/h4>\n<p>PWR\u7535\u6e90\u63a7\u5236&#xff1a;PWR\u8d1f\u8d23\u7ba1\u7406stm32\u5185\u90e8\u7684\u7535\u6e90\u4f9b\u7535\u90e8\u5206&#xff0c;\u53ef\u4ee5\u5b9e\u73b0\u53ef\u7f16\u7a0b\u7535\u538b\u76d1\u6d4b\u5668\u548c\u4f4e\u529f\u8017\u6a21\u5f0f\u7684\u529f\u80fd \u53ef\u7f16\u7a0b\u7535\u538b\u76d1\u6d4b\u5668(PVD)\u53ef\u4ee5\u76d1\u63a7VDD\u7535\u6e90\u7535\u538b&#xff0c;\u5f53VDD\u4e0b\u964d\u5230PVD\u9608\u503c\u4ee5\u4e0b\u6216\u8005\u4e4b\u4e0a\u65f6&#xff0c;PVD\u4f1a\u89e6\u53d1\u4e2d\u65ad&#xff0c;\u7528\u4e8e\u6267\u884c\u7d27\u6025\u5173\u95ed\u4efb\u52a1 \u4f4e\u529f\u8017\u529f\u80fd\u5305\u62ec\u7761\u7720\u6a21\u5f0f(sleep)\u3001\u505c\u673a\u6a21\u5f0f(stop)\u3001\u548c\u5f85\u673a\u6a21\u5f0f(standby)&#xff0c;\u53ef\u5728\u7cfb\u7edf\u7a7a\u95f2\u65f6&#xff0c;\u964d\u4f4estm32\u7684\u529f\u8017&#xff0c;\u5ef6\u957f\u8bbe\u5907\u7684\u4f7f\u7528\u65f6\u95f4&#xff0c;\u7761\u7720\u6a21\u5f0f\u4e00\u822c\u7701\u7535&#xff0c;\u505c\u673a\u6a21\u5f0f\u6bd4\u8f83\u7701\u7535&#xff0c;\u5f85\u673a\u6a21\u5f0f\u6781\u4e3a\u7701\u7535<\/p>\n<p>\u7535\u6e90\u6846\u56fe&#xff1a;<\/p>\n<p><img decoding=\"async\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2025\/04\/20250428024640-680eec10bf10f.png\" alt=\"\u56fe\u7247\u6d88\u5931\u4e86\" \/> <\/p>\n<p>\u4e0a\u7535\u590d\u4f4d\u548c\u6389\u7535\u590d\u4f4d\u7684\u6ce2\u5f62\u56fe&#xff1a;<\/p>\n<p><img decoding=\"async\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2025\/04\/20250428024640-680eec10f3f11.png\" alt=\"\u56fe\u7247\u6d88\u5931\u4e86\" \/> <\/p>\n<p>PVD\u7684\u95e8\u9650&#xff1a;<\/p>\n<p><img decoding=\"async\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2025\/04\/20250428024641-680eec11453fa.png\" alt=\"\u56fe\u7247\u6d88\u5931\u4e86\" \/> <\/p>\n<p>\u4f4e\u529f\u8017\u6a21\u5f0f\u4e00\u89c8&#xff1a;<\/p>\n<p><img decoding=\"async\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2025\/04\/20250428024641-680eec1187283.png\" alt=\"\u56fe\u7247\u6d88\u5931\u4e86\" \/> <\/p>\n<p>\u6a21\u5f0f\u7ec6\u5206&#xff1a;<\/p>\n<p><img decoding=\"async\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2025\/04\/20250428024641-680eec11ed6ee.png\" alt=\"\u56fe\u7247\u6d88\u5931\u4e86\" \/> <\/p>\n<p>\u7761\u7720\u6a21\u5f0f&#xff1a;<\/p>\n<li>\u6267\u884c\u5b8cWFI\/WFE\u6307\u4ee4\u540e&#xff0c;stm32\u8fdb\u5165\u7761\u7720\u6a21\u5f0f&#xff0c;\u7a0b\u5e8f\u6682\u505c\u8fd0\u884c&#xff0c;\u5524\u9192\u540e\u7a0b\u5e8f\u4ece\u6682\u505c\u7684\u5730\u65b9\u7ee7\u7eed\u8fd0\u884c<\/li>\n<li>SLEEPONEXIT\u4f4d\u51b3\u5b9astm32\u6267\u884c\u5b8cWFI\u6216WFE\u540e&#xff0c;\u662f\u7acb\u523b\u8fdb\u5165\u7761\u7720&#xff0c;\u8fd8\u662f\u7b49stm32\u4ece\u6700\u4f4e\u4f18\u5148\u7ea7\u7684\u4e2d\u65ad\u5904\u7406\u7a0b\u5e8f\u4e2d\u9000\u51fa\u65f6\u8fdb\u5165\u7761\u7720<\/li>\n<li>\u5728\u7761\u7720\u6a21\u5f0f\u4e0b&#xff0c;\u6240\u6709\u7684I\/O\u5f15\u811a\u90fd\u4fdd\u6301\u5b83\u4eec\u5728\u8fd0\u884c\u6a21\u5f0f\u65f6\u7684\u72b6\u6001<\/li>\n<li>WFI\u6307\u4ee4\u8fdb\u5165\u7761\u7720\u6a21\u5f0f&#xff0c;\u53ef\u88ab\u4efb\u4f55\u4e00\u4e2aNVIC\u54cd\u5e94\u7684\u4e2d\u65ad\u5524\u9192<\/li>\n<li>WFE\u6307\u4ee4\u8fdb\u5165\u7761\u7720\u6a21\u5f0f&#xff0c;\u53ef\u88ab\u5524\u9192\u4e8b\u4ef6\u5524\u9192<\/li>\n<p>\u505c\u6b62\u6a21\u5f0f&#xff1a;<\/p>\n<li>\u6267\u884c\u5b8cWFI\/WFE\u6307\u4ee4\u540e&#xff0c;stm32\u8fdb\u5165\u505c\u6b62\u6a21\u5f0f&#xff0c;\u7a0b\u5e8f\u6682\u505c\u8fd0\u884c&#xff0c;\u5524\u9192\u540e\u7a0b\u5e8f\u4ece\u6682\u505c\u7684\u5730\u65b9\u7ee7\u7eed\u8fd0\u884c<\/li>\n<li>1.8v\u4f9b\u7535\u533a\u57df\u7684\u6240\u6709\u65f6\u949f\u90fd\u88ab\u505c\u6b62&#xff0c;PLL\u3001HSI\u548cHSE\u88ab\u7981\u6b62&#xff0c;SRAM\u548c\u5bc4\u5b58\u5668\u5185\u5bb9\u88ab\u4fdd\u7559\u4e0b\u6765<\/li>\n<li>\u5728\u505c\u6b62\u6a21\u5f0f\u4e0b&#xff0c;\u6240\u6709\u7684I\/O\u5f15\u811a\u90fd\u4fdd\u6301\u5b83\u4eec\u5728\u8fd0\u884c\u6a21\u5f0f\u65f6\u7684\u72b6\u6001<\/li>\n<li>\u5f53\u4e00\u4e2a\u4e2d\u65ad\u6216\u5524\u9192\u4e8b\u4ef6\u5bfc\u81f4\u9000\u51fa\u505c\u6b62\u6a21\u5f0f\u65f6&#xff0c;HSI\u88ab\u9009\u4e3a\u7cfb\u7edf\u65f6\u949f<\/li>\n<li>\u5f53\u7535\u538b\u8c03\u8282\u5668\u5904\u4e8e\u4f4e\u529f\u8017\u6a21\u5f0f\u4e0b&#xff0c;\u7cfb\u7edf\u4ece\u505c\u6b62\u6a21\u5f0f\u9000\u51fa&#xff0c;\u4f1a\u6709\u4e00\u6bb5\u989d\u5916\u7684\u542f\u52a8\u5ef6\u65f6<\/li>\n<li>WFI\u6307\u4ee4\u8fdb\u5165\u505c\u6b62\u6a21\u5f0f&#xff0c;\u53ef\u88ab\u4efb\u4f55\u4e00\u4e2aEXTI\u4e2d\u65ad\u5524\u9192<\/li>\n<li>WFE\u6307\u4ee4\u8fdb\u5165\u505c\u6b62\u6a21\u5f0f&#xff0c;\u53ef\u88ab\u4efb\u4f55\u4e00\u4e2aEXTI\u4e8b\u4ef6\u5524\u9192<\/li>\n<p>\u5f85\u673a\u6a21\u5f0f&#xff1a;<\/p>\n<li>\u6267\u884c\u5b8cWFI\/WFE\u6307\u4ee4\u540e&#xff0c;stm32\u8fdb\u5165\u5f85\u673a\u6a21\u5f0f&#xff0c;\u5524\u9192\u540e\u7a0b\u5e8f\u4ece\u5934\u5f00\u59cb\u8fd0\u884c<\/li>\n<li>\u6574\u4e2a1.8v\u4f9b\u7535\u533a\u57df\u88ab\u65ad\u7535&#xff0c;PLL\u3001HSI\u548cHSE\u4e5f\u88ab\u65ad\u7535&#xff0c;SRAM\u548c\u5bc4\u5b58\u5668\u5185\u5bb9\u4e22\u5931&#xff0c;\u53ea\u6709\u5907\u4efd\u7684\u5bc4\u5b58\u5668\u548c\u5f85\u673a\u7535\u8def\u7ef4\u6301\u4f9b\u7535<\/li>\n<li>\u5728\u5f85\u673a\u6a21\u5f0f\u4e0b&#xff0c;\u6240\u6709\u7684I\/O\u5f15\u811a\u53d8\u4e3a\u9ad8\u963b\u6001(\u6d6e\u7a7a\u8f93\u5165)<\/li>\n<li>WKUP\u5f15\u811a\u7684\u4e0a\u5347\u6cbf\u3001RTC\u95f9\u949f\u4e8b\u4ef6\u7684\u4e0a\u5347\u6cbf\u3001NRST\u5f15\u811a\u4e0a\u5916\u90e8\u590d\u4f4d\u3001IWDG\u590d\u4f4d\u9000\u51fa\u5f85\u673a\u6a21\u5f0f<\/li>\n<p>\u4ee3\u7801&#xff1a; \u4fee\u6539\u4e3b\u9891&#xff1a; (\u5728system_stm32f10x.c\u4e2d\u5c06\u5176\u5b83\u7684\u6ce8\u91ca\u6389\u5c31\u884c)<\/p>\n<p>\/* #define SYSCLK_FREQ_HSE    HSE_VALUE *\/<br \/>\n\/* #define SYSCLK_FREQ_24MHz  24000000 *\/<br \/>\n#define SYSCLK_FREQ_36MHz  36000000<br \/>\n\/* #define SYSCLK_FREQ_48MHz  48000000 *\/<br \/>\n\/* #define SYSCLK_FREQ_56MHz  56000000 *\/<br \/>\n\/* #define SYSCLK_FREQ_72MHz  72000000 *\/<\/p>\n<p>\u5e93\u51fd\u6570\u4e2d\u5df2\u7ecf\u5b8f\u5b9a\u4e49\u4e86SystemCoreClock&#xff1a;\u65f6\u949f\u9891\u7387 \u542f\u52a8\u7761\u7720\u6a21\u5f0f&#xff1a; (\u4e32\u53e3\u53d1\u9001\u63a5\u6536\u4f1a\u6253\u65ad\u7761\u7720\u6a21\u5f0f)<\/p>\n<p>__WFI(); \/\/\u6267\u884cWFI\u6307\u4ee4&#xff0c;CPU\u7761\u7720&#xff0c;\u5e76\u7b49\u5f85\u4e2d\u65ad\u5524\u9192&#xff0c;WFI\u7684\u5185\u6838\u662f\u6c47\u7f16\u4ee3\u7801<br \/>\n\/\/__WFE();  \/\/\u4e2d\u65ad\u4e8b\u4ef6&#xff0c;\u914d\u7f6e\u6bd4WFI\u96be&#xff0c;\u6240\u4ee5\u4e00\u822c\u7528\u4e0a\u9762\u7684<\/p>\n<p>\u542f\u52a8\u505c\u6b62\u6a21\u5f0f&#xff1a; (\u70e7\u5f55\u524d\u9700\u8981\u6309\u4f4f\u590d\u4f4d\u952e&#xff0c;\u70e7\u5f55\u5b8c\u4e4b\u540e\u677e\u5f00&#xff0c;\u5916\u90e8\u4e2d\u65ad\u80fd\u4e2d\u65ad\u505c\u6b62\u6a21\u5f0f)<\/p>\n<p>RCC_APB1PeriphClockCmd(RCC_APB1Periph_PWR, ENABLE);<br \/>\n\/\/\u5f00\u542fPWR\u7684\u65f6\u949f<br \/>\n\/\/\u505c\u6b62\u6a21\u5f0f\u548c\u5f85\u673a\u6a21\u5f0f\u4e00\u5b9a\u8981\u8bb0\u5f97\u5f00\u542f<br \/>\nPWR_EnterSTOPMode(PWR_Regulator_ON, PWR_STOPEntry_WFI);<br \/>\n\/\/STM32\u8fdb\u5165\u505c\u6b62\u6a21\u5f0f&#xff0c;\u5e76\u7b49\u5f85\u4e2d\u65ad\u5524\u9192<br \/>\nSystemInit();          \/\/\u5524\u9192\u540e&#xff0c;\u8981\u91cd\u65b0\u914d\u7f6e\u65f6\u949f<\/p>\n<p>\u5f85\u673a\u6a21\u5f0f&#xff1a; (\u540c\u6837\u8981\u6309\u4f4f\u590d\u4f4d\u952e)<\/p>\n<p>RCC_APB1PeriphClockCmd(RCC_APB1Periph_PWR, ENABLE);<br \/>\n\/\/\u5f00\u542fPWR\u7684\u65f6\u949f<br \/>\n\/\/\u505c\u6b62\u6a21\u5f0f\u548c\u5f85\u673a\u6a21\u5f0f\u4e00\u5b9a\u8981\u8bb0\u5f97\u5f00\u542f<br \/>\nPWR_EnterSTANDBYMode();<br \/>\n\/\/STM32\u8fdb\u5165\u505c\u6b62\u6a21\u5f0f&#xff0c;\u5e76\u7b49\u5f85\u6307\u5b9a\u7684\u5524\u9192\u4e8b\u4ef6&#xff08;WKUP\u4e0a\u5347\u6cbf\u6216RTC\u95f9\u949f&#xff09;<\/p>\n<h3>\u56db.\u770b\u95e8\u72d7<\/h3>\n<h4>1.\u72ec\u7acb\u770b\u95e8\u72d7<\/h4>\n<p>WDG(Watchdog)\u770b\u95e8\u72d7&#xff1a;\u770b\u95e8\u72d7\u53ef\u4ee5\u76d1\u63a7\u7a0b\u5e8f\u7684\u8fd0\u884c\u72b6\u6001&#xff0c;\u5f53\u7a0b\u5e8f\u56e0\u4e3a\u8bbe\u8ba1\u6f0f\u6d1e\u3001\u786c\u4ef6\u6545\u969c\u3001\u7535\u78c1\u5e72\u6270\u7b49\u539f\u56e0&#xff0c;\u51fa\u73b0\u5361\u6b7b\u6216\u8005\u8dd1\u98de\u73b0\u8c61\u65f6&#xff0c;\u770b\u95e8\u72d7\u80fd\u53ca\u65f6\u590d\u4f4d\u7a0b\u5e8f&#xff0c;\u907f\u514d\u7a0b\u5e8f\u9677\u5165\u957f\u65f6\u95f4\u7684\u7f62\u5de5\u72b6\u6001&#xff0c;\u4fdd\u8bc1\u7cfb\u7edf\u7684\u53ef\u9760\u6027\u548c\u5b89\u5168\u6027 \u770b\u95e8\u72d7\u672c\u8d28\u4e0a\u662f\u4e00\u4e2a\u5b9a\u65f6\u5668&#xff0c;\u5f53\u6307\u5b9a\u65f6\u95f4\u8303\u56f4\u5185&#xff0c;\u7a0b\u5e8f\u6ca1\u6709\u6267\u884c\u5582\u72d7(\u91cd\u7f6e\u8ba1\u6570\u5668)\u64cd\u4f5c\u65f6&#xff0c;\u770b\u95e8\u72d7\u786c\u4ef6\u7535\u8def\u5c31\u81ea\u52a8\u4ea7\u751f\u590d\u4f4d\u4fe1\u53f7 stm32\u5185\u7f6e\u4e24\u4e2a\u770b\u95e8\u72d7&#xff1a; \u72ec\u7acb\u770b\u95e8\u72d7(IWDG)&#xff1a;\u72ec\u7acb\u5de5\u4f5c&#xff0c;\u5bf9\u65f6\u95f4\u7cbe\u5ea6\u8981\u6c42\u8f83\u4f4e \u7a97\u53e3\u770b\u95e8\u72d7(WWDG)&#xff1a;\u8981\u6c42\u770b\u95e8\u72d7\u5728\u7cbe\u786e\u8ba1\u65f6\u7a97\u53e3\u8d77\u4f5c\u7528 IWDG\u6846\u56fe&#xff1a;<\/p>\n<p><img decoding=\"async\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2025\/04\/20250428024642-680eec12595d4.png\" alt=\"\u56fe\u7247\u6d88\u5931\u4e86\" \/> <\/p>\n<p>IWDG\u952e\u5bc4\u5b58\u5668&#xff1a;\u952e\u5bc4\u5b58\u5668\u672c\u8d28\u4e0a\u662f\u63a7\u5236\u5bc4\u5b58\u5668&#xff0c;\u7528\u4e8e\u63a7\u5236\u786c\u4ef6\u7535\u8def\u7684\u5de5\u4f5c \u5728\u53ef\u80fd\u5b58\u5728\u5e72\u6270\u7684\u60c5\u51b5\u4e0b&#xff0c;\u4e00\u822c\u901a\u8fc7\u5728\u6574\u4e2a\u952e\u5bc4\u5b58\u5668\u5199\u5165\u7279\u5b9a\u503c\u6765\u4ee3\u66ff\u63a7\u5236\u5bc4\u5b58\u5668\u5199\u5165\u4e00\u4f4d\u7684\u529f\u80fd&#xff0c;\u4ee5\u964d\u4f4e\u786c\u4ef6\u7535\u8def\u6536\u5230\u5e72\u6270\u7684\u6982\u7387<\/p>\n<p><img decoding=\"async\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2025\/04\/20250428024642-680eec12ac1a7.png\" alt=\"\u56fe\u7247\u6d88\u5931\u4e86\" \/> <\/p>\n<p>\u8d85\u65f6\u65f6\u95f4&#xff1a;<span class=\"katex--inline\"><span class=\"katex\"><span class=\"katex-mathml\"> <\/p>\n<p>          T <\/p>\n<p>           I <\/p>\n<p>           W <\/p>\n<p>           D <\/p>\n<p>           G <\/p>\n<p>         &#061; <\/p>\n<p>          T <\/p>\n<p>           L <\/p>\n<p>           S <\/p>\n<p>           I <\/p>\n<p>         \u00d7 <\/p>\n<p>         P <\/p>\n<p>         R <\/p>\n<p>         \u9884\u5206\u9891\u7cfb\u6570 <\/p>\n<p>         \u00d7 <\/p>\n<p>         ( <\/p>\n<p>         R <\/p>\n<p>         L <\/p>\n<p>         &#043; <\/p>\n<p>         1 <\/p>\n<p>         ) <\/p>\n<p>        T_{IWDG} &#061; T_{LSI} \\\\times PR\u9884\u5206\u9891\u7cfb\u6570 \\\\times (RL &#043; 1) <\/p>\n<p>    <\/span><span class=\"katex-html\"><span class=\"base\"><span class=\"strut\" style=\"height: 0.8333em;vertical-align: -0.15em\"><\/span><span class=\"mord\"><span class=\"mord mathnormal\" style=\"margin-right: 0.1389em\">T<\/span><span class=\"msupsub\"><span class=\"vlist-t vlist-t2\"><span class=\"vlist-r\"><span class=\"vlist\" style=\"height: 0.3283em\"><span class=\"\" style=\"top: -2.55em;margin-left: -0.1389em;margin-right: 0.05em\"><span class=\"pstrut\" style=\"height: 2.7em\"><\/span><span class=\"sizing reset-size6 size3 mtight\"><span class=\"mord mtight\"><span class=\"mord mathnormal mtight\" style=\"margin-right: 0.0785em\">I<\/span><span class=\"mord mathnormal mtight\" style=\"margin-right: 0.1389em\">W<\/span><span class=\"mord mathnormal mtight\" style=\"margin-right: 0.0278em\">D<\/span><span class=\"mord mathnormal mtight\">G<\/span><\/span><\/span><\/span><\/span><span class=\"vlist-s\">\u200b<\/span><\/span><span class=\"vlist-r\"><span class=\"vlist\" style=\"height: 0.15em\"><span class=\"\"><\/span><\/span><\/span><\/span><\/span><\/span><span class=\"mspace\" style=\"margin-right: 0.2778em\"><\/span><span class=\"mrel\">&#061;<\/span><span class=\"mspace\" style=\"margin-right: 0.2778em\"><\/span><\/span><span class=\"base\"><span class=\"strut\" style=\"height: 0.8333em;vertical-align: -0.15em\"><\/span><span class=\"mord\"><span class=\"mord mathnormal\" style=\"margin-right: 0.1389em\">T<\/span><span class=\"msupsub\"><span class=\"vlist-t vlist-t2\"><span class=\"vlist-r\"><span class=\"vlist\" style=\"height: 0.3283em\"><span class=\"\" style=\"top: -2.55em;margin-left: -0.1389em;margin-right: 0.05em\"><span class=\"pstrut\" style=\"height: 2.7em\"><\/span><span class=\"sizing reset-size6 size3 mtight\"><span class=\"mord mtight\"><span class=\"mord mathnormal mtight\">L<\/span><span class=\"mord mathnormal mtight\" style=\"margin-right: 0.0576em\">S<\/span><span class=\"mord mathnormal mtight\" style=\"margin-right: 0.0785em\">I<\/span><\/span><\/span><\/span><\/span><span class=\"vlist-s\">\u200b<\/span><\/span><span class=\"vlist-r\"><span class=\"vlist\" style=\"height: 0.15em\"><span class=\"\"><\/span><\/span><\/span><\/span><\/span><\/span><span class=\"mspace\" style=\"margin-right: 0.2222em\"><\/span><span class=\"mbin\">\u00d7<\/span><span class=\"mspace\" style=\"margin-right: 0.2222em\"><\/span><\/span><span class=\"base\"><span class=\"strut\" style=\"height: 0.7667em;vertical-align: -0.0833em\"><\/span><span class=\"mord mathnormal\" style=\"margin-right: 0.0077em\">PR<\/span><span class=\"mord cjk_fallback\">\u9884\u5206\u9891\u7cfb\u6570<\/span><span class=\"mspace\" style=\"margin-right: 0.2222em\"><\/span><span class=\"mbin\">\u00d7<\/span><span class=\"mspace\" style=\"margin-right: 0.2222em\"><\/span><\/span><span class=\"base\"><span class=\"strut\" style=\"height: 1em;vertical-align: -0.25em\"><\/span><span class=\"mopen\">(<\/span><span class=\"mord mathnormal\" style=\"margin-right: 0.0077em\">R<\/span><span class=\"mord mathnormal\">L<\/span><span class=\"mspace\" style=\"margin-right: 0.2222em\"><\/span><span class=\"mbin\">&#043;<\/span><span class=\"mspace\" style=\"margin-right: 0.2222em\"><\/span><\/span><span class=\"base\"><span class=\"strut\" style=\"height: 1em;vertical-align: -0.25em\"><\/span><span class=\"mord\">1<\/span><span class=\"mclose\">)<\/span><\/span><\/span><\/span><\/span> \u5176\u4e2d&#xff1a;<span class=\"katex--inline\"><span class=\"katex\"><span class=\"katex-mathml\"> <\/p>\n<p>          T <\/p>\n<p>           L <\/p>\n<p>           S <\/p>\n<p>           I <\/p>\n<p>         &#061; <\/p>\n<p>          1 <\/p>\n<p>           F <\/p>\n<p>            L <\/p>\n<p>            S <\/p>\n<p>            I <\/p>\n<p>        T_{LSI} &#061; \\\\frac{1}{F_{LSI}} <\/p>\n<p>    <\/span><span class=\"katex-html\"><span class=\"base\"><span class=\"strut\" style=\"height: 0.8333em;vertical-align: -0.15em\"><\/span><span class=\"mord\"><span class=\"mord mathnormal\" style=\"margin-right: 0.1389em\">T<\/span><span class=\"msupsub\"><span class=\"vlist-t vlist-t2\"><span class=\"vlist-r\"><span class=\"vlist\" style=\"height: 0.3283em\"><span class=\"\" style=\"top: -2.55em;margin-left: -0.1389em;margin-right: 0.05em\"><span class=\"pstrut\" style=\"height: 2.7em\"><\/span><span class=\"sizing reset-size6 size3 mtight\"><span class=\"mord mtight\"><span class=\"mord mathnormal mtight\">L<\/span><span class=\"mord mathnormal mtight\" style=\"margin-right: 0.0576em\">S<\/span><span class=\"mord mathnormal mtight\" style=\"margin-right: 0.0785em\">I<\/span><\/span><\/span><\/span><\/span><span class=\"vlist-s\">\u200b<\/span><\/span><span class=\"vlist-r\"><span class=\"vlist\" style=\"height: 0.15em\"><span class=\"\"><\/span><\/span><\/span><\/span><\/span><\/span><span class=\"mspace\" style=\"margin-right: 0.2778em\"><\/span><span class=\"mrel\">&#061;<\/span><span class=\"mspace\" style=\"margin-right: 0.2778em\"><\/span><\/span><span class=\"base\"><span class=\"strut\" style=\"height: 1.2904em;vertical-align: -0.4453em\"><\/span><span class=\"mord\"><span class=\"mopen nulldelimiter\"><\/span><span class=\"mfrac\"><span class=\"vlist-t vlist-t2\"><span class=\"vlist-r\"><span class=\"vlist\" style=\"height: 0.8451em\"><span class=\"\" style=\"top: -2.655em\"><span class=\"pstrut\" style=\"height: 3em\"><\/span><span class=\"sizing reset-size6 size3 mtight\"><span class=\"mord mtight\"><span class=\"mord mtight\"><span class=\"mord mathnormal mtight\" style=\"margin-right: 0.1389em\">F<\/span><span class=\"msupsub\"><span class=\"vlist-t vlist-t2\"><span class=\"vlist-r\"><span class=\"vlist\" style=\"height: 0.3448em\"><span class=\"\" style=\"top: -2.3567em;margin-left: -0.1389em;margin-right: 0.0714em\"><span class=\"pstrut\" style=\"height: 2.5em\"><\/span><span class=\"sizing reset-size3 size1 mtight\"><span class=\"mord mtight\"><span class=\"mord mathnormal mtight\">L<\/span><span class=\"mord mathnormal mtight\" style=\"margin-right: 0.0576em\">S<\/span><span class=\"mord mathnormal mtight\" style=\"margin-right: 0.0785em\">I<\/span><\/span><\/span><\/span><\/span><span class=\"vlist-s\">\u200b<\/span><\/span><span class=\"vlist-r\"><span class=\"vlist\" style=\"height: 0.1433em\"><span class=\"\"><\/span><\/span><\/span><\/span><\/span><\/span><\/span><\/span><\/span><span class=\"\" style=\"top: -3.23em\"><span class=\"pstrut\" style=\"height: 3em\"><\/span><span class=\"frac-line\" style=\"border-bottom-width: 0.04em\"><\/span><\/span><span class=\"\" style=\"top: -3.394em\"><span class=\"pstrut\" style=\"height: 3em\"><\/span><span class=\"sizing reset-size6 size3 mtight\"><span class=\"mord mtight\"><span class=\"mord mtight\">1<\/span><\/span><\/span><\/span><\/span><span class=\"vlist-s\">\u200b<\/span><\/span><span class=\"vlist-r\"><span class=\"vlist\" style=\"height: 0.4453em\"><span class=\"\"><\/span><\/span><\/span><\/span><\/span><span class=\"mclose nulldelimiter\"><\/span><\/span><\/span><\/span><\/span><\/span><\/p>\n<p><img decoding=\"async\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2025\/04\/20250428024642-680eec12e6148.png\" alt=\"\u56fe\u7247\u6d88\u5931\u4e86\" \/> <\/p>\n<h4>2.\u7a97\u53e3\u770b\u95e8\u72d7<\/h4>\n<p><img decoding=\"async\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2025\/04\/20250428024643-680eec133276d.png\" alt=\"\u56fe\u7247\u6d88\u5931\u4e86\" \/> <\/p>\n<p>WWDG\u5de5\u4f5c\u7279\u6027&#xff1a;<\/p>\n<li>\u9012\u51cf\u8ba1\u6570\u5668T[6:0]\u7684\u503c\u5c0f\u4e8e0x40\u65f6&#xff0c;WWDG\u4ea7\u751f\u590d\u4f4d<\/li>\n<li>\u9012\u51cf\u8ba1\u6570\u5668T[6:0]\u5728\u7a97\u53e3W[6:0]\u5916\u88ab\u91cd\u65b0\u88c5\u8f7d\u65f6&#xff0c;WWDG\u4ea7\u751f\u590d\u4f4d(\u4e0d\u80fd\u8fc7\u65e9\u5582\u72d7)<\/li>\n<li>\u9012\u51cf\u8ba1\u6570\u5668T[6:0]\u7b49\u4e8e0x40\u65f6\u53ef\u4ee5\u4ea7\u751f\u65e9\u671f\u5524\u9192\u4e2d\u65ad(EWI)&#xff0c;\u7528\u4e8e\u91cd\u88c5\u8f7d\u8ba1\u6570\u5668\u4ee5\u907f\u514dWWDG\u590d\u4f4d(\u53ef\u4ee5\u4fdd\u5b58\u91cd\u8981\u6570\u636e\u7b49)<\/li>\n<li>\u5b9a\u671f\u5199\u5165WWDG_CR\u5bc4\u5b58\u5668(\u5582\u72d7)\u4ee5\u907f\u514dWWDG\u590d\u4f4d<\/li>\n<p><img decoding=\"async\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2025\/04\/20250428024643-680eec1376b07.png\" alt=\"\u56fe\u7247\u6d88\u5931\u4e86\" \/> <\/p>\n<p>WWDG\u8d85\u65f6\u65f6\u95f4&#xff1a; \u8d85\u65f6\u65f6\u95f4&#xff1a;<span class=\"katex--inline\"><span class=\"katex\"><span class=\"katex-mathml\"> <\/p>\n<p>          T <\/p>\n<p>           W <\/p>\n<p>           W <\/p>\n<p>           D <\/p>\n<p>           G <\/p>\n<p>         &#061; <\/p>\n<p>          T <\/p>\n<p>           P <\/p>\n<p>           C <\/p>\n<p>           L <\/p>\n<p>           K <\/p>\n<p>           1 <\/p>\n<p>         \u00d7 <\/p>\n<p>         4096 <\/p>\n<p>         \u00d7 <\/p>\n<p>         W <\/p>\n<p>         D <\/p>\n<p>         G <\/p>\n<p>         T <\/p>\n<p>         B <\/p>\n<p>         \u9884\u5206\u9891\u7cfb\u6570 <\/p>\n<p>         \u00d7 <\/p>\n<p>         ( <\/p>\n<p>         T <\/p>\n<p>         [ <\/p>\n<p>         5 <\/p>\n<p>         : <\/p>\n<p>         0 <\/p>\n<p>         ] <\/p>\n<p>         &#043; <\/p>\n<p>         1 <\/p>\n<p>         ) <\/p>\n<p>        T_{WWDG} &#061; T_{PCLK1} \\\\times 4096 \\\\times WDGTB\u9884\u5206\u9891\u7cfb\u6570 \\\\times (T[5:0] &#043; 1) <\/p>\n<p>    <\/span><span class=\"katex-html\"><span class=\"base\"><span class=\"strut\" style=\"height: 0.8333em;vertical-align: -0.15em\"><\/span><span class=\"mord\"><span class=\"mord mathnormal\" style=\"margin-right: 0.1389em\">T<\/span><span class=\"msupsub\"><span class=\"vlist-t vlist-t2\"><span class=\"vlist-r\"><span class=\"vlist\" style=\"height: 0.3283em\"><span class=\"\" style=\"top: -2.55em;margin-left: -0.1389em;margin-right: 0.05em\"><span class=\"pstrut\" style=\"height: 2.7em\"><\/span><span class=\"sizing reset-size6 size3 mtight\"><span class=\"mord mtight\"><span class=\"mord mathnormal mtight\" style=\"margin-right: 0.1389em\">WW<\/span><span class=\"mord mathnormal mtight\" style=\"margin-right: 0.0278em\">D<\/span><span class=\"mord mathnormal mtight\">G<\/span><\/span><\/span><\/span><\/span><span class=\"vlist-s\">\u200b<\/span><\/span><span class=\"vlist-r\"><span class=\"vlist\" style=\"height: 0.15em\"><span class=\"\"><\/span><\/span><\/span><\/span><\/span><\/span><span class=\"mspace\" style=\"margin-right: 0.2778em\"><\/span><span class=\"mrel\">&#061;<\/span><span class=\"mspace\" style=\"margin-right: 0.2778em\"><\/span><\/span><span class=\"base\"><span class=\"strut\" style=\"height: 0.8333em;vertical-align: -0.15em\"><\/span><span class=\"mord\"><span class=\"mord mathnormal\" style=\"margin-right: 0.1389em\">T<\/span><span class=\"msupsub\"><span class=\"vlist-t vlist-t2\"><span class=\"vlist-r\"><span class=\"vlist\" style=\"height: 0.3283em\"><span class=\"\" style=\"top: -2.55em;margin-left: -0.1389em;margin-right: 0.05em\"><span class=\"pstrut\" style=\"height: 2.7em\"><\/span><span class=\"sizing reset-size6 size3 mtight\"><span class=\"mord mtight\"><span class=\"mord mathnormal mtight\" style=\"margin-right: 0.0715em\">PC<\/span><span class=\"mord mathnormal mtight\">L<\/span><span class=\"mord mathnormal mtight\" style=\"margin-right: 0.0715em\">K<\/span><span class=\"mord mtight\">1<\/span><\/span><\/span><\/span><\/span><span class=\"vlist-s\">\u200b<\/span><\/span><span class=\"vlist-r\"><span class=\"vlist\" style=\"height: 0.15em\"><span class=\"\"><\/span><\/span><\/span><\/span><\/span><\/span><span class=\"mspace\" style=\"margin-right: 0.2222em\"><\/span><span class=\"mbin\">\u00d7<\/span><span class=\"mspace\" style=\"margin-right: 0.2222em\"><\/span><\/span><span class=\"base\"><span class=\"strut\" style=\"height: 0.7278em;vertical-align: -0.0833em\"><\/span><span class=\"mord\">4096<\/span><span class=\"mspace\" style=\"margin-right: 0.2222em\"><\/span><span class=\"mbin\">\u00d7<\/span><span class=\"mspace\" style=\"margin-right: 0.2222em\"><\/span><\/span><span class=\"base\"><span class=\"strut\" style=\"height: 0.7667em;vertical-align: -0.0833em\"><\/span><span class=\"mord mathnormal\" style=\"margin-right: 0.1389em\">W<\/span><span class=\"mord mathnormal\" style=\"margin-right: 0.0278em\">D<\/span><span class=\"mord mathnormal\" style=\"margin-right: 0.0502em\">GTB<\/span><span class=\"mord cjk_fallback\">\u9884\u5206\u9891\u7cfb\u6570<\/span><span class=\"mspace\" style=\"margin-right: 0.2222em\"><\/span><span class=\"mbin\">\u00d7<\/span><span class=\"mspace\" style=\"margin-right: 0.2222em\"><\/span><\/span><span class=\"base\"><span class=\"strut\" style=\"height: 1em;vertical-align: -0.25em\"><\/span><span class=\"mopen\">(<\/span><span class=\"mord mathnormal\" style=\"margin-right: 0.1389em\">T<\/span><span class=\"mopen\">[<\/span><span class=\"mord\">5<\/span><span class=\"mspace\" style=\"margin-right: 0.2778em\"><\/span><span class=\"mrel\">:<\/span><span class=\"mspace\" style=\"margin-right: 0.2778em\"><\/span><\/span><span class=\"base\"><span class=\"strut\" style=\"height: 1em;vertical-align: -0.25em\"><\/span><span class=\"mord\">0<\/span><span class=\"mclose\">]<\/span><span class=\"mspace\" style=\"margin-right: 0.2222em\"><\/span><span class=\"mbin\">&#043;<\/span><span class=\"mspace\" style=\"margin-right: 0.2222em\"><\/span><\/span><span class=\"base\"><span class=\"strut\" style=\"height: 1em;vertical-align: -0.25em\"><\/span><span class=\"mord\">1<\/span><span class=\"mclose\">)<\/span><\/span><\/span><\/span><\/span> \u7a97\u53e3\u65f6\u95f4&#xff1a;<span class=\"katex--inline\"><span class=\"katex\"><span class=\"katex-mathml\"> <\/p>\n<p>          T <\/p>\n<p>           W <\/p>\n<p>           I <\/p>\n<p>           N <\/p>\n<p>         &#061; <\/p>\n<p>          T <\/p>\n<p>           P <\/p>\n<p>           C <\/p>\n<p>           L <\/p>\n<p>           K <\/p>\n<p>           1 <\/p>\n<p>         \u00d7 <\/p>\n<p>         4096 <\/p>\n<p>         \u00d7 <\/p>\n<p>         W <\/p>\n<p>         D <\/p>\n<p>         G <\/p>\n<p>         T <\/p>\n<p>         B <\/p>\n<p>         \u9884\u5206\u9891\u7cfb\u6570 <\/p>\n<p>         \u00d7 <\/p>\n<p>         ( <\/p>\n<p>         T <\/p>\n<p>         [ <\/p>\n<p>         5 <\/p>\n<p>         : <\/p>\n<p>         0 <\/p>\n<p>         ] <\/p>\n<p>         \u2212 <\/p>\n<p>         W <\/p>\n<p>         [ <\/p>\n<p>         5 <\/p>\n<p>         : <\/p>\n<p>         0 <\/p>\n<p>         ] <\/p>\n<p>         ) <\/p>\n<p>        T_{WIN} &#061; T_{PCLK1} \\\\times 4096 \\\\times WDGTB\u9884\u5206\u9891\u7cfb\u6570 \\\\times (T[5:0] &#8211; W[5:0]) <\/p>\n<p>    <\/span><span class=\"katex-html\"><span class=\"base\"><span class=\"strut\" style=\"height: 0.8333em;vertical-align: -0.15em\"><\/span><span class=\"mord\"><span class=\"mord mathnormal\" style=\"margin-right: 0.1389em\">T<\/span><span class=\"msupsub\"><span class=\"vlist-t vlist-t2\"><span class=\"vlist-r\"><span class=\"vlist\" style=\"height: 0.3283em\"><span class=\"\" style=\"top: -2.55em;margin-left: -0.1389em;margin-right: 0.05em\"><span class=\"pstrut\" style=\"height: 2.7em\"><\/span><span class=\"sizing reset-size6 size3 mtight\"><span class=\"mord mtight\"><span class=\"mord mathnormal mtight\" style=\"margin-right: 0.1389em\">W<\/span><span class=\"mord mathnormal mtight\" style=\"margin-right: 0.0785em\">I<\/span><span class=\"mord mathnormal mtight\" style=\"margin-right: 0.109em\">N<\/span><\/span><\/span><\/span><\/span><span class=\"vlist-s\">\u200b<\/span><\/span><span class=\"vlist-r\"><span class=\"vlist\" style=\"height: 0.15em\"><span class=\"\"><\/span><\/span><\/span><\/span><\/span><\/span><span class=\"mspace\" style=\"margin-right: 0.2778em\"><\/span><span class=\"mrel\">&#061;<\/span><span class=\"mspace\" style=\"margin-right: 0.2778em\"><\/span><\/span><span class=\"base\"><span class=\"strut\" style=\"height: 0.8333em;vertical-align: -0.15em\"><\/span><span class=\"mord\"><span class=\"mord mathnormal\" style=\"margin-right: 0.1389em\">T<\/span><span class=\"msupsub\"><span class=\"vlist-t vlist-t2\"><span class=\"vlist-r\"><span class=\"vlist\" style=\"height: 0.3283em\"><span class=\"\" style=\"top: -2.55em;margin-left: -0.1389em;margin-right: 0.05em\"><span class=\"pstrut\" style=\"height: 2.7em\"><\/span><span class=\"sizing reset-size6 size3 mtight\"><span class=\"mord mtight\"><span class=\"mord mathnormal mtight\" style=\"margin-right: 0.0715em\">PC<\/span><span class=\"mord mathnormal mtight\">L<\/span><span class=\"mord mathnormal mtight\" style=\"margin-right: 0.0715em\">K<\/span><span class=\"mord mtight\">1<\/span><\/span><\/span><\/span><\/span><span class=\"vlist-s\">\u200b<\/span><\/span><span class=\"vlist-r\"><span class=\"vlist\" style=\"height: 0.15em\"><span class=\"\"><\/span><\/span><\/span><\/span><\/span><\/span><span class=\"mspace\" style=\"margin-right: 0.2222em\"><\/span><span class=\"mbin\">\u00d7<\/span><span class=\"mspace\" style=\"margin-right: 0.2222em\"><\/span><\/span><span class=\"base\"><span class=\"strut\" style=\"height: 0.7278em;vertical-align: -0.0833em\"><\/span><span class=\"mord\">4096<\/span><span class=\"mspace\" style=\"margin-right: 0.2222em\"><\/span><span class=\"mbin\">\u00d7<\/span><span class=\"mspace\" style=\"margin-right: 0.2222em\"><\/span><\/span><span class=\"base\"><span class=\"strut\" style=\"height: 0.7667em;vertical-align: -0.0833em\"><\/span><span class=\"mord mathnormal\" style=\"margin-right: 0.1389em\">W<\/span><span class=\"mord mathnormal\" style=\"margin-right: 0.0278em\">D<\/span><span class=\"mord mathnormal\" style=\"margin-right: 0.0502em\">GTB<\/span><span class=\"mord cjk_fallback\">\u9884\u5206\u9891\u7cfb\u6570<\/span><span class=\"mspace\" style=\"margin-right: 0.2222em\"><\/span><span class=\"mbin\">\u00d7<\/span><span class=\"mspace\" style=\"margin-right: 0.2222em\"><\/span><\/span><span class=\"base\"><span class=\"strut\" style=\"height: 1em;vertical-align: -0.25em\"><\/span><span class=\"mopen\">(<\/span><span class=\"mord mathnormal\" style=\"margin-right: 0.1389em\">T<\/span><span class=\"mopen\">[<\/span><span class=\"mord\">5<\/span><span class=\"mspace\" style=\"margin-right: 0.2778em\"><\/span><span class=\"mrel\">:<\/span><span class=\"mspace\" style=\"margin-right: 0.2778em\"><\/span><\/span><span class=\"base\"><span class=\"strut\" style=\"height: 1em;vertical-align: -0.25em\"><\/span><span class=\"mord\">0<\/span><span class=\"mclose\">]<\/span><span class=\"mspace\" style=\"margin-right: 0.2222em\"><\/span><span class=\"mbin\">\u2212<\/span><span class=\"mspace\" style=\"margin-right: 0.2222em\"><\/span><\/span><span class=\"base\"><span class=\"strut\" style=\"height: 1em;vertical-align: -0.25em\"><\/span><span class=\"mord mathnormal\" style=\"margin-right: 0.1389em\">W<\/span><span class=\"mopen\">[<\/span><span class=\"mord\">5<\/span><span class=\"mspace\" style=\"margin-right: 0.2778em\"><\/span><span class=\"mrel\">:<\/span><span class=\"mspace\" style=\"margin-right: 0.2778em\"><\/span><\/span><span class=\"base\"><span class=\"strut\" style=\"height: 1em;vertical-align: -0.25em\"><\/span><span class=\"mord\">0<\/span><span class=\"mclose\">])<\/span><\/span><\/span><\/span><\/span> \u5176\u4e2d&#xff1a;<span class=\"katex--inline\"><span class=\"katex\"><span class=\"katex-mathml\"> <\/p>\n<p>          T <\/p>\n<p>           P <\/p>\n<p>           C <\/p>\n<p>           L <\/p>\n<p>           K <\/p>\n<p>           1 <\/p>\n<p>         &#061; <\/p>\n<p>          1 <\/p>\n<p>           F <\/p>\n<p>            P <\/p>\n<p>            C <\/p>\n<p>            L <\/p>\n<p>            K <\/p>\n<p>            1 <\/p>\n<p>        T_{PCLK1} &#061; \\\\frac{1}{F_{PCLK1}} <\/p>\n<p>    <\/span><span class=\"katex-html\"><span class=\"base\"><span class=\"strut\" style=\"height: 0.8333em;vertical-align: -0.15em\"><\/span><span class=\"mord\"><span class=\"mord mathnormal\" style=\"margin-right: 0.1389em\">T<\/span><span class=\"msupsub\"><span class=\"vlist-t vlist-t2\"><span class=\"vlist-r\"><span class=\"vlist\" style=\"height: 0.3283em\"><span class=\"\" style=\"top: -2.55em;margin-left: -0.1389em;margin-right: 0.05em\"><span class=\"pstrut\" style=\"height: 2.7em\"><\/span><span class=\"sizing reset-size6 size3 mtight\"><span class=\"mord mtight\"><span class=\"mord mathnormal mtight\" style=\"margin-right: 0.0715em\">PC<\/span><span class=\"mord mathnormal mtight\">L<\/span><span class=\"mord mathnormal mtight\" style=\"margin-right: 0.0715em\">K<\/span><span class=\"mord mtight\">1<\/span><\/span><\/span><\/span><\/span><span class=\"vlist-s\">\u200b<\/span><\/span><span class=\"vlist-r\"><span class=\"vlist\" style=\"height: 0.15em\"><span class=\"\"><\/span><\/span><\/span><\/span><\/span><\/span><span class=\"mspace\" style=\"margin-right: 0.2778em\"><\/span><span class=\"mrel\">&#061;<\/span><span class=\"mspace\" style=\"margin-right: 0.2778em\"><\/span><\/span><span class=\"base\"><span class=\"strut\" style=\"height: 1.2904em;vertical-align: -0.4453em\"><\/span><span class=\"mord\"><span class=\"mopen nulldelimiter\"><\/span><span class=\"mfrac\"><span class=\"vlist-t vlist-t2\"><span class=\"vlist-r\"><span class=\"vlist\" style=\"height: 0.8451em\"><span class=\"\" style=\"top: -2.655em\"><span class=\"pstrut\" style=\"height: 3em\"><\/span><span class=\"sizing reset-size6 size3 mtight\"><span class=\"mord mtight\"><span class=\"mord mtight\"><span class=\"mord mathnormal mtight\" style=\"margin-right: 0.1389em\">F<\/span><span class=\"msupsub\"><span class=\"vlist-t vlist-t2\"><span class=\"vlist-r\"><span class=\"vlist\" style=\"height: 0.3448em\"><span class=\"\" style=\"top: -2.3567em;margin-left: -0.1389em;margin-right: 0.0714em\"><span class=\"pstrut\" style=\"height: 2.5em\"><\/span><span class=\"sizing reset-size3 size1 mtight\"><span class=\"mord mtight\"><span class=\"mord mathnormal mtight\" style=\"margin-right: 0.0715em\">PC<\/span><span class=\"mord mathnormal mtight\">L<\/span><span class=\"mord mathnormal mtight\" style=\"margin-right: 0.0715em\">K<\/span><span class=\"mord mtight\">1<\/span><\/span><\/span><\/span><\/span><span class=\"vlist-s\">\u200b<\/span><\/span><span class=\"vlist-r\"><span class=\"vlist\" style=\"height: 0.1433em\"><span class=\"\"><\/span><\/span><\/span><\/span><\/span><\/span><\/span><\/span><\/span><span class=\"\" style=\"top: -3.23em\"><span class=\"pstrut\" style=\"height: 3em\"><\/span><span class=\"frac-line\" style=\"border-bottom-width: 0.04em\"><\/span><\/span><span class=\"\" style=\"top: -3.394em\"><span class=\"pstrut\" style=\"height: 3em\"><\/span><span class=\"sizing reset-size6 size3 mtight\"><span class=\"mord mtight\"><span class=\"mord mtight\">1<\/span><\/span><\/span><\/span><\/span><span class=\"vlist-s\">\u200b<\/span><\/span><span class=\"vlist-r\"><span class=\"vlist\" style=\"height: 0.4453em\"><span class=\"\"><\/span><\/span><\/span><\/span><\/span><span class=\"mclose nulldelimiter\"><\/span><\/span><\/span><\/span><\/span><\/span><\/p>\n<p><img decoding=\"async\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2025\/04\/20250428024643-680eec13a9f2c.png\" alt=\"\u56fe\u7247\u6d88\u5931\u4e86\" \/> <\/p>\n<p>IWDG\u548cWWDG\u5bf9\u6bd4&#xff1a;<\/p>\n<p><img decoding=\"async\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2025\/04\/20250428024643-680eec13d858f.png\" alt=\"\u56fe\u7247\u6d88\u5931\u4e86\" \/> <\/p>\n<h4>3.\u72ec\u7acb\u770b\u95e8\u72d7\u7684\u4ee3\u7801<\/h4>\n<p>\u770b\u95e8\u72d7\u7684\u4ee3\u7801\u8f83\u4e3a\u7b80\u5355&#xff0c;\u6240\u4ee5\u5c31\u76f4\u63a5\u653e\u5728main.c\u91cc\u9762<\/p>\n<p>#include &#034;stm32f10x.h&#034;                  \/\/ Device header<br \/>\n#include &#034;Delay.h&#034;<br \/>\n#include &#034;OLED.h&#034;<br \/>\n#include &#034;Key.h&#034;<\/p>\n<p>int main(void)<br \/>\n{<br \/>\n \/*\u6a21\u5757\u521d\u59cb\u5316*\/<br \/>\n OLED_Init();      \/\/OLED\u521d\u59cb\u5316<br \/>\n Key_Init();       \/\/\u6309\u952e\u521d\u59cb\u5316<\/p>\n<p> \/*\u663e\u793a\u9759\u6001\u5b57\u7b26\u4e32*\/<br \/>\n OLED_ShowString(1, 1, &#034;IWDG TEST&#034;);<\/p>\n<p> \/*\u5224\u65ad\u590d\u4f4d\u4fe1\u53f7\u6765\u6e90*\/<br \/>\n if (RCC_GetFlagStatus(RCC_FLAG_IWDGRST) &#061;&#061; SET) \/\/\u5982\u679c\u662f\u72ec\u7acb\u770b\u95e8\u72d7\u590d\u4f4d<br \/>\n {<br \/>\n  OLED_ShowString(2, 1, &#034;IWDGRST&#034;);   \/\/OLED\u95ea\u70c1IWDGRST\u5b57\u7b26\u4e32<br \/>\n  Delay_ms(500);<br \/>\n  OLED_ShowString(2, 1, &#034;       &#034;);<br \/>\n  Delay_ms(100);<\/p>\n<p>  RCC_ClearFlag();       \/\/\u6e05\u9664\u6807\u5fd7\u4f4d<br \/>\n }<br \/>\n else           \/\/\u5426\u5219&#xff0c;\u5373\u4e3a\u5176\u4ed6\u590d\u4f4d<br \/>\n {<br \/>\n  OLED_ShowString(3, 1, &#034;RST&#034;);    \/\/OLED\u95ea\u70c1RST\u5b57\u7b26\u4e32<br \/>\n  Delay_ms(500);<br \/>\n  OLED_ShowString(3, 1, &#034;   &#034;);<br \/>\n  Delay_ms(100);<br \/>\n }<\/p>\n<p> \/*IWDG\u521d\u59cb\u5316*\/<br \/>\n IWDG_WriteAccessCmd(IWDG_WriteAccess_Enable); \/\/\u72ec\u7acb\u770b\u95e8\u72d7\u5199\u4f7f\u80fd<br \/>\n IWDG_SetPrescaler(IWDG_Prescaler_16);   \/\/\u8bbe\u7f6e\u9884\u5206\u9891\u4e3a16<br \/>\n IWDG_SetReload(2499);       \/\/\u8bbe\u7f6e\u91cd\u88c5\u503c\u4e3a2499&#xff0c;\u72ec\u7acb\u770b\u95e8\u72d7\u7684\u8d85\u65f6\u65f6\u95f4\u4e3a1000ms<br \/>\n IWDG_ReloadCounter();       \/\/\u91cd\u88c5\u8ba1\u6570\u5668&#xff0c;\u5582\u72d7<br \/>\n IWDG_Enable();         \/\/\u72ec\u7acb\u770b\u95e8\u72d7\u4f7f\u80fd<\/p>\n<p> while (1)<br \/>\n {<br \/>\n  Key_GetNum();        \/\/\u8c03\u7528\u963b\u585e\u5f0f\u7684\u6309\u952e\u626b\u63cf\u51fd\u6570&#xff0c;\u6a21\u62df\u4e3b\u5faa\u73af\u5361\u6b7b<\/p>\n<p>  IWDG_ReloadCounter();      \/\/\u91cd\u88c5\u8ba1\u6570\u5668&#xff0c;\u5582\u72d7<\/p>\n<p>  OLED_ShowString(4, 1, &#034;FEED&#034;);    \/\/OLED\u95ea\u70c1FEED\u5b57\u7b26\u4e32<br \/>\n  Delay_ms(200);        \/\/\u5582\u72d7\u95f4\u9694\u4e3a200&#043;600&#061;800ms<br \/>\n  OLED_ShowString(4, 1, &#034;    &#034;);<br \/>\n  Delay_ms(600);<br \/>\n }<br \/>\n}<\/p>\n<h4>4.\u7a97\u53e3\u770b\u95e8\u72d7<\/h4>\n<p>\u7a97\u53e3\u770b\u95e8\u72d7\u7684\u4ee3\u7801\u4e0e\u72ec\u7acb\u770b\u95e8\u72d7\u7684\u4ee3\u7801\u76f8\u4f3c&#xff0c;\u6700\u5927\u533a\u522b\u662f\u7a97\u53e3\u770b\u95e8\u72d7\u9700\u8981\u4f7f\u80fdAPB1\u7684WWDG\u65f6\u949f<\/p>\n<p>\/\/ \u7701\u7565\u7684\u4ee3\u7801\u4e0e\u72ec\u7acb\u770b\u95e8\u72d7\u76f8\u540c<br \/>\n RCC_APB1PeriphClockCmd(RCC_APB1Periph_WWDG, ENABLE); \/\/\u5f00\u542fWWDG\u7684\u65f6\u949f<\/p>\n<p> \/*WWDG\u521d\u59cb\u5316*\/<br \/>\n WWDG_SetPrescaler(WWDG_Prescaler_8);   \/\/\u8bbe\u7f6e\u9884\u5206\u9891\u4e3a8<br \/>\n WWDG_SetWindowValue(0x40 | 21);     \/\/\u8bbe\u7f6e\u7a97\u53e3\u503c&#xff0c;\u7a97\u53e3\u65f6\u95f4\u4e3a30ms<br \/>\n WWDG_Enable(0x40 | 54);       \/\/\u4f7f\u80fd\u5e76\u7b2c\u4e00\u6b21\u5582\u72d7&#xff0c;\u8d85\u65f6\u65f6\u95f4\u4e3a50ms<\/p>\n<p> while (1)<br \/>\n {<br \/>\n  Key_GetNum();        \/\/\u8c03\u7528\u963b\u585e\u5f0f\u7684\u6309\u952e\u626b\u63cf\u51fd\u6570&#xff0c;\u6a21\u62df\u4e3b\u5faa\u73af\u5361\u6b7b<\/p>\n<p>  OLED_ShowString(4, 1, &#034;FEED&#034;);    \/\/OLED\u95ea\u70c1FEED\u5b57\u7b26\u4e32<br \/>\n  Delay_ms(20);        \/\/\u5582\u72d7\u95f4\u9694\u4e3a20&#043;20&#061;40ms<br \/>\n  OLED_ShowString(4, 1, &#034;    &#034;);<br \/>\n  Delay_ms(20);<\/p>\n<p>  WWDG_SetCounter(0x40 | 54);     \/\/\u91cd\u88c5\u8ba1\u6570\u5668&#xff0c;\u5582\u72d7<br \/>\n }<\/p>\n<h3>\u4e94.\u95ea\u5b58<\/h3>\n<h4>1.\u5185\u90e8flash<\/h4>\n<p>stm32f1\u7cfb\u5217\u7684FLASH\u5305\u542b\u7a0b\u5e8f\u5b58\u50a8\u5668\u3001\u7cfb\u7edf\u5b58\u50a8\u5668\u548c\u9009\u9879\u5b57\u8282\u4e09\u4e2a\u90e8\u5206&#xff0c;\u901a\u8fc7\u95ea\u5b58\u5b58\u50a8\u5668\u63a5\u53e3(\u5916\u8bbe)\u53ef\u4ee5\u5bf9\u7a0b\u5e8f\u5b58\u50a8\u5668\u548c\u9009\u9879\u5b57\u8282\u8fdb\u884c\u64e6\u9664\u548c\u7f16\u7a0b \u8bfb\u5199FLASH\u7684\u7528\u9014&#xff1a;<\/p>\n<li>\u5229\u7528\u7a0b\u5e8f\u5b58\u50a8\u5668\u7684\u5269\u4f59\u7a7a\u95f4\u6765\u4fdd\u5b58\u6389\u7535\u4e0d\u4e22\u5931\u7684\u7528\u6237\u6570\u636e<\/li>\n<li>\u901a\u8fc7\u5728\u7a0b\u5e8f\u4e2d\u7f16\u7a0b(IAP)&#xff0c;\u5b9e\u73b0\u7a0b\u5e8f\u7684\u81ea\u6211\u66f4\u65b0<\/li>\n<p>\u5728\u7ebf\u7f16\u7a0b(ICP)&#xff1a;\u7528\u4e8e\u66f4\u65b0\u7a0b\u5e8f\u5b58\u50a8\u5668\u7684\u5168\u90e8\u5185\u5bb9&#xff0c;\u5b83\u901a\u8fc7JTAG\u3001SWD\u534f\u8bae\u6216\u7cfb\u7edf\u52a0\u8f7d\u7a0b\u5e8f(Bootloader)\u4e0b\u8f7d\u7a0b\u5e8f \u5728\u7a0b\u5e8f\u4e2d\u7f16\u7a0b(IAP)\u53ef\u4ee5\u4f7f\u7528\u5fae\u63a7\u5236\u5668\u652f\u6301\u7684\u4efb\u4e00\u79cd\u901a\u4fe1\u63a5\u53e3\u4e0b\u8f7d\u7a0b\u5e8f<\/p>\n<p>\u95ea\u5b58\u6a21\u5757\u7ec4\u7ec7&#xff1a;<\/p>\n<p><img decoding=\"async\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2025\/04\/20250428024644-680eec144a3ae.png\" alt=\"\u56fe\u7247\u6d88\u5931\u4e86\" \/> <\/p>\n<p>FLASH\u57fa\u672c\u7ed3\u6784&#xff1a;<\/p>\n<p><img decoding=\"async\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2025\/04\/20250428024644-680eec147e3a0.png\" alt=\"\u56fe\u7247\u6d88\u5931\u4e86\" \/> <\/p>\n<p>FLASH\u89e3\u9501&#xff1a; FPEC\u5171\u6709\u4e09\u4e2a\u952e\u503c&#xff1a;<\/p>\n<li>RDPRT &#061; 0x00000045<\/li>\n<li>KEY1 &#061; 0x45670123<\/li>\n<li>KEY2 &#061; 0xCDEF89AB<\/li>\n<p>\u89e3\u9501&#xff1a;<\/p>\n<li>\u590d\u4f4d\u540e&#xff0c;FPEC\u88ab\u4fdd\u62a4&#xff0c;\u4e0d\u80fd\u5199\u5165FLASH_CR<\/li>\n<li>\u5728FLASH_KEYR\u5148\u5199\u5165KEY1&#xff0c;\u518d\u5199\u5165KEY2&#xff0c;\u89e3\u9501<\/li>\n<li>\u9519\u8bef\u7684\u64cd\u4f5c\u5e8f\u5217\u4f1a\u5728\u4e0b\u6b21\u590d\u4f4d\u524d\u9501\u6b7bFPEC\u548cFLASH_CR<\/li>\n<p>\u52a0\u9501&#xff1a;\u8bbe\u7f6eFLASH_CR\u4e2d\u7684LOCK\u4f4d\u9501\u4f4fFPEC\u548cFLASH_CR<\/p>\n<p>\u4f7f\u7528\u6307\u9488\u8bbf\u95ee\u5b58\u50a8\u5668&#xff1a;<\/p>\n<p>#define __IO volatile<br \/>\n\/\/volatile\u7684\u4f5c\u7528\u662f\u9632\u6b62\u7f16\u8bd1\u5668\u4f18\u5316<br \/>\nuint16_t Data &#061; *((__IO uint16_t *)(0x08000000));<\/p>\n<p>\u4f7f\u7528\u6307\u9488\u5199\u6307\u5b9a\u5730\u5740\u4e0b\u7684\u5b58\u50a8\u5668&#xff1a;<\/p>\n<p>*((__IO uint16_t *)(0x08000000)) &#061; 0x1234;<\/p>\n<p>\u7a0b\u5e8f\u5b58\u50a8\u5668\u7f16\u7a0b&#xff1a;<\/p>\n<p><img decoding=\"async\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2025\/04\/20250428024644-680eec14c7bb0.png\" alt=\"\u56fe\u7247\u6d88\u5931\u4e86\" \/> <\/p>\n<p>\u7a0b\u5e8f\u5b58\u50a8\u5668\u9875\u64e6\u9664&#xff1a;<\/p>\n<p><img decoding=\"async\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2025\/04\/20250428024645-680eec1504181.png\" alt=\"\u56fe\u7247\u6d88\u5931\u4e86\" \/> <\/p>\n<p>\u7a0b\u5e8f\u5b58\u50a8\u5668\u5168\u64e6\u9664&#xff1a;<\/p>\n<p><img decoding=\"async\" src=\"2025-04-28qfv2joz5xh2.png\" alt=\"\u56fe\u7247\u6d88\u5931\u4e86\" \/><br \/>\n<img decoding=\"async\" src=\"2025-04-28uloiohss32g.png\" alt=\"\u56fe\u7247\u6d88\u5931\u4e86\" \/> <\/p>\n<p>\u9009\u9879\u5b57\u8282\u7f16\u7a0b&#xff1a;<\/p>\n<li>\u68c0\u67e5FLASH_SR\u7684BSY\u4f4d&#xff0c;\u4ee5\u786e\u8ba4\u6ca1\u6709\u5176\u5b83\u6b63\u5728\u8fdb\u884c\u7684\u7f16\u7a0b\u64cd\u4f5c<\/li>\n<li>\u89e3\u9501FLASH_CR\u7684OPTWRE\u4f4d<\/li>\n<li>\u8bbe\u7f6eFLASH_CR\u7684OPTPG\u4f4d\u4e3a1<\/li>\n<li>\u5199\u5165\u8981\u7f16\u7a0b\u7684\u534a\u5b57\u5230\u6307\u5b9a\u7684\u5730\u5740<\/li>\n<li>\u7b49\u5f85BSY\u4f4d\u53d8\u4e3a0<\/li>\n<li>\u8bfb\u51fa\u5199\u5165\u7684\u5730\u5740\u5e76\u9a8c\u8bc1\u6570\u636e<\/li>\n<p>\u9009\u9879\u5b57\u8282\u64e6\u9664&#xff1a;<\/p>\n<li>\u68c0\u67e5FLASH_SR\u7684BSY\u4f4d&#xff0c;\u4ee5\u786e\u8ba4\u6ca1\u6709\u5176\u5b83\u6b63\u5728\u8fdb\u884c\u7684\u95ea\u5b58\u64cd\u4f5c<\/li>\n<li>\u89e3\u9501FLASH_CR\u7684OPTWRE\u4f4d<\/li>\n<li>\u8bbe\u7f6eFLASH_CR\u7684OPTER\u4f4d\u4e3a1<\/li>\n<li>\u8bbe\u7f6eFLASH_CR\u7684STAT\u4f4d\u4e3a1<\/li>\n<li>\u7b49\u5f85BSY\u4f4d\u53d8\u4e3a0<\/li>\n<li>\u8bfb\u51fa\u88ab\u64e6\u9664\u7684\u9009\u62e9\u5b57\u8282\u5e76\u505a\u9a8c\u8bc1<\/li>\n<p>\u5668\u4ef6\u7535\u5b50\u7b7e\u540d&#xff1a;\u7535\u5b50\u7b7e\u540d\u5b58\u653e\u5728\u95ea\u5b58\u5b58\u50a8\u5668\u6a21\u5757\u7684\u7cfb\u7edf\u5b58\u50a8\u533a\u57df&#xff0c;\u5305\u542b\u7684\u82af\u7247\u8bc6\u522b\u4fe1\u606f\u5728\u51fa\u5382\u65f6\u7f16\u5199&#xff0c;\u4e0d\u53ef\u66f4\u6539&#xff0c;\u4f7f\u7528\u6307\u9488\u8bfb\u6307\u5b9a\u5730\u5740\u4e0b\u7684\u5b58\u50a8\u5668\u53ef\u83b7\u53d6\u7535\u5b50\u7b7e\u540d \u95ea\u5b58\u5bb9\u91cf\u5b58\u50a8\u5668&#xff1a;\u57fa\u5730\u5740&#xff1a;0x1FFF F7E0&#xff0c;\u5927\u5c0f&#xff1a;16\u4f4d \u4ea7\u54c1\u552f\u4e00\u8eab\u4efd\u6807\u8bc6\u5bc4\u5b58\u5668&#xff1a;\u57fa\u5730\u5740&#xff1a;0x1FFF F7E8&#xff0c;\u5927\u5c0f&#xff1a;96\u4f4d<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u6587\u7ae0\u6d4f\u89c8\u9605\u8bfb1.3k\u6b21\u3002BKP(backup registers)\u5907\u4efd\u5bc4\u5b58\u5668BKP\u53ef\u4ee5\u5b58\u50a8\u6570\u636e\uff0c\u6389\u7535\u4e22\u5931\uff0c\u5e73\u65f6\u7528\u5916\u90e8\u7535\u6e90\u4f9b\u7535\uff0c\u5916\u90e8\u7535\u6e90\u5207\u65ad\u540e\u7528VBAT\u7ef4\u6301\u4f9b\u7535\uff0c\u5f53\u7cfb\u7edf\u5728\u5f85\u673a\u72b6\u6001\u4e0b\u88ab\u5524\u9192\uff0c\u6216\u7cfb\u7edf\u590d\u4f4d\u6216\u7535\u6e90\u590d\u4f4d\u65f6\uff0c\u5b83\u4eec\u4e5f\u4e0d\u4f1a\u88ab\u590d\u4f4dTAMPER\u5f15\u811a\u53ef\u4ee5\u4ea7\u751f\u7684\u4fb5\u5165\u4e8b\u4ef6\uff0c\u5c06\u6240\u6709\u5907\u4efd\u5bc4\u5b58\u5668\u7684\u5185\u5bb9\u6e05\u9664RTC\u5f15\u811a\u53ef\u4ee5\u8f93\u51faRTC\u6821\u51c6\u65f6\u949f(\u5bf9\u5185\u90e8RTC\u5fae\u5c0f\u7684\u8bef\u5dee\u8fdb\u884c\u6821\u51c6)\u3001RTC\u95f9\u949f\u8109\u51b2\u3001\u79d2\u8109\u51b2(\u53ef\u4ee5\u8f93\u51fa\u51fa\u6765\uff0c\u4e3a\u522b\u7684\u8bbe\u5907\u63d0\u4f9b\u4fe1\u53f7)PC13\u3001TAMPER\u3001RTC\u5171\u7528\u4e00\u4e2a\u5f15\u811a\uff0c\u540c\u65f6\u53ea\u80fd\u4f7f\u7528\u4e00\u4e2a\u529f\u80fd\u3002<\/p>\n","protected":false},"author":2,"featured_media":33626,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[217,270,371,269],"topic":[],"class_list":["post-33646","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-server","tag-stm32","tag-270","tag-371","tag-269"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v20.3 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>stm32week7 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.wsisp.com\/helps\/33646.html\" \/>\n<meta property=\"og:locale\" content=\"zh_CN\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"stm32week7 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\" \/>\n<meta property=\"og:description\" content=\"\u6587\u7ae0\u6d4f\u89c8\u9605\u8bfb1.3k\u6b21\u3002BKP(backup registers)\u5907\u4efd\u5bc4\u5b58\u5668BKP\u53ef\u4ee5\u5b58\u50a8\u6570\u636e\uff0c\u6389\u7535\u4e22\u5931\uff0c\u5e73\u65f6\u7528\u5916\u90e8\u7535\u6e90\u4f9b\u7535\uff0c\u5916\u90e8\u7535\u6e90\u5207\u65ad\u540e\u7528VBAT\u7ef4\u6301\u4f9b\u7535\uff0c\u5f53\u7cfb\u7edf\u5728\u5f85\u673a\u72b6\u6001\u4e0b\u88ab\u5524\u9192\uff0c\u6216\u7cfb\u7edf\u590d\u4f4d\u6216\u7535\u6e90\u590d\u4f4d\u65f6\uff0c\u5b83\u4eec\u4e5f\u4e0d\u4f1a\u88ab\u590d\u4f4dTAMPER\u5f15\u811a\u53ef\u4ee5\u4ea7\u751f\u7684\u4fb5\u5165\u4e8b\u4ef6\uff0c\u5c06\u6240\u6709\u5907\u4efd\u5bc4\u5b58\u5668\u7684\u5185\u5bb9\u6e05\u9664RTC\u5f15\u811a\u53ef\u4ee5\u8f93\u51faRTC\u6821\u51c6\u65f6\u949f(\u5bf9\u5185\u90e8RTC\u5fae\u5c0f\u7684\u8bef\u5dee\u8fdb\u884c\u6821\u51c6)\u3001RTC\u95f9\u949f\u8109\u51b2\u3001\u79d2\u8109\u51b2(\u53ef\u4ee5\u8f93\u51fa\u51fa\u6765\uff0c\u4e3a\u522b\u7684\u8bbe\u5907\u63d0\u4f9b\u4fe1\u53f7)PC13\u3001TAMPER\u3001RTC\u5171\u7528\u4e00\u4e2a\u5f15\u811a\uff0c\u540c\u65f6\u53ea\u80fd\u4f7f\u7528\u4e00\u4e2a\u529f\u80fd\u3002\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.wsisp.com\/helps\/33646.html\" \/>\n<meta property=\"og:site_name\" content=\"\u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\" \/>\n<meta property=\"article:published_time\" content=\"2025-04-28T02:46:46+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2025\/04\/20250428024639-680eec0fad6d9.png\" \/>\n<meta name=\"author\" content=\"admin\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"\u4f5c\u8005\" \/>\n\t<meta name=\"twitter:data1\" content=\"admin\" \/>\n\t<meta name=\"twitter:label2\" content=\"\u9884\u8ba1\u9605\u8bfb\u65f6\u95f4\" \/>\n\t<meta name=\"twitter:data2\" content=\"7 \u5206\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/33646.html\",\"url\":\"https:\/\/www.wsisp.com\/helps\/33646.html\",\"name\":\"stm32week7 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\",\"isPartOf\":{\"@id\":\"https:\/\/www.wsisp.com\/helps\/#website\"},\"datePublished\":\"2025-04-28T02:46:46+00:00\",\"dateModified\":\"2025-04-28T02:46:46+00:00\",\"author\":{\"@id\":\"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/358e386c577a3ab51c4493330a20ad41\"},\"breadcrumb\":{\"@id\":\"https:\/\/www.wsisp.com\/helps\/33646.html#breadcrumb\"},\"inLanguage\":\"zh-Hans\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.wsisp.com\/helps\/33646.html\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/33646.html#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"\u9996\u9875\",\"item\":\"https:\/\/www.wsisp.com\/helps\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"stm32week7\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/#website\",\"url\":\"https:\/\/www.wsisp.com\/helps\/\",\"name\":\"\u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\",\"description\":\"\u9999\u6e2f\u670d\u52a1\u5668_\u9999\u6e2f\u4e91\u670d\u52a1\u5668\u8d44\u8baf_\u670d\u52a1\u5668\u5e2e\u52a9\u6587\u6863_\u670d\u52a1\u5668\u6559\u7a0b\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/www.wsisp.com\/helps\/?s={search_term_string}\"},\"query-input\":\"required name=search_term_string\"}],\"inLanguage\":\"zh-Hans\"},{\"@type\":\"Person\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/358e386c577a3ab51c4493330a20ad41\",\"name\":\"admin\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"zh-Hans\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/gravatar.wp-china-yes.net\/avatar\/?s=96&d=mystery\",\"contentUrl\":\"https:\/\/gravatar.wp-china-yes.net\/avatar\/?s=96&d=mystery\",\"caption\":\"admin\"},\"sameAs\":[\"http:\/\/wp.wsisp.com\"],\"url\":\"https:\/\/www.wsisp.com\/helps\/author\/admin\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"stm32week7 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.wsisp.com\/helps\/33646.html","og_locale":"zh_CN","og_type":"article","og_title":"stm32week7 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","og_description":"\u6587\u7ae0\u6d4f\u89c8\u9605\u8bfb1.3k\u6b21\u3002BKP(backup registers)\u5907\u4efd\u5bc4\u5b58\u5668BKP\u53ef\u4ee5\u5b58\u50a8\u6570\u636e\uff0c\u6389\u7535\u4e22\u5931\uff0c\u5e73\u65f6\u7528\u5916\u90e8\u7535\u6e90\u4f9b\u7535\uff0c\u5916\u90e8\u7535\u6e90\u5207\u65ad\u540e\u7528VBAT\u7ef4\u6301\u4f9b\u7535\uff0c\u5f53\u7cfb\u7edf\u5728\u5f85\u673a\u72b6\u6001\u4e0b\u88ab\u5524\u9192\uff0c\u6216\u7cfb\u7edf\u590d\u4f4d\u6216\u7535\u6e90\u590d\u4f4d\u65f6\uff0c\u5b83\u4eec\u4e5f\u4e0d\u4f1a\u88ab\u590d\u4f4dTAMPER\u5f15\u811a\u53ef\u4ee5\u4ea7\u751f\u7684\u4fb5\u5165\u4e8b\u4ef6\uff0c\u5c06\u6240\u6709\u5907\u4efd\u5bc4\u5b58\u5668\u7684\u5185\u5bb9\u6e05\u9664RTC\u5f15\u811a\u53ef\u4ee5\u8f93\u51faRTC\u6821\u51c6\u65f6\u949f(\u5bf9\u5185\u90e8RTC\u5fae\u5c0f\u7684\u8bef\u5dee\u8fdb\u884c\u6821\u51c6)\u3001RTC\u95f9\u949f\u8109\u51b2\u3001\u79d2\u8109\u51b2(\u53ef\u4ee5\u8f93\u51fa\u51fa\u6765\uff0c\u4e3a\u522b\u7684\u8bbe\u5907\u63d0\u4f9b\u4fe1\u53f7)PC13\u3001TAMPER\u3001RTC\u5171\u7528\u4e00\u4e2a\u5f15\u811a\uff0c\u540c\u65f6\u53ea\u80fd\u4f7f\u7528\u4e00\u4e2a\u529f\u80fd\u3002","og_url":"https:\/\/www.wsisp.com\/helps\/33646.html","og_site_name":"\u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","article_published_time":"2025-04-28T02:46:46+00:00","og_image":[{"url":"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2025\/04\/20250428024639-680eec0fad6d9.png"}],"author":"admin","twitter_card":"summary_large_image","twitter_misc":{"\u4f5c\u8005":"admin","\u9884\u8ba1\u9605\u8bfb\u65f6\u95f4":"7 \u5206"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/www.wsisp.com\/helps\/33646.html","url":"https:\/\/www.wsisp.com\/helps\/33646.html","name":"stm32week7 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","isPartOf":{"@id":"https:\/\/www.wsisp.com\/helps\/#website"},"datePublished":"2025-04-28T02:46:46+00:00","dateModified":"2025-04-28T02:46:46+00:00","author":{"@id":"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/358e386c577a3ab51c4493330a20ad41"},"breadcrumb":{"@id":"https:\/\/www.wsisp.com\/helps\/33646.html#breadcrumb"},"inLanguage":"zh-Hans","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.wsisp.com\/helps\/33646.html"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/www.wsisp.com\/helps\/33646.html#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"\u9996\u9875","item":"https:\/\/www.wsisp.com\/helps"},{"@type":"ListItem","position":2,"name":"stm32week7"}]},{"@type":"WebSite","@id":"https:\/\/www.wsisp.com\/helps\/#website","url":"https:\/\/www.wsisp.com\/helps\/","name":"\u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","description":"\u9999\u6e2f\u670d\u52a1\u5668_\u9999\u6e2f\u4e91\u670d\u52a1\u5668\u8d44\u8baf_\u670d\u52a1\u5668\u5e2e\u52a9\u6587\u6863_\u670d\u52a1\u5668\u6559\u7a0b","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.wsisp.com\/helps\/?s={search_term_string}"},"query-input":"required name=search_term_string"}],"inLanguage":"zh-Hans"},{"@type":"Person","@id":"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/358e386c577a3ab51c4493330a20ad41","name":"admin","image":{"@type":"ImageObject","inLanguage":"zh-Hans","@id":"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/image\/","url":"https:\/\/gravatar.wp-china-yes.net\/avatar\/?s=96&d=mystery","contentUrl":"https:\/\/gravatar.wp-china-yes.net\/avatar\/?s=96&d=mystery","caption":"admin"},"sameAs":["http:\/\/wp.wsisp.com"],"url":"https:\/\/www.wsisp.com\/helps\/author\/admin"}]}},"_links":{"self":[{"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/posts\/33646","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/comments?post=33646"}],"version-history":[{"count":0,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/posts\/33646\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/media\/33626"}],"wp:attachment":[{"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/media?parent=33646"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/categories?post=33646"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/tags?post=33646"},{"taxonomy":"topic","embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/topic?post=33646"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}