{"id":284,"date":"2026-04-14T00:20:01","date_gmt":"2026-04-13T16:20:01","guid":{"rendered":"https:\/\/edryan.top\/index.php\/2026\/04\/14\/stm32-hal%e5%ba%93%e6%9e%81%e7%ae%80%e5%85%a5%e9%97%a8%ef%bc%9a%e4%b8%ad%e6%96%ad%e7%b3%bb%e7%bb%9f%e4%b8%8e%e6%8c%89%e9%94%ae%e6%b6%88%e6%8a%96\/"},"modified":"2026-04-14T00:20:01","modified_gmt":"2026-04-13T16:20:01","slug":"stm32-hal%e5%ba%93%e6%9e%81%e7%ae%80%e5%85%a5%e9%97%a8%ef%bc%9a%e4%b8%ad%e6%96%ad%e7%b3%bb%e7%bb%9f%e4%b8%8e%e6%8c%89%e9%94%ae%e6%b6%88%e6%8a%96","status":"publish","type":"post","link":"https:\/\/edryan.top\/index.php\/2026\/04\/14\/stm32-hal%e5%ba%93%e6%9e%81%e7%ae%80%e5%85%a5%e9%97%a8%ef%bc%9a%e4%b8%ad%e6%96%ad%e7%b3%bb%e7%bb%9f%e4%b8%8e%e6%8c%89%e9%94%ae%e6%b6%88%e6%8a%96\/","title":{"rendered":"STM32 HAL\u5e93\u6781\u7b80\u5165\u95e8\uff1a\u4e2d\u65ad\u7cfb\u7edf\u4e0e\u6309\u952e\u6d88\u6296"},"content":{"rendered":"<h3>\u524d\u8a00<\/h3>\n<p>\u5728\u4e0a\u4e00\u7bc7\u4e2d\uff0c\u6211\u4eec\u5b66\u4f1a\u4e86\u7528\u4e32\u53e3\u89c2\u5bdf\u7a0b\u5e8f\u7684\u8fd0\u884c\u72b6\u6001\u3002\u4f46\u4f60\u662f\u5426\u60f3\u8fc7\uff1a\u5982\u679c\u7a0b\u5e8f\u4e00\u76f4\u5361\u5728<code>HAL_Delay()<\/code>\u91cc\u7b49\u5f85\uff0c\u90a3\u5b83\u600e\u4e48\u540c\u65f6\u53bb\u68c0\u6d4b\u6309\u952e\u662f\u5426\u88ab\u6309\u4e0b\uff1f<\/p>\n<p>\u7b54\u6848\u5c31\u662f<strong>\u4e2d\u65ad\uff08Interrupt\uff09<\/strong>\u3002\u4e2d\u65ad\u662f\u5d4c\u5165\u5f0f\u5f00\u53d1\u7684\u7075\u9b42\uff0c\u5b83\u8ba9\u5355\u7247\u673a\u80fd\u591f\u201c\u4e00\u5fc3\u591a\u7528\u201d\u2014\u2014\u5e73\u65f6\u505a\u81ea\u5df1\u7684\u4e8b\uff0c\u4e00\u65e6\u6709\u7d27\u6025\u4e8b\u4ef6\uff08\u6bd4\u5982\u6309\u952e\u6309\u4e0b\u3001\u6570\u636e\u5230\u8fbe\uff09\uff0c\u7acb\u523b\u6682\u505c\u5f53\u524d\u5de5\u4f5c\u53bb\u5904\u7406\uff0c\u5904\u7406\u5b8c\u518d\u56de\u6765\u7ee7\u7eed\u3002<\/p>\n<p>\u4eca\u5929\uff0c\u6211\u4eec\u5c31\u6765\u5b66\u4e60 STM32 \u6700\u57fa\u7840\u4e5f\u6700\u5e38\u7528\u7684\u5916\u90e8\u4e2d\u65ad\uff08EXTI\uff09\uff0c\u5e76\u901a\u8fc7\u4e00\u4e2a<strong>\u6309\u952e\u63a7\u5236 LED<\/strong>\u7684\u5b9e\u4f8b\uff0c\u5f7b\u5e95\u641e\u61c2\u4e2d\u65ad\u914d\u7f6e\u548c\u6309\u952e\u6d88\u6296\u3002<\/p>\n<hr \/>\n<h3>\u4e00\u3001\u4ec0\u4e48\u662f\u5916\u90e8\u4e2d\u65ad EXTI\uff1f<\/h3>\n<p>EXTI\uff08External Interrupt\/Event Controller\uff09\u662f STM32 \u7684\u5916\u90e8\u4e2d\u65ad\/\u4e8b\u4ef6\u63a7\u5236\u5668\u3002\u7b80\u5355\u6765\u8bf4\uff0c\u5b83\u80fd\u8ba9 GPIO \u5f15\u811a\u4e0a\u7684\u7535\u5e73\u53d8\u5316\uff08\u4e0a\u5347\u6cbf\u3001\u4e0b\u964d\u6cbf\u6216\u53cc\u8fb9\u6cbf\uff09\u89e6\u53d1\u4e00\u4e2a\u4e2d\u65ad\u4fe1\u53f7\uff0c\u4ece\u800c\u6267\u884c\u6211\u4eec\u9884\u8bbe\u7684\u56de\u8c03\u51fd\u6570\u3002<\/p>\n<p><strong>\u5e38\u89c1\u5e94\u7528\u573a\u666f\uff1a<\/strong><\/p>\n<ul>\n<li>\u6309\u952e\u68c0\u6d4b\uff08\u6309\u4e0b\u77ac\u95f4\u89e6\u53d1\u4e2d\u65ad\uff09<\/li>\n<li>\u4f20\u611f\u5668\u4fe1\u53f7\u89e6\u53d1\uff08\u5982\u4eba\u4f53\u7ea2\u5916\u611f\u5e94\uff09<\/li>\n<li>\u901a\u4fe1\u6a21\u5757\u7684\u72b6\u6001\u901a\u77e5\uff08\u5982 Wi-Fi \u6a21\u5757\u6536\u5230\u6570\u636e\uff09<\/li>\n<\/ul>\n<hr \/>\n<h3>\u4e8c\u3001CubeMX \u914d\u7f6e\u5916\u90e8\u4e2d\u65ad<\/h3>\n<p>\u5047\u8bbe\u6211\u4eec\u8981\u7528<strong>PA0<\/strong>\u8fde\u63a5\u4e00\u4e2a\u6309\u952e\uff0c\u6309\u4e0b\u65f6\u4e3a\u4f4e\u7535\u5e73\uff08\u4e0b\u964d\u6cbf\u89e6\u53d1\uff09\uff0c\u7528<strong>PC13<\/strong>\u63a7\u5236 LED\u3002<\/p>\n<h4>1. \u914d\u7f6e\u6309\u952e\u5f15\u811a\u4e3a\u5916\u90e8\u4e2d\u65ad\u6a21\u5f0f<\/h4>\n<ul>\n<li>\u5728 CubeMX \u7684\u82af\u7247\u5f15\u811a\u56fe\u4e2d\uff0c\u627e\u5230 <strong>PA0<\/strong>\uff0c\u5de6\u952e\u70b9\u51fb\u9009\u62e9 <strong>GPIO_EXTI0<\/strong>\u3002<\/li>\n<li>\u6ce8\u610f\uff1a\u4e0d\u662f GPIO_Input\uff0c\u800c\u662f <strong>GPIO_EXTI0<\/strong>\uff0c\u8fd9\u8868\u793a\u5c06\u8be5\u5f15\u811a\u6620\u5c04\u5230\u5916\u90e8\u4e2d\u65ad\u7ebf 0\u3002<\/li>\n<\/ul>\n<h4>2. \u914d\u7f6e GPIO \u53c2\u6570<\/h4>\n<p>\u5728\u5de6\u4fa7 <strong>System Core -&gt; GPIO<\/strong> \u4e2d\uff0c\u9009\u4e2d PA0\uff1a<\/p>\n<ul>\n<li><strong>GPIO mode<\/strong>: External Interrupt Mode with Falling edge trigger detection\uff08\u4e0b\u964d\u6cbf\u89e6\u53d1\uff09<\/li>\n<li><strong>GPIO Pull-up\/Pull-down<\/strong>: Pull-up\uff08\u4e0a\u62c9\uff0c\u6309\u952e\u672a\u6309\u4e0b\u65f6\u4fdd\u6301\u9ad8\u7535\u5e73\uff09<\/li>\n<\/ul>\n<h4>3. \u5f00\u542f NVIC \u4e2d\u65ad<\/h4>\n<ul>\n<li>\u8fdb\u5165 <strong>NVIC<\/strong> \u9009\u9879\u5361\uff0c\u52fe\u9009 <strong>EXTI line0 interrupt<\/strong> \u7684 <strong>Enabled<\/strong>\u3002<\/li>\n<li>\u53ef\u4ee5\u8bbe\u7f6e\u4e2d\u65ad\u4f18\u5148\u7ea7\uff08Preemption Priority\uff09\uff0c\u6570\u5b57\u8d8a\u5c0f\u4f18\u5148\u7ea7\u8d8a\u9ad8\u3002\u5bf9\u4e8e\u7b80\u5355\u7684\u6309\u952e\uff0c\u9ed8\u8ba4\u4f18\u5148\u7ea7\u5373\u53ef\u3002<\/li>\n<\/ul>\n<h4>4. \u751f\u6210\u4ee3\u7801<\/h4>\n<p>\u70b9\u51fb <strong>GENERATE CODE<\/strong>\uff0cCubeMX \u4f1a\u81ea\u52a8\u751f\u6210\u4e2d\u65ad\u521d\u59cb\u5316\u4ee3\u7801\uff0c\u5305\u62ec NVIC \u914d\u7f6e\u548c EXTI \u7ebf\u8def\u4f7f\u80fd\u3002<\/p>\n<hr \/>\n<h3>\u4e09\u3001\u7f16\u5199\u4e2d\u65ad\u56de\u8c03\u51fd\u6570<\/h3>\n<p>HAL \u5e93\u4e3a\u5916\u90e8\u4e2d\u65ad\u63d0\u4f9b\u4e86\u4e00\u4e2a\u6807\u51c6\u7684\u56de\u8c03\u51fd\u6570\u3002\u5f53 PA0 \u68c0\u6d4b\u5230\u4e0b\u964d\u6cbf\u65f6\uff0cHAL \u5e93\u4f1a\u81ea\u52a8\u8c03\u7528\u5b83\uff1a<\/p>\n<pre><code>\/* USER CODE BEGIN 4 *\/\nvoid HAL_GPIO_EXTI_Callback(uint16_t GPIO_Pin)\n{\n    if (GPIO_Pin == GPIO_PIN_0)\n    {\n        \/\/ \u6309\u952e\u88ab\u6309\u4e0b\u4e86\uff01\n        HAL_GPIO_TogglePin(GPIOC, GPIO_PIN_13); \/\/ \u7ffb\u8f6c LED\n    }\n}\n\/* USER CODE END 4 *\/<\/code><\/pre>\n<p><strong>\u6ce8\u610f\uff1a<\/strong>\u8fd9\u4e2a\u51fd\u6570\u9700\u8981\u5199\u5728 <code>main.c<\/code> \u7684 <code>USER CODE BEGIN 4<\/code> \u533a\u57df\u91cc\u3002<\/p>\n<p>\u7f16\u8bd1\u4e0b\u8f7d\u540e\uff0c\u6bcf\u6309\u4e00\u6b21\u6309\u952e\uff0cLED \u5c31\u4f1a\u7ffb\u8f6c\u4e00\u6b21\u3002\u662f\u4e0d\u662f\u5f88\u7b80\u5355\uff1f<\/p>\n<p>\u2026\u2026\u4f46\u5148\u522b\u9ad8\u5174\u592a\u65e9\u3002\u5982\u679c\u4f60\u5b9e\u9645\u6d4b\u8bd5\uff0c\u53ef\u80fd\u4f1a\u53d1\u73b0\uff1a<strong>\u6309\u4e00\u6b21\u6309\u952e\uff0cLED \u5374\u7ffb\u8f6c\u4e86\u597d\u51e0\u6b21\uff01<\/strong>\u8fd9\u5c31\u662f\u673a\u68b0\u6309\u952e\u7684<strong>\u6296\u52a8<\/strong>\u95ee\u9898\u3002<\/p>\n<hr \/>\n<h3>\u56db\u3001\u6309\u952e\u6d88\u6296\uff1a\u7406\u8bba\u4e0e\u5b9e\u8df5<\/h3>\n<h4>\u4ec0\u4e48\u662f\u6309\u952e\u6296\u52a8\uff1f<\/h4>\n<p>\u673a\u68b0\u6309\u952e\u5728\u6309\u4e0b\u6216\u677e\u5f00\u7684\u77ac\u95f4\uff0c\u5185\u90e8\u7684\u91d1\u5c5e\u89e6\u70b9\u5e76\u4e0d\u4f1a\u7acb\u523b\u7a33\u5b9a\u63a5\u89e6\/\u65ad\u5f00\uff0c\u800c\u662f\u4f1a\u5feb\u901f\u901a\u65ad\u591a\u6b21\uff0c\u4ea7\u751f\u4e00\u8fde\u4e32\u7684\u7535\u5e73\u8df3\u53d8\u3002\u5bf9\u4e8e\u5355\u7247\u673a\u6765\u8bf4\uff0c\u8fd9\u770b\u8d77\u6765\u5c31\u50cf\u662f\u6309\u952e\u88ab\u6309\u4e0b\u4e86\u5f88\u591a\u6b21\u3002<\/p>\n<p><strong>\u6d88\u6296\u7684\u672c\u8d28<\/strong>\uff1a\u5728\u68c0\u6d4b\u5230\u7535\u5e73\u53d8\u5316\u540e\uff0c\u7b49\u5f85\u4e00\u6bb5\u65f6\u95f4\uff08\u901a\u5e38\u662f 10~20ms\uff09\uff0c\u518d\u6b21\u786e\u8ba4\u7535\u5e73\u72b6\u6001\uff0c\u5982\u679c\u4ecd\u7136\u4fdd\u6301\u53d8\u5316\u540e\u7684\u72b6\u6001\uff0c\u624d\u8ba4\u4e3a\u6309\u952e\u786e\u5b9e\u88ab\u6309\u4e0b\u4e86\u3002<\/p>\n<h4>\u6d88\u6296\u65b9\u6848\u4e00\uff1a\u5ef6\u65f6\u6d88\u6296\uff08\u7b80\u5355\u4f46\u4e0d\u63a8\u8350\uff09<\/h4>\n<p>\u5728\u4e2d\u65ad\u56de\u8c03\u51fd\u6570\u91cc\u76f4\u63a5\u7528 <code>HAL_Delay()<\/code> \u5ef6\u65f6\u6d88\u6296\uff1a<\/p>\n<pre><code>void HAL_GPIO_EXTI_Callback(uint16_t GPIO_Pin)\n{\n    if (GPIO_Pin == GPIO_PIN_0)\n    {\n        HAL_Delay(20); \/\/ \u5ef6\u65f6 20ms \u6d88\u6296\n        if (HAL_GPIO_ReadPin(GPIOA, GPIO_PIN_0) == GPIO_PIN_RESET)\n        {\n            HAL_GPIO_TogglePin(GPIOC, GPIO_PIN_13);\n        }\n    }\n}<\/code><\/pre>\n<p><strong>\u4e3a\u4ec0\u4e48\u4e0d\u63a8\u8350\uff1f<\/strong><\/p>\n<ul>\n<li><code>HAL_Delay()<\/code> \u4f9d\u8d56 SysTick \u4e2d\u65ad\uff0c\u800c\u5728\u4e2d\u65ad\u670d\u52a1\u51fd\u6570\u91cc\u8c03\u7528\u5ef6\u65f6\u51fd\u6570\uff0c\u53ef\u80fd\u4f1a\u963b\u585e\u5176\u4ed6\u4e2d\u65ad\uff0c\u751a\u81f3\u5bfc\u81f4\u7a0b\u5e8f\u5361\u6b7b\u3002<\/li>\n<li>\u4e2d\u65ad\u51fd\u6570\u5e94\u8be5<strong>\u8d8a\u5feb\u8d8a\u597d<\/strong>\uff0c\u4e0d\u8981\u505a\u8017\u65f6\u64cd\u4f5c\u3002<\/li>\n<\/ul>\n<h4>\u6d88\u6296\u65b9\u6848\u4e8c\uff1a\u6807\u5fd7\u4f4d + \u4e3b\u5faa\u73af\u68c0\u6d4b\uff08\u63a8\u8350\uff09<\/h4>\n<p>\u66f4\u5408\u7406\u7684\u505a\u6cd5\u662f\u5728\u4e2d\u65ad\u91cc\u53ea\u8bbe\u7f6e\u4e00\u4e2a\u6807\u5fd7\u4f4d\uff0c\u5177\u4f53\u7684\u6d88\u6296\u548c\u903b\u8f91\u5904\u7406\u653e\u5728\u4e3b\u5faa\u73af\u91cc\u5b8c\u6210\uff1a<\/p>\n<pre><code>\/* \u5b9a\u4e49\u5168\u5c40\u53d8\u91cf *\/\nuint8_t key_flag = 0;        \/\/ \u6309\u952e\u4e2d\u65ad\u6807\u5fd7\nuint32_t key_press_time = 0; \/\/ \u6309\u952e\u89e6\u53d1\u65f6\u95f4\u6233\n\n\/* \u4e2d\u65ad\u56de\u8c03\u51fd\u6570 *\/\nvoid HAL_GPIO_EXTI_Callback(uint16_t GPIO_Pin)\n{\n    if (GPIO_Pin == GPIO_PIN_0)\n    {\n        key_flag = 1;\n        key_press_time = HAL_GetTick(); \/\/ \u8bb0\u5f55\u5f53\u524d\u7cfb\u7edf\u65f6\u95f4\n    }\n}\n\n\/* main \u51fd\u6570\u4e2d\u7684 while(1) \u5faa\u73af *\/\nwhile (1)\n{\n    if (key_flag == 1)\n    {\n        \/\/ \u7b49\u5f85 20ms \u540e\u518d\u6b21\u68c0\u6d4b\u6309\u952e\u72b6\u6001\n        if (HAL_GetTick() - key_press_time &gt;= 20)\n        {\n            if (HAL_GPIO_ReadPin(GPIOA, GPIO_PIN_0) == GPIO_PIN_RESET)\n            {\n                HAL_GPIO_TogglePin(GPIOC, GPIO_PIN_13); \/\/ \u786e\u8ba4\u6309\u4e0b\uff0c\u7ffb\u8f6c LED\n            }\n            key_flag = 0; \/\/ \u6e05\u9664\u6807\u5fd7\u4f4d\n        }\n    }\n    \n    \/* \u8fd9\u91cc\u53ef\u4ee5\u7ee7\u7eed\u6267\u884c\u5176\u4ed6\u4efb\u52a1 *\/\n}\n<\/code><\/pre>\n<p><strong>\u4f18\u70b9\uff1a<\/strong><\/p>\n<ul>\n<li>\u4e2d\u65ad\u51fd\u6570\u6781\u77ed\uff0c\u4e0d\u963b\u585e\u7cfb\u7edf<\/li>\n<li>\u6d88\u6296\u903b\u8f91\u5728\u4e3b\u5faa\u73af\u4e2d\u5b8c\u6210\uff0c\u4e0d\u5f71\u54cd\u5176\u4ed6\u4e2d\u65ad<\/li>\n<li>\u7a0b\u5e8f\u7ed3\u6784\u6e05\u6670\uff0c\u6613\u4e8e\u6269\u5c55<\/li>\n<\/ul>\n<h4>\u6d88\u6296\u65b9\u6848\u4e09\uff1a\u5b9a\u65f6\u5668\u6d88\u6296\uff08\u5de5\u4e1a\u7ea7\u65b9\u6848\uff09<\/h4>\n<p>\u5bf9\u4e8e\u66f4\u590d\u6742\u7684\u9879\u76ee\uff0c\u53ef\u4ee5\u7528\u5b9a\u65f6\u5668\u6bcf\u9694 10ms \u626b\u63cf\u4e00\u6b21\u6309\u952e\u72b6\u6001\u3002\u5982\u679c\u8fde\u7eed\u4e24\u6b21\u626b\u63cf\u90fd\u68c0\u6d4b\u5230\u6309\u952e\u6309\u4e0b\uff0c\u624d\u8ba4\u4e3a\u662f\u6709\u6548\u6309\u952e\u3002\u8fd9\u662f<strong>\u6700\u7a33\u5b9a\u3001\u6700\u5e38\u7528<\/strong>\u7684\u6d88\u6296\u65b9\u6848\uff0c\u6211\u4eec\u540e\u7eed\u4f1a\u4e13\u95e8\u51fa\u4e00\u7bc7\u5b9a\u65f6\u5668\u7684\u6587\u7ae0\u6765\u8be6\u7ec6\u8bb2\u89e3\u3002<\/p>\n<hr \/>\n<h3>\u4e94\u3001\u4e2d\u65ad\u4f7f\u7528\u4e2d\u7684\u5e38\u89c1\u5751<\/h3>\n<table>\n<thead>\n<tr>\n<th>\u95ee\u9898<\/th>\n<th>\u539f\u56e0<\/th>\n<th>\u89e3\u51b3\u65b9\u6848<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td>\u6309\u4e00\u6b21\u6309\u952e\u89e6\u53d1\u591a\u6b21\u4e2d\u65ad<\/td>\n<td>\u6309\u952e\u6296\u52a8<\/td>\n<td>\u52a0\u5165\u6d88\u6296\u903b\u8f91<\/td>\n<\/tr>\n<tr>\n<td>\u4e2d\u65ad\u91cc\u8c03\u7528 HAL_Delay \u5361\u6b7b<\/td>\n<td>SysTick \u4f18\u5148\u7ea7\u4f4e\u4e8e\u5f53\u524d\u4e2d\u65ad<\/td>\n<td>\u4e2d\u65ad\u91cc\u4e0d\u8981\u8c03\u7528\u5ef6\u65f6\u51fd\u6570<\/td>\n<\/tr>\n<tr>\n<td>\u4e2d\u65ad\u4e0d\u89e6\u53d1<\/td>\n<td>NVIC \u672a\u4f7f\u80fd\u6216\u5f15\u811a\u914d\u7f6e\u9519\u8bef<\/td>\n<td>\u68c0\u67e5 CubeMX \u7684 NVIC \u548c GPIO \u6a21\u5f0f<\/td>\n<\/tr>\n<tr>\n<td>LED \u72b6\u6001\u4e0e\u9884\u671f\u76f8\u53cd<\/td>\n<td>\u89e6\u53d1\u6cbf\u8bbe\u7f6e\u9519\u8bef\u6216\u4e0a\u4e0b\u62c9\u914d\u7f6e\u4e0d\u5bf9<\/td>\n<td>\u786e\u8ba4\u6309\u952e\u7535\u8def\u662f\u9ad8\u7535\u5e73\u8fd8\u662f\u4f4e\u7535\u5e73\u89e6\u53d1<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<hr \/>\n<h3>\u516d\u3001\u603b\u7ed3<\/h3>\n<p>\u901a\u8fc7\u4eca\u5929\u7684\u5b66\u4e60\uff0c\u4f60\u5e94\u8be5\u5df2\u7ecf\u638c\u63e1\u4e86\uff1a<\/p>\n<ul>\n<li>\u5982\u4f55\u5728 CubeMX \u4e2d\u914d\u7f6e\u5916\u90e8\u4e2d\u65ad\uff08EXTI\uff09<\/li>\n<li>\u5982\u4f55\u7f16\u5199 HAL \u5e93\u7684\u4e2d\u65ad\u56de\u8c03\u51fd\u6570<\/li>\n<li>\u673a\u68b0\u6309\u952e\u6296\u52a8\u7684\u539f\u56e0\u53ca\u6d88\u6296\u65b9\u6cd5<\/li>\n<li>\u4e2d\u65ad\u7f16\u7a0b\u4e2d\u7684\u6ce8\u610f\u4e8b\u9879\u548c\u907f\u5751\u6307\u5357<\/li>\n<\/ul>\n<p>\u4e2d\u65ad\u8ba9\u5355\u7247\u673a\u4ece\u201c\u5355\u7ebf\u7a0b\u201d\u53d8\u6210\u4e86\u201c\u591a\u4efb\u52a1\u201d\uff0c\u662f\u5d4c\u5165\u5f0f\u5f00\u53d1\u4e2d\u4e0d\u53ef\u6216\u7f3a\u7684\u6838\u5fc3\u6280\u80fd\u3002\u638c\u63e1\u5b83\uff0c\u4f60\u5c31\u8fc8\u51fa\u4e86\u4ece\u201c\u70b9\u706f\u5c0f\u767d\u201d\u5230\u201c\u5d4c\u5165\u5f0f\u5de5\u7a0b\u5e08\u201d\u7684\u5173\u952e\u4e00\u6b65\u3002<\/p>\n<hr \/>\n<p><strong>\u4e0b\u4e00\u7bc7\u9884\u544a\uff1aSTM32 HAL\u5e93\u6781\u7b80\u5165\u95e8\uff1a\u5b9a\u65f6\u5668\u4e0ePWM\u8f93\u51fa\u3002<\/strong><\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u524d\u8a00 \u5728\u4e0a\u4e00\u7bc7\u4e2d\uff0c\u6211\u4eec\u5b66\u4f1a\u4e86\u7528\u4e32\u53e3\u89c2\u5bdf\u7a0b\u5e8f\u7684\u8fd0\u884c\u72b6\u6001\u3002\u4f46\u4f60\u662f\u5426\u60f3\u8fc7\uff1a\u5982\u679c\u7a0b\u5e8f\u4e00\u76f4\u5361\u5728HAL_Delay()\u91cc\u7b49 [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"advanced_seo_description":"","jetpack_seo_html_title":"","jetpack_seo_noindex":false,"_jetpack_memberships_contains_paid_content":false,"footnotes":""},"categories":[1],"tags":[],"class_list":["post-284","post","type-post","status-publish","format-standard","hentry","category-embedded"],"jetpack_featured_media_url":"","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/edryan.top\/index.php\/wp-json\/wp\/v2\/posts\/284","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/edryan.top\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/edryan.top\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/edryan.top\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/edryan.top\/index.php\/wp-json\/wp\/v2\/comments?post=284"}],"version-history":[{"count":0,"href":"https:\/\/edryan.top\/index.php\/wp-json\/wp\/v2\/posts\/284\/revisions"}],"wp:attachment":[{"href":"https:\/\/edryan.top\/index.php\/wp-json\/wp\/v2\/media?parent=284"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/edryan.top\/index.php\/wp-json\/wp\/v2\/categories?post=284"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/edryan.top\/index.php\/wp-json\/wp\/v2\/tags?post=284"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}