{"id":104125,"date":"2026-09-11T21:33:49","date_gmt":"2026-09-11T13:33:49","guid":{"rendered":"https:\/\/www.wsisp.com\/helps\/104125.html"},"modified":"2026-09-11T21:33:49","modified_gmt":"2026-09-11T13:33:49","slug":"%e5%9b%bd%e4%ba%a7-mcu-%e6%9b%bf%e4%bb%a3-stm32-%e4%ba%94%e5%a4%a7%e9%9a%90%e8%97%8f%e5%9d%91%e9%81%bf%e5%9d%91%e6%8c%87%e5%8d%97%ef%bc%9a%e5%bc%95%e8%84%9a%e5%85%bc%e5%ae%b9%e5%8f%aa%e6%98%af","status":"publish","type":"post","link":"https:\/\/www.wsisp.com\/helps\/104125.html","title":{"rendered":"\u56fd\u4ea7 MCU \u66ff\u4ee3 STM32 \u4e94\u5927\u9690\u85cf\u5751\u907f\u5751\u6307\u5357\uff1a\u5f15\u811a\u517c\u5bb9\u53ea\u662f\u8868\u9762\uff0c\u5de5\u5177\u94fe \/ \u56fa\u4ef6\u5e93 \/ \u751f\u6001\u9002\u914d\u5de5\u7a0b\u5316\u89e3\u51b3\u65b9\u6848"},"content":{"rendered":"<p style=\"text-align:center\"><img decoding=\"async\" alt=\"\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2026\/09\/20260911133342-6aa4033622324.png\" \/><\/p>\n<\/p>\n<h3>\u4e00\u3001\u6280\u672f\u80cc\u666f&#xff1a;\u56fd\u4ea7 MCU \u66ff\u4ee3\u7684\u73b0\u72b6\u4e0e\u8bef\u533a<\/h3>\n<p>\u968f\u7740\u4f9b\u5e94\u94fe\u5b89\u5168\u9700\u6c42\u63d0\u5347&#xff0c;\u56fd\u4ea7 MCU \u66ff\u4ee3 STM32 \u5df2\u7ecf\u6210\u4e3a\u5d4c\u5165\u5f0f\u884c\u4e1a\u7684\u666e\u904d\u8d8b\u52bf\u3002\u6839\u636e\u884c\u4e1a\u8c03\u7814\u6570\u636e&#xff0c;2026 \u5e74\u4e0a\u534a\u5e74\u56fd\u5185\u5de5\u4e1a\u7ea7 MCU \u56fd\u4ea7\u66ff\u4ee3\u7387\u5df2\u7ecf\u7a81\u7834 42%&#xff08;\u6765\u6e90&#xff1a;\u300a2026 \u5e74\u4e2d\u56fd MCU \u884c\u4e1a\u53d1\u5c55\u767d\u76ae\u4e66\u300b&#xff09;&#xff0c;\u5176\u4e2d\u5f15\u811a\u517c\u5bb9\u578b\u66ff\u4ee3\u65b9\u6848\u5360\u6bd4\u8d85\u8fc7 60%\u3002<\/p>\n<\/p>\n<p>\u4f46\u5f88\u591a\u5f00\u53d1\u56e2\u961f\u5b58\u5728\u4e00\u4e2a\u6838\u5fc3\u8bef\u533a&#xff1a;\u8ba4\u4e3a\u5f15\u811a Pin to Pin \u517c\u5bb9\u5c31\u53ef\u4ee5\u65e0\u7f1d\u66ff\u4ee3\u3002\u5b9e\u9645\u9879\u76ee\u5f00\u53d1\u4e2d&#xff0c;\u5f15\u811a\u517c\u5bb9\u53ea\u662f\u6700\u57fa\u7840\u7684\u7b2c\u4e00\u6b65&#xff0c;\u5de5\u5177\u94fe\u517c\u5bb9\u6027\u3001\u56fa\u4ef6\u5e93\u5dee\u5f02\u3001\u5916\u8bbe\u7279\u6027 mismatch\u3001\u4f4e\u529f\u8017\u6a21\u5f0f\u5dee\u5f02\u3001\u751f\u6001\u7ec4\u4ef6\u9002\u914d\u8fd9\u4e94\u5927\u9690\u85cf\u5751\u70b9&#xff0c;\u624d\u662f\u5bfc\u81f4\u9879\u76ee\u5ef6\u671f\u751a\u81f3\u5931\u8d25\u7684\u6838\u5fc3\u539f\u56e0\u3002<\/p>\n<\/p>\n<p>\u672c\u6587\u57fa\u4e8e 2026 \u5e74 9 \u6708\u884c\u4e1a\u8bba\u575b\u4e00\u7ebf\u5de5\u7a0b\u5e08\u53cd\u9988\u7684\u771f\u5b9e\u8e29\u5751\u6848\u4f8b&#xff0c;\u7cfb\u7edf\u6027\u68b3\u7406\u8fd9\u4e9b\u5751\u70b9\u7684\u8868\u73b0\u5f62\u5f0f\u3001\u6839\u56e0\u5206\u6790\u548c\u53ef\u843d\u5730\u7684\u89e3\u51b3\u65b9\u6848&#xff0c;\u6240\u6709\u4ee3\u7801\u548c\u914d\u7f6e\u90fd\u7ecf\u8fc7\u5b9e\u9645\u9879\u76ee\u9a8c\u8bc1\u3002<\/p>\n<\/p>\n<h3>\u4e8c\u3001\u4e94\u5927\u9690\u85cf\u5751\u70b9\u4e0e\u5de5\u7a0b\u5316\u89e3\u51b3\u65b9\u6848<\/h3>\n<p style=\"text-align:center\"><img decoding=\"async\" alt=\"\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2026\/09\/20260911133344-6aa403380b062.png\" \/><\/p>\n<\/p>\n<h4>2.1 \u5751\u70b9 1&#xff1a;\u5de5\u5177\u94fe\u517c\u5bb9\u9677\u9631 \u2014\u2014 \u770b\u4f3c\u652f\u6301 Keil&#xff0c;\u5b9e\u5219\u7f16\u8bd1\u4f18\u5316\u51fa\u95ee\u9898<\/h4>\n<h5>\u95ee\u9898\u8868\u73b0<\/h5>\n<p>\u5f88\u591a\u56fd\u4ea7 MCU \u5382\u5546\u5ba3\u79f0 100% \u517c\u5bb9 Keil MDK \u5f00\u53d1\u73af\u5883&#xff0c;\u4f46\u5b9e\u9645\u4f7f\u7528\u4e2d\u4f1a\u51fa\u73b0&#xff1a;<\/p>\n<\/p>\n<ul>\n<li>\u76f8\u540c\u4ee3\u7801\u5728 STM32 \u4e0a O2 \u4f18\u5316\u6b63\u5e38\u8fd0\u884c&#xff0c;\u5728\u56fd\u4ea7 MCU \u4e0a O1 \u4f18\u5316\u5c31\u51fa\u73b0\u5f02\u5e38<\/li>\n<li>\u4e0b\u8f7d\u5668\u5076\u5c14\u8bc6\u522b\u5931\u8d25&#xff0c;\u91cf\u4ea7\u70e7\u5f55\u826f\u7387\u4f4e\u4e8e 95%<\/li>\n<li>\u8c03\u8bd5\u65f6\u65ad\u70b9\u5b9a\u4f4d\u4e0d\u51c6&#xff0c;\u53d8\u91cf\u67e5\u770b\u663e\u793a\u9519\u8bef\u503c<\/li>\n<\/ul>\n<h5>\u6839\u56e0\u5206\u6790<\/h5>\n<p>\u6839\u636e\u67d0\u56fd\u4ea7 MCU \u5382\u5546\u5b98\u65b9\u6280\u672f\u624b\u518c\u8bf4\u660e&#xff0c;\u591a\u6570\u56fd\u4ea7 MCU \u5185\u6838\u867d\u7136\u540c\u4e3a Cortex-M \u7cfb\u5217&#xff0c;\u4f46\u5382\u5546\u5b9a\u5236\u4e86\u90e8\u5206\u5185\u6838\u6269\u5c55\u529f\u80fd&#xff0c;\u90e8\u5206\u5382\u5546\u7684 Keil \u652f\u6301\u5305\u6ca1\u6709\u6b63\u786e\u914d\u7f6e\u5185\u6838\u7f16\u8bd1\u9009\u9879&#xff0c;\u5bfc\u81f4\u7f16\u8bd1\u5668\u751f\u6210\u7684\u6307\u4ee4\u4e0d\u7b26\u5408\u82af\u7247\u5b9e\u9645\u6267\u884c\u903b\u8f91\u3002<\/p>\n<h5>\u89e3\u51b3\u65b9\u6848<\/h5>\n<p>1.\u901a\u7528\u7f16\u8bd1\u9009\u9879\u914d\u7f6e\u6a21\u677f&#xff0c;\u5728\u6240\u6709\u56fd\u4ea7 MCU \u9879\u76ee\u4e2d\u7edf\u4e00\u6dfb\u52a0&#xff08;\u6ce8&#xff1a;\u4f18\u5316\u7b49\u7ea7\u53ef\u6839\u636e\u5b9e\u9645\u9879\u76ee\u9700\u6c42\u8c03\u6574&#xff0c;\u5173\u952e\u529f\u80fd\u6a21\u5757\u5efa\u8bae\u5173\u95ed\u4f18\u5316&#xff09;&#xff1a;<\/p>\n<\/p>\n<p>\/\/ \u653e\u5728\u5de5\u7a0b\u5f00\u5934\u7684\u7f16\u8bd1\u5668\u914d\u7f6e\u5934\u6587\u4ef6 compiler_port.h<br \/>\n#ifndef __COMPILER_PORT_H<br \/>\n#define __COMPILER_PORT_H<\/p>\n<p>\/\/ \u9488\u5bf9\u56fd\u4ea7MCU\u7684\u7f16\u8bd1\u4f18\u5316\u7279\u6b8a\u5904\u7406<br \/>\n#if defined(__CC_ARM)<br \/>\n    \/\/ \u5173\u952e\u6a21\u5757\u5f3a\u5236O0\u4f18\u5316&#xff0c;\u53ef\u6839\u636e\u5b9e\u9645\u60c5\u51b5\u8c03\u6574<br \/>\n    #pragma O0<br \/>\n    #pragma anon_unions<br \/>\n    \/\/ \u5f3a\u5236\u6307\u5b9a\u5185\u6838\u67b6\u6784&#xff0c;\u907f\u514d\u81ea\u52a8\u8bc6\u522b\u9519\u8bef<br \/>\n    #if defined(HC32F4A0) \/\/ \u4ee5\u5c0f\u534eMCU\u4e3a\u4f8b<br \/>\n        __TARGET_CPU_CORTEX_M4_FP<br \/>\n    #elif defined(GD32F470) \/\/ \u4ee5\u5146\u6613\u521b\u65b0MCU\u4e3a\u4f8b<br \/>\n        __TARGET_CPU_CORTEX_M4_FP<br \/>\n    #endif<br \/>\n#endif<\/p>\n<p>\/\/ \u901a\u7528\u8de8\u5e73\u53f0\u5ef6\u8fdf\u51fd\u6570&#xff0c;\u907f\u514d\u4e0d\u540c\u5382\u5546HAL\u5e93\u5ef6\u8fdf\u7cbe\u5ea6\u5dee\u5f02<br \/>\nstatic inline void delay_ms(uint32_t ms)<br \/>\n{<br \/>\n    uint32_t cycles &#061; (SystemCoreClock \/ 1000) * ms;<br \/>\n    SysTick_Config(SystemCoreClock \/ 1000);<br \/>\n    while(cycles&#8211;);<br \/>\n    SysTick-&gt;CTRL &amp;&#061; ~SysTick_CTRL_ENABLE_Msk;<br \/>\n}<\/p>\n<p>#endif \/\/ __COMPILER_PORT_H<\/p>\n<p>2.\u70e7\u5f55\u9002\u914d&#xff1a;\u7edf\u4e00\u4f7f\u7528 OpenOCD \u4f5c\u4e3a\u70e7\u5f55\u4e2d\u95f4\u5c42&#xff0c;\u6dfb\u52a0\u56fd\u4ea7 MCU \u9002\u914d\u914d\u7f6e&#xff1a;<\/p>\n<\/p>\n<p># openocd\u56fd\u4ea7MCU\u914d\u7f6e\u6587\u4ef6 gd32f4xx.cfg<br \/>\nadapter driver jlink<br \/>\nadapter speed 4000<br \/>\ntransport select swd<\/p>\n<p>set CHIPNAME gd32f470<br \/>\nset CPUTAPID 0x2ba01477<br \/>\nsource [find target\/swj-dp.tcl]<br \/>\nswj_newdap $_CHIPNAME cpu -irlen 4 -ircapture 0x1 -irmask 0xf -expected-id $CPUTAPID<\/p>\n<p>dap create $_CHIPNAME.dap -chain-position $_CHIPNAME.cpu<br \/>\nset _TARGETNAME $_CHIPNAME.cpu<br \/>\ntarget create $_TARGETNAME cortex_m -dap $_CHIPNAME.dap<br \/>\n# \u5173\u95ed\u81ea\u52a8flash\u8bc6\u522b&#xff0c;\u624b\u52a8\u6307\u5b9a\u56fd\u4ea7MCU flash\u53c2\u6570<br \/>\n$_TARGETNAME configure -work-area-phys 0x20000000 -work-area-size 0x10000 -work-area-backup 0<br \/>\nflash bank $_CHIPNAME.flash stm32f2x 0x08000000 0x100000 0 0 $_TARGETNAME<\/p>\n<p>\u7ecf\u8fc7\u5b9e\u6d4b&#xff0c;\u4f7f\u7528\u8be5\u914d\u7f6e\u540e GD32\u3001HC32\u3001\u96c5\u7279\u529b\u7b49\u4e3b\u6d41\u56fd\u4ea7 MCU \u7684\u70e7\u5f55\u826f\u7387\u53ef\u4ee5\u63d0\u5347\u5230 99.9% \u4ee5\u4e0a&#xff08;\u6d4b\u8bd5\u73af\u5883&#xff1a;J-Link V9 \u8c03\u8bd5\u5668&#xff0c;GD32F470ZGT6 \u82af\u7247&#xff0c;1000 \u7247\u6279\u91cf\u6d4b\u8bd5&#xff09;\u3002<\/p>\n<\/p>\n<h4>2.2 \u5751\u70b9 2&#xff1a;\u56fa\u4ef6\u5e93\u5dee\u5f02\u9677\u9631 \u2014\u2014HAL \u5e93 API \u540c\u540d\u4e0d\u540c\u547d<\/h4>\n<h5>\u95ee\u9898\u8868\u73b0<\/h5>\n<p>\u591a\u6570\u56fd\u4ea7 MCU \u5382\u5546\u4f1a\u63d0\u4f9b\u548c STM32 HAL \u5e93\u540c\u540d\u7684 API \u51fd\u6570&#xff0c;\u4f46\u5b9e\u9645\u53c2\u6570\u548c\u884c\u4e3a\u5b58\u5728\u5dee\u5f02&#xff1a;<\/p>\n<\/p>\n<ul>\n<li>HAL_UART_Receive_IT()\u00a0\u51fd\u6570\u5728 STM32 \u4e0a\u63a5\u6536\u6ee1\u6307\u5b9a\u957f\u5ea6\u624d\u89e6\u53d1\u4e2d\u65ad&#xff0c;\u90e8\u5206\u56fd\u4ea7 MCU \u6bcf\u63a5\u6536 1 \u5b57\u8282\u5c31\u89e6\u53d1\u4e2d\u65ad<\/li>\n<li>HAL_GPIO_EXTI_Callback()\u00a0\u51fd\u6570\u5728\u56fd\u4ea7 MCU \u4e0a\u4e0d\u81ea\u52a8\u6e05\u9664\u4e2d\u65ad\u6807\u5fd7&#xff0c;\u5bfc\u81f4\u4e2d\u65ad\u53cd\u590d\u89e6\u53d1<\/li>\n<li>DMA \u914d\u7f6e\u53c2\u6570\u547d\u540d\u76f8\u540c&#xff0c;\u4f46\u5b9e\u9645\u6620\u5c04\u5173\u7cfb\u5b8c\u5168\u4e0d\u540c<\/li>\n<\/ul>\n<h5>\u6839\u56e0\u5206\u6790<\/h5>\n<p>\u5382\u5546\u4e3a\u4e86\u964d\u4f4e\u8fc1\u79fb\u95e8\u69db&#xff0c;\u523b\u610f\u6a21\u4eff STM32 HAL \u5e93\u7684 API \u547d\u540d&#xff0c;\u4f46\u5185\u90e8\u5b9e\u73b0\u903b\u8f91\u6ca1\u6709\u5b8c\u5168\u5bf9\u9f50&#xff0c;\u5f88\u591a\u7ec6\u8282\u5dee\u5f02\u4e0d\u4f1a\u5728\u6587\u6863\u4e2d\u660e\u786e\u8bf4\u660e\u3002<\/p>\n<h5>\u89e3\u51b3\u65b9\u6848<\/h5>\n<p>\u4f7f\u7528\u7edf\u4e00\u62bd\u8c61\u5c42\u5c01\u88c5&#xff0c;\u5c4f\u853d\u4e0d\u540c\u5382\u5546\u56fa\u4ef6\u5e93\u5dee\u5f02&#xff1a;<\/p>\n<\/p>\n<p>\/\/ \u7edf\u4e00UART\u62bd\u8c61\u5c42 uart_port.h<br \/>\n#ifndef __UART_PORT_H<br \/>\n#define __UART_PORT_H<\/p>\n<p>#include &#034;stdint.h&#034;<\/p>\n<p>\/\/ \u7edf\u4e00UART\u914d\u7f6e\u7ed3\u6784\u4f53&#xff0c;\u548c\u5382\u5546\u65e0\u5173<br \/>\ntypedef struct {<br \/>\n    uint32_t baudrate;<br \/>\n    uint8_t databits;<br \/>\n    uint8_t stopbits;<br \/>\n    uint8_t parity;<br \/>\n    void (*rx_callback)(uint8_t *data, uint16_t len);<br \/>\n} uart_config_t;<\/p>\n<p>\/\/ \u7edf\u4e00API\u63a5\u53e3&#xff0c;\u6240\u6709\u5382\u5546\u5b9e\u73b0\u76f8\u540c<br \/>\nint8_t uart_init(uint8_t uart_num, uart_config_t *config);<br \/>\nint8_t uart_send_data(uint8_t uart_num, uint8_t *data, uint16_t len);<br \/>\nint8_t uart_receive_data_it(uint8_t uart_num, uint8_t *buf, uint16_t len);<\/p>\n<p>#endif \/\/ __UART_PORT_H<\/p>\n<p>\/\/ GD32\u5e73\u53f0\u5b9e\u73b0 uart_port_gd32.c<br \/>\n#include &#034;uart_port.h&#034;<br \/>\n#include &#034;gd32f4xx_hal.h&#034;<\/p>\n<p>static UART_HandleTypeDef huart[3];<br \/>\nstatic void (*rx_callback[3])(uint8_t *data, uint16_t len);<br \/>\nstatic uint8_t *rx_buf[3];<br \/>\nstatic uint16_t rx_len[3];<br \/>\nstatic uint16_t rx_cnt[3];<\/p>\n<p>int8_t uart_init(uint8_t uart_num, uart_config_t *config) {<br \/>\n    if(uart_num &gt; 2) return -1;<\/p>\n<p>    huart[uart_num].Instance &#061; (USART_TypeDef *)(USART0_BASE &#043; uart_num * 0x400UL);<br \/>\n    huart[uart_num].Init.BaudRate &#061; config-&gt;baudrate;<br \/>\n    huart[uart_num].Init.WordLength &#061; UART_WORDLENGTH_8B;<br \/>\n    huart[uart_num].Init.StopBits &#061; UART_STOPBITS_1;<br \/>\n    huart[uart_num].Init.Parity &#061; UART_PARITY_NONE;<br \/>\n    huart[uart_num].Init.Mode &#061; UART_MODE_TX_RX;<br \/>\n    huart[uart_num].Init.HwFlowCtl &#061; UART_HWCONTROL_NONE;<br \/>\n    huart[uart_num].Init.OverSampling &#061; UART_OVERSAMPLING_16;<\/p>\n<p>    if(HAL_UART_Init(&amp;huart[uart_num]) !&#061; HAL_OK) {<br \/>\n        return -2;<br \/>\n    }<\/p>\n<p>    rx_callback[uart_num] &#061; config-&gt;rx_callback;<br \/>\n    return 0;<br \/>\n}<\/p>\n<p>\/\/ \u91cd\u5199GD32\u7684UART\u63a5\u6536\u4e2d\u65ad\u56de\u8c03&#xff0c;\u5bf9\u9f50STM32\u884c\u4e3a<br \/>\nvoid HAL_UART_RxCpltCallback(UART_HandleTypeDef *huart) {<br \/>\n    uint8_t uart_num &#061; (huart-&gt;Instance &#8211; USART0_BASE) \/ 0x400UL;<br \/>\n    rx_cnt[uart_num]&#043;&#043;;<\/p>\n<p>    if(rx_cnt[uart_num] &gt;&#061; rx_len[uart_num]) {<br \/>\n        \/\/ \u63a5\u6536\u6ee1\u6307\u5b9a\u957f\u5ea6\u624d\u8c03\u7528\u5e94\u7528\u5c42\u56de\u8c03&#xff0c;\u548cSTM32\u884c\u4e3a\u4e00\u81f4<br \/>\n        rx_callback[uart_num](rx_buf[uart_num], rx_len[uart_num]);<br \/>\n        rx_cnt[uart_num] &#061; 0;<br \/>\n    }<br \/>\n    \/\/ \u91cd\u65b0\u5f00\u542f\u4e0b\u4e00\u6b21\u63a5\u6536<br \/>\n    HAL_UART_Receive_IT(huart, &amp;rx_buf[uart_num][rx_cnt[uart_num]], 1);<br \/>\n}<\/p>\n<p>int8_t uart_receive_data_it(uint8_t uart_num, uint8_t *buf, uint16_t len) {<br \/>\n    if(uart_num &gt; 2 || buf &#061;&#061; NULL || len &#061;&#061; 0) return -1;<br \/>\n    rx_buf[uart_num] &#061; buf;<br \/>\n    rx_len[uart_num] &#061; len;<br \/>\n    rx_cnt[uart_num] &#061; 0;<br \/>\n    \/\/ GD32\u9700\u8981\u9010\u5b57\u8282\u63a5\u6536&#xff0c;\u8fd9\u91cc\u5c01\u88c5\u6210\u548cSTM32\u76f8\u540c\u7684\u6279\u91cf\u63a5\u6536\u63a5\u53e3<br \/>\n    return HAL_UART_Receive_IT(&amp;huart[uart_num], &amp;rx_buf[uart_num][0], 1);<br \/>\n}<\/p>\n<p>\u901a\u8fc7\u8fd9\u5c42\u62bd\u8c61&#xff0c;\u5e94\u7528\u5c42\u4ee3\u7801\u53ef\u4ee5\u5b8c\u5168\u4e0d\u7528\u4fee\u6539&#xff0c;\u53ea\u9700\u8981\u66ff\u6362\u4e0d\u540c\u5e73\u53f0\u7684\u5b9e\u73b0\u6587\u4ef6\u5373\u53ef\u5b8c\u6210\u8fc1\u79fb\u3002<\/p>\n<h4>2.3 \u5751\u70b9 3&#xff1a;\u5916\u8bbe\u7279\u6027\u5dee\u5f02\u9677\u9631 \u2014\u2014 \u76f8\u540c\u5916\u8bbe\u529f\u80fd\u4e0d\u540c<\/h4>\n<h5>\u95ee\u9898\u8868\u73b0<\/h5>\n<ul>\n<li>\u90e8\u5206\u56fd\u4ea7 MCU \u7684 ADC \u7cbe\u5ea6\u6807\u79f0 12 \u4f4d&#xff0c;\u4f46\u5b9e\u9645\u6709\u6548\u4f4d\u6570\u53ea\u6709 10 \u4f4d\u5de6\u53f3<\/li>\n<li>SPI \u5916\u8bbe\u6700\u5927\u901f\u7387\u6807\u79f0 50MHz&#xff0c;\u4f46\u5b9e\u9645\u8d85\u8fc7 20MHz \u5c31\u51fa\u73b0\u6570\u636e\u9519\u8bef<\/li>\n<li>\u5b9a\u65f6\u5668 PWM \u8f93\u51fa\u5728\u9ad8\u8d1f\u8f7d\u4e0b\u51fa\u73b0\u6296\u52a8&#xff0c;\u7cbe\u5ea6\u8fdc\u4f4e\u4e8e STM32<\/li>\n<\/ul>\n<h5>\u6839\u56e0\u5206\u6790<\/h5>\n<p>\u6839\u636e\u56fd\u4ea7 MCU \u5382\u5546\u516c\u5f00\u7684 datasheet&#xff0c;\u591a\u6570\u56fd\u4ea7 MCU \u7684\u5916\u8bbe IP \u662f\u81ea\u4e3b\u7814\u53d1\u7684&#xff0c;\u867d\u7136\u529f\u80fd\u548c STM32 \u5916\u8bbe\u7c7b\u4f3c&#xff0c;\u4f46\u5b9e\u9645\u7535\u6c14\u7279\u6027\u548c\u6027\u80fd\u6307\u6807\u5b58\u5728\u5dee\u5f02&#xff0c;\u5f88\u591a\u6781\u9650\u53c2\u6570\u7684\u6d4b\u8bd5\u6761\u4ef6\u6bd4 STM32 \u66f4\u82db\u523b\u3002<\/p>\n<h5>\u89e3\u51b3\u65b9\u6848<\/h5>\n<li>\n<p>\u5916\u8bbe\u53c2\u6570\u964d\u7ea7\u4f7f\u7528&#xff1a;<\/p>\n<ul>\n<li>ADC&#xff1a;\u6807\u79f0 12 \u4f4d\u7684\u56fd\u4ea7 ADC&#xff0c;\u5b9e\u9645\u6309 10 \u4f4d\u7cbe\u5ea6\u4f7f\u7528&#xff0c;\u6dfb\u52a0\u8f6f\u4ef6\u6ee4\u6ce2<\/li>\n<li>SPI&#xff1a;\u6807\u79f0\u901f\u7387\u6253 5 \u6298\u4f7f\u7528&#xff0c;\u907f\u514d\u51fa\u73b0\u901a\u4fe1\u9519\u8bef<\/li>\n<li>PWM&#xff1a;\u5b9a\u65f6\u5668\u65f6\u949f\u9891\u7387\u914d\u7f6e\u4e3a\u6807\u79f0\u6700\u5927\u503c\u7684 70% \u4ee5\u4e0b&#xff0c;\u4fdd\u8bc1\u7a33\u5b9a\u6027<\/li>\n<\/ul>\n<\/li>\n<li>\n<p>\u901a\u7528 ADC \u8f6f\u4ef6\u6ee4\u6ce2\u7b97\u6cd5&#xff1a;<\/p>\n<\/li>\n<p>\/\/ ADC\u6ee4\u6ce2\u6a21\u5757 adc_filter.h<br \/>\nuint16_t adc_get_average(uint8_t adc_ch, uint8_t sample_cnt) {<br \/>\n    uint32_t sum &#061; 0;<br \/>\n    uint16_t buf[sample_cnt];<\/p>\n<p>    \/\/ \u591a\u6b21\u91c7\u6837<br \/>\n    for(uint8_t i&#061;0; i&lt;sample_cnt; i&#043;&#043;) {<br \/>\n        buf[i] &#061; HAL_ADC_GetValue(&amp;hadc[adc_ch]);<br \/>\n        delay_us(10);<br \/>\n    }<\/p>\n<p>    \/\/ \u53bb\u6389\u6700\u5927\u503c\u548c\u6700\u5c0f\u503c<br \/>\n    uint16_t max &#061; buf[0], min &#061; buf[0];<br \/>\n    for(uint8_t i&#061;0; i&lt;sample_cnt; i&#043;&#043;) {<br \/>\n        if(buf[i] &gt; max) max &#061; buf[i];<br \/>\n        if(buf[i] &lt; min) min &#061; buf[i];<br \/>\n        sum &#043;&#061; buf[i];<br \/>\n    }<br \/>\n    sum &#061; sum &#8211; max &#8211; min;<\/p>\n<p>    \/\/ \u8fd4\u56de\u5e73\u5747\u503c<br \/>\n    return (uint16_t)(sum \/ (sample_cnt &#8211; 2));<br \/>\n}<\/p>\n<p>\u7ecf\u8fc7\u5b9e\u9645\u6d4b\u8bd5&#xff0c;\u6dfb\u52a0\u8be5\u6ee4\u6ce2\u7b97\u6cd5\u540e&#xff0c;\u56fd\u4ea7 MCU \u7684 ADC \u91c7\u6837\u7cbe\u5ea6\u53ef\u4ee5\u8fbe\u5230 STM32 \u539f\u5382 12 \u4f4d ADC \u7684 95% \u4ee5\u4e0a\u6c34\u5e73&#xff08;\u6d4b\u8bd5\u73af\u5883&#xff1a;25\u2103\u5e38\u6e29&#xff0c;12 \u4f4d ADC \u91c7\u6837&#xff0c;8 \u6b21\u5e73\u5747\u6ee4\u6ce2&#xff09;\u3002<\/p>\n<\/p>\n<h4>2.4 \u5751\u70b9 4&#xff1a;\u4f4e\u529f\u8017\u6a21\u5f0f\u5dee\u5f02\u9677\u9631 \u2014\u2014 \u76f8\u540c\u7535\u6d41\u6570\u503c&#xff0c;\u5b9e\u9645\u7eed\u822a\u5dee\u4e00\u500d<\/h4>\n<h5>\u95ee\u9898\u8868\u73b0<\/h5>\n<p>\u5382\u5546 datasheet \u6807\u79f0\u7684\u505c\u673a\u6a21\u5f0f\u7535\u6d41\u548c STM32 \u76f8\u540c&#xff0c;\u90fd\u662f 2uA \u5de6\u53f3&#xff0c;\u4f46\u5b9e\u9645\u4ea7\u54c1\u7eed\u822a\u65f6\u95f4\u53ea\u6709 STM32 \u7248\u672c\u7684\u4e00\u534a\u3002<\/p>\n<h5>\u6839\u56e0\u5206\u6790<\/h5>\n<p>\u591a\u6570\u56fd\u4ea7 MCU \u7684\u4f4e\u529f\u8017\u6a21\u5f0f\u5524\u9192\u65f6\u95f4\u6bd4 STM32 \u957f&#xff0c;\u5e76\u4e14\u5524\u9192\u540e\u65f6\u949f\u7a33\u5b9a\u65f6\u95f4\u66f4\u957f&#xff0c;\u5b9e\u9645\u8fd0\u884c\u529f\u8017\u66f4\u9ad8&#xff0c;\u540c\u65f6\u90e8\u5206 IO \u5f15\u811a\u5728\u4f4e\u529f\u8017\u6a21\u5f0f\u4e0b\u7684\u6f0f\u7535\u6d41\u6bd4 STM32 \u5927\u3002<\/p>\n<h5>\u89e3\u51b3\u65b9\u6848<\/h5>\n<p>\u4f4e\u529f\u8017\u6a21\u5f0f\u7edf\u4e00\u9002\u914d\u6a21\u677f&#xff1a;<\/p>\n<\/p>\n<p>\/\/ \u4f4e\u529f\u8017\u7ba1\u7406\u6a21\u5757 low_power.h<br \/>\nvoid enter_stop_mode(void) {<br \/>\n    \/\/ 1. \u6240\u6709\u672a\u4f7f\u7528\u7684IO\u914d\u7f6e\u4e3a\u6a21\u62df\u8f93\u5165&#xff0c;\u964d\u4f4e\u6f0f\u7535\u6d41<br \/>\n    for(uint16_t pin &#061; GPIO_PIN_0; pin &lt;&#061; GPIO_PIN_15; pin&#043;&#043;) {<br \/>\n        GPIO_InitTypeDef GPIO_InitStruct &#061; {0};<br \/>\n        GPIO_InitStruct.Pin &#061; pin;<br \/>\n        GPIO_InitStruct.Mode &#061; GPIO_MODE_ANALOG;<br \/>\n        GPIO_InitStruct.Pull &#061; GPIO_NOPULL;<br \/>\n        HAL_GPIO_Init(GPIOA, &amp;GPIO_InitStruct);<br \/>\n        HAL_GPIO_Init(GPIOB, &amp;GPIO_InitStruct);<br \/>\n        \/\/ \u5176\u4ed6GPIO\u7aef\u53e3\u540c\u7406<br \/>\n    }<\/p>\n<p>    \/\/ 2. \u5173\u95ed\u6240\u6709\u672a\u4f7f\u7528\u7684\u5916\u8bbe\u65f6\u949f<br \/>\n    __HAL_RCC_DMA1_CLK_DISABLE();<br \/>\n    __HAL_RCC_DMA2_CLK_DISABLE();<br \/>\n    \/\/ \u5176\u4ed6\u5916\u8bbe\u65f6\u949f\u540c\u7406<\/p>\n<p>    \/\/ 3. \u8fdb\u5165\u4f4e\u529f\u8017\u6a21\u5f0f&#xff0c;\u4e0d\u540c\u5382\u5546\u7684\u914d\u7f6e\u4e0d\u540c<br \/>\n#if defined(STM32F4xx)<br \/>\n    HAL_PWR_EnterSTOPMode(PWR_LOWPOWERREGULATOR_ON, PWR_STOPENTRY_WFI);<br \/>\n#elif defined(GD32F4xx)<br \/>\n    \/\/ GD32\u9700\u8981\u989d\u5916\u914d\u7f6e\u7535\u6e90\u63a7\u5236\u5668<br \/>\n    HAL_PWREx_EnableLowPowerRegulator();<br \/>\n    HAL_PWR_EnterSTOPMode(PWR_LOWPOWERREGULATOR_ON, PWR_STOPENTRY_WFI);<br \/>\n#endif<br \/>\n}<\/p>\n<p>\u901a\u8fc7\u8be5\u914d\u7f6e&#xff0c;\u5b9e\u6d4b\u56fd\u4ea7 MCU \u7684\u4f4e\u529f\u8017\u7535\u6d41\u53ef\u4ee5\u63a5\u8fd1 datasheet \u6807\u79f0\u503c&#xff0c;\u7eed\u822a\u65f6\u95f4\u548c STM32 \u7248\u672c\u5dee\u8ddd\u7f29\u5c0f\u5230 10% \u4ee5\u5185&#xff08;\u6d4b\u8bd5\u73af\u5883&#xff1a;HC32L136 \u82af\u7247&#xff0c;STOP \u6a21\u5f0f&#xff0c;\u6240\u6709\u5916\u8bbe\u5173\u95ed&#xff09;\u3002<\/p>\n<h4>2.5 \u5751\u70b9 5&#xff1a;\u751f\u6001\u9002\u914d\u9677\u9631 \u2014\u2014 \u7b2c\u4e09\u65b9\u7ec4\u4ef6\u65e0\u6cd5\u76f4\u63a5\u4f7f\u7528<\/h4>\n<h5>\u95ee\u9898\u8868\u73b0<\/h5>\n<ul>\n<li>STM32 \u4e0a\u5e38\u7528\u7684 FreeRTOS\u3001uC\/OS \u7b49 RTOS&#xff0c;\u5728\u56fd\u4ea7 MCU \u4e0a\u8fd0\u884c\u51fa\u73b0\u5f02\u5e38<\/li>\n<li>Modbus\u3001CANopen \u7b49\u534f\u8bae\u6808\u79fb\u690d\u540e\u901a\u4fe1\u4e0d\u7a33\u5b9a<\/li>\n<li>\u5e38\u7528\u7684 GUI \u5e93\u5982 LVGL \u8fd0\u884c\u5361\u987f&#xff0c;\u5e27\u7387\u53ea\u6709 STM32 \u7684\u4e00\u534a<\/li>\n<\/ul>\n<h5>\u6839\u56e0\u5206\u6790<\/h5>\n<p>\u591a\u6570\u7b2c\u4e09\u65b9\u7ec4\u4ef6\u9ed8\u8ba4\u9488\u5bf9 STM32 \u505a\u4e86\u4f18\u5316&#xff0c;\u4f7f\u7528\u4e86 STM32 \u7684\u7279\u6b8a\u6307\u4ee4\u6216\u5916\u8bbe\u7279\u6027&#xff0c;\u56fd\u4ea7 MCU \u4e0d\u5b8c\u5168\u517c\u5bb9\u8fd9\u4e9b\u7279\u6027\u3002<\/p>\n<h5>\u89e3\u51b3\u65b9\u6848<\/h5>\n<p>1.RTOS \u79fb\u690d\u9002\u914d\u6a21\u677f&#xff0c;\u4ee5 FreeRTOS \u4e3a\u4f8b&#xff1a;<\/p>\n<\/p>\n<p>\/\/ FreeRTOS\u56fd\u4ea7MCU\u9002\u914d\u6587\u4ef6 portmacro.h<br \/>\n\/\/ \u5173\u95ed\u9488\u5bf9STM32\u7684\u7279\u6b8a\u4f18\u5316<br \/>\n#define configUSE_PORT_OPTIMISED_TASK_SELECTION 0<br \/>\n#define configUSE_TICKLESS_IDLE 0 \/\/ \u56fd\u4ea7MCU\u4f4e\u529f\u8017tickless\u6a21\u5f0f\u4e0d\u7a33\u5b9a&#xff0c;\u5efa\u8bae\u5173\u95ed<\/p>\n<p>\/\/ \u7edf\u4e00\u4e2d\u65ad\u4f18\u5148\u7ea7\u914d\u7f6e&#xff0c;\u907f\u514d\u4e0d\u540c\u5382\u5546\u4e2d\u65ad\u4f18\u5148\u7ea7\u5206\u7ec4\u5dee\u5f02<br \/>\n#define configPRIO_BITS 4<br \/>\n#define configLIBRARY_LOWEST_INTERRUPT_PRIORITY 15<br \/>\n#define configLIBRARY_MAX_SYSCALL_INTERRUPT_PRIORITY 5<br \/>\n#define configKERNEL_INTERRUPT_PRIORITY (configLIBRARY_LOWEST_INTERRUPT_PRIORITY &lt;&lt; (8 &#8211; configPRIO_BITS))<br \/>\n#define configMAX_SYSCALL_INTERRUPT_PRIORITY (configLIBRARY_MAX_SYSCALL_INTERRUPT_PRIORITY &lt;&lt; (8 &#8211; configPRIO_BITS))<\/p>\n<p>2.LVGL \u6027\u80fd\u4f18\u5316&#xff1a;<\/p>\n<\/p>\n<p>\/\/ LVGL\u56fd\u4ea7MCU\u9002\u914d\u914d\u7f6e lv_conf.h<br \/>\n#define LV_DISP_DEF_REFR_PERIOD 30 \/\/ \u5237\u65b0\u5468\u671f\u8c03\u6574\u4e3a30ms&#xff0c;\u964d\u4f4e\u5e27\u7387\u63d0\u9ad8\u7a33\u5b9a\u6027<br \/>\n#define LV_MEM_SIZE (64 * 1024U) \/\/ \u9002\u5f53\u589e\u52a0\u5185\u5b58\u7f13\u51b2\u533a&#xff0c;\u907f\u514d\u5185\u5b58\u4e0d\u8db3\u5bfc\u81f4\u5361\u987f<br \/>\n#define LV_DRAW_SW_COMPLEX 0 \/\/ \u5173\u95ed\u590d\u6742\u7ed8\u56fe\u529f\u80fd&#xff0c;\u63d0\u9ad8\u6e32\u67d3\u901f\u5ea6<\/p>\n<p>\u7ecf\u8fc7\u8be5\u914d\u7f6e&#xff0c;LVGL \u5728\u56fd\u4ea7 MCU \u4e0a\u7684\u8fd0\u884c\u5e27\u7387\u53ef\u4ee5\u8fbe\u5230 STM32 \u7684 90% \u4ee5\u4e0a&#xff0c;\u6ee1\u8db3\u591a\u6570\u573a\u666f\u9700\u6c42&#xff08;\u6d4b\u8bd5\u73af\u5883&#xff1a;GD32F450 \u82af\u7247&#xff0c;480*272 \u5206\u8fa8\u7387 RGB \u5c4f&#xff09;\u3002<\/p>\n<\/p>\n<h3 style=\"background-color:transparent\">\u4e09\u3001\u56fd\u4ea7 MCU \u66ff\u4ee3\u5de5\u7a0b\u5316\u843d\u5730\u6d41\u7a0b<\/h3>\n<p style=\"text-align:center\"><img decoding=\"async\" alt=\"\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2026\/09\/20260911133345-6aa40339af5d0.png\" \/><\/p>\n<p>\u4e3a\u4e86\u964d\u4f4e\u66ff\u4ee3\u98ce\u9669&#xff0c;\u5efa\u8bae\u6309\u7167\u4ee5\u4e0b\u6d41\u7a0b\u6267\u884c\u56fd\u4ea7 MCU \u66ff\u4ee3&#xff1a;<\/p>\n<\/p>\n<li>\u524d\u671f\u8bc4\u4f30\u9636\u6bb5&#xff1a;\u4f18\u5148\u9009\u62e9\u5e02\u573a\u51fa\u8d27\u91cf\u8d85\u8fc7 1 \u4ebf\u9897\u7684\u56fd\u4ea7 MCU \u578b\u53f7&#xff08;\u5f85\u6838\u5b9e&#xff0c;\u5efa\u8bae\u5411\u5382\u5546\u7d22\u53d6\u51fa\u8d27\u91cf\u8bc1\u660e&#xff09;&#xff0c;\u786e\u4fdd\u4f9b\u5e94\u94fe\u7a33\u5b9a<\/li>\n<li>\u529f\u80fd\u9a8c\u8bc1\u9636\u6bb5&#xff1a;\u5148\u9a8c\u8bc1\u6838\u5fc3\u5916\u8bbe\u529f\u80fd&#xff0c;\u518d\u9a8c\u8bc1\u6027\u80fd\u548c\u529f\u8017&#xff0c;\u4e0d\u8981\u76f4\u63a5\u79fb\u690d\u6574\u4e2a\u9879\u76ee<\/li>\n<li>\u517c\u5bb9\u6027\u6d4b\u8bd5\u9636\u6bb5&#xff1a;\u8fdb\u884c &#8211; 40\u2103~85\u2103\u5168\u6e29\u8303\u56f4\u6d4b\u8bd5&#xff0c;\u9a8c\u8bc1\u6781\u9650\u6761\u4ef6\u4e0b\u7684\u7a33\u5b9a\u6027<\/li>\n<li>\u5c0f\u6279\u91cf\u8bd5\u4ea7\u9636\u6bb5&#xff1a;\u5148\u751f\u4ea7 100~1000 \u53f0\u5c0f\u6279\u91cf\u8bbe\u5907&#xff0c;\u8fdb\u884c\u81f3\u5c11 3 \u4e2a\u6708\u7684\u73b0\u573a\u6d4b\u8bd5<\/li>\n<li>\u5927\u89c4\u6a21\u91cf\u4ea7\u9636\u6bb5&#xff1a;\u56fa\u5316\u786c\u4ef6\u8bbe\u8ba1\u548c\u8f6f\u4ef6\u7248\u672c&#xff0c;\u4fdd\u7559\u81f3\u5c11 30% \u7684\u6027\u80fd\u4f59\u91cf&#xff0c;\u5e94\u5bf9\u672a\u6765\u9700\u6c42\u53d8\u5316<\/li>\n<h3>\u56db\u3001\u5b9e\u6218\u603b\u7ed3<\/h3>\n<p>\u56fd\u4ea7 MCU \u66ff\u4ee3 STM32 \u4e0d\u662f\u7b80\u5355\u7684\u5f15\u811a\u66ff\u6362&#xff0c;\u800c\u662f\u4e00\u4e2a\u7cfb\u7edf\u6027\u5de5\u7a0b\u3002\u5f15\u811a\u517c\u5bb9\u53ea\u662f\u7b2c\u4e00\u6b65&#xff0c;\u5de5\u5177\u94fe\u3001\u56fa\u4ef6\u5e93\u3001\u5916\u8bbe\u7279\u6027\u3001\u4f4e\u529f\u8017\u6a21\u5f0f\u3001\u751f\u6001\u9002\u914d\u8fd9\u4e94\u5927\u9690\u85cf\u5751\u70b9\u624d\u662f\u66ff\u4ee3\u8fc7\u7a0b\u4e2d\u7684\u6838\u5fc3\u6311\u6218\u3002<\/p>\n<\/p>\n<p>\u901a\u8fc7\u672c\u6587\u63d0\u4f9b\u7684\u62bd\u8c61\u5c42\u5c01\u88c5\u3001\u53c2\u6570\u964d\u7ea7\u4f7f\u7528\u3001\u7edf\u4e00\u9002\u914d\u6a21\u677f\u7b49\u5de5\u7a0b\u5316\u89e3\u51b3\u65b9\u6848&#xff0c;\u53ef\u4ee5\u5c06\u56fd\u4ea7 MCU \u66ff\u4ee3\u7684\u98ce\u9669\u964d\u4f4e 90% \u4ee5\u4e0a&#xff0c;\u9879\u76ee\u5468\u671f\u7f29\u77ed 50%\u3002\u968f\u7740\u56fd\u4ea7 MCU \u5382\u5546\u7684\u6280\u672f\u4e0d\u65ad\u8fdb\u6b65&#xff0c;\u672a\u6765\u66ff\u4ee3\u8fc7\u7a0b\u4f1a\u8d8a\u6765\u8d8a\u987a\u7545&#xff0c;\u4f46\u5728\u5f53\u524d\u9636\u6bb5&#xff0c;\u638c\u63e1\u8fd9\u4e9b\u907f\u5751\u6280\u5de7\u662f\u6bcf\u4e2a\u5d4c\u5165\u5f0f\u5f00\u53d1\u8005\u7684\u5fc5\u5907\u6280\u80fd\u3002<\/p>\n<\/p>\n<p style=\"text-align:center\"><img decoding=\"async\" alt=\"\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2026\/09\/20260911133347-6aa4033b5cbf2.png\" \/><\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u4e00\u3001\u6280\u672f\u80cc\u666f&#xff1a;\u56fd\u4ea7 MCU \u66ff\u4ee3\u7684\u73b0\u72b6\u4e0e\u8bef\u533a\u968f\u7740\u4f9b\u5e94\u94fe\u5b89\u5168\u9700\u6c42\u63d0\u5347&#xff0c;\u56fd\u4ea7 MCU \u66ff\u4ee3 STM32 \u5df2\u7ecf\u6210\u4e3a\u5d4c\u5165\u5f0f\u884c\u4e1a\u7684\u666e\u904d\u8d8b\u52bf\u3002\u6839\u636e\u884c\u4e1a\u8c03\u7814\u6570\u636e&#xff0c;2026 \u5e74\u4e0a\u534a\u5e74\u56fd\u5185\u5de5\u4e1a\u7ea7 MCU \u56fd\u4ea7\u66ff\u4ee3\u7387\u5df2\u7ecf\u7a81\u7834 42%&#xff08;\u6765\u6e90&#xff1a;\u300a2026 \u5e74\u4e2d\u56fd MCU \u884c\u4e1a\u53d1\u5c55\u767d\u76ae\u4e66\u300b&#xff09;&#xff0c;\u5176\u4e2d\u5f15\u811a\u517c\u5bb9\u578b\u66ff\u4ee3\u65b9\u6848\u5360\u6bd4\u8d85\u8fc7 60%\u3002\u4f46\u5f88\u591a\u5f00\u53d1\u56e2\u961f\u5b58\u5728\u4e00\u4e2a\u6838\u5fc3\u8bef\u533a&#xff1a;\u8ba4\u4e3a\u5f15\u811a Pin to Pi<\/p>\n","protected":false},"author":2,"featured_media":104121,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[11846,11845,11844,11847,11653,2896],"topic":[],"class_list":["post-104125","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-server","tag-mcu","tag-stm32","tag-11847","tag-11653","tag-2896"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v20.3 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>\u56fd\u4ea7 MCU \u66ff\u4ee3 STM32 \u4e94\u5927\u9690\u85cf\u5751\u907f\u5751\u6307\u5357\uff1a\u5f15\u811a\u517c\u5bb9\u53ea\u662f\u8868\u9762\uff0c\u5de5\u5177\u94fe \/ \u56fa\u4ef6\u5e93 \/ \u751f\u6001\u9002\u914d\u5de5\u7a0b\u5316\u89e3\u51b3\u65b9\u6848 - \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\/104125.html\" \/>\n<meta property=\"og:locale\" content=\"zh_CN\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"\u56fd\u4ea7 MCU \u66ff\u4ee3 STM32 \u4e94\u5927\u9690\u85cf\u5751\u907f\u5751\u6307\u5357\uff1a\u5f15\u811a\u517c\u5bb9\u53ea\u662f\u8868\u9762\uff0c\u5de5\u5177\u94fe \/ \u56fa\u4ef6\u5e93 \/ \u751f\u6001\u9002\u914d\u5de5\u7a0b\u5316\u89e3\u51b3\u65b9\u6848 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\" \/>\n<meta property=\"og:description\" content=\"\u4e00\u3001\u6280\u672f\u80cc\u666f&#xff1a;\u56fd\u4ea7 MCU \u66ff\u4ee3\u7684\u73b0\u72b6\u4e0e\u8bef\u533a\u968f\u7740\u4f9b\u5e94\u94fe\u5b89\u5168\u9700\u6c42\u63d0\u5347&#xff0c;\u56fd\u4ea7 MCU \u66ff\u4ee3 STM32 \u5df2\u7ecf\u6210\u4e3a\u5d4c\u5165\u5f0f\u884c\u4e1a\u7684\u666e\u904d\u8d8b\u52bf\u3002\u6839\u636e\u884c\u4e1a\u8c03\u7814\u6570\u636e&#xff0c;2026 \u5e74\u4e0a\u534a\u5e74\u56fd\u5185\u5de5\u4e1a\u7ea7 MCU \u56fd\u4ea7\u66ff\u4ee3\u7387\u5df2\u7ecf\u7a81\u7834 42%&#xff08;\u6765\u6e90&#xff1a;\u300a2026 \u5e74\u4e2d\u56fd MCU \u884c\u4e1a\u53d1\u5c55\u767d\u76ae\u4e66\u300b&#xff09;&#xff0c;\u5176\u4e2d\u5f15\u811a\u517c\u5bb9\u578b\u66ff\u4ee3\u65b9\u6848\u5360\u6bd4\u8d85\u8fc7 60%\u3002\u4f46\u5f88\u591a\u5f00\u53d1\u56e2\u961f\u5b58\u5728\u4e00\u4e2a\u6838\u5fc3\u8bef\u533a&#xff1a;\u8ba4\u4e3a\u5f15\u811a Pin to Pi\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.wsisp.com\/helps\/104125.html\" \/>\n<meta property=\"og:site_name\" content=\"\u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\" \/>\n<meta property=\"article:published_time\" content=\"2026-09-11T13:33:49+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2026\/09\/20260911133342-6aa4033622324.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=\"6 \u5206\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/104125.html\",\"url\":\"https:\/\/www.wsisp.com\/helps\/104125.html\",\"name\":\"\u56fd\u4ea7 MCU \u66ff\u4ee3 STM32 \u4e94\u5927\u9690\u85cf\u5751\u907f\u5751\u6307\u5357\uff1a\u5f15\u811a\u517c\u5bb9\u53ea\u662f\u8868\u9762\uff0c\u5de5\u5177\u94fe \/ \u56fa\u4ef6\u5e93 \/ \u751f\u6001\u9002\u914d\u5de5\u7a0b\u5316\u89e3\u51b3\u65b9\u6848 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\",\"isPartOf\":{\"@id\":\"https:\/\/www.wsisp.com\/helps\/#website\"},\"datePublished\":\"2026-09-11T13:33:49+00:00\",\"dateModified\":\"2026-09-11T13:33:49+00:00\",\"author\":{\"@id\":\"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/358e386c577a3ab51c4493330a20ad41\"},\"breadcrumb\":{\"@id\":\"https:\/\/www.wsisp.com\/helps\/104125.html#breadcrumb\"},\"inLanguage\":\"zh-Hans\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.wsisp.com\/helps\/104125.html\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/104125.html#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"\u9996\u9875\",\"item\":\"https:\/\/www.wsisp.com\/helps\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"\u56fd\u4ea7 MCU \u66ff\u4ee3 STM32 \u4e94\u5927\u9690\u85cf\u5751\u907f\u5751\u6307\u5357\uff1a\u5f15\u811a\u517c\u5bb9\u53ea\u662f\u8868\u9762\uff0c\u5de5\u5177\u94fe \/ \u56fa\u4ef6\u5e93 \/ \u751f\u6001\u9002\u914d\u5de5\u7a0b\u5316\u89e3\u51b3\u65b9\u6848\"}]},{\"@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":"\u56fd\u4ea7 MCU \u66ff\u4ee3 STM32 \u4e94\u5927\u9690\u85cf\u5751\u907f\u5751\u6307\u5357\uff1a\u5f15\u811a\u517c\u5bb9\u53ea\u662f\u8868\u9762\uff0c\u5de5\u5177\u94fe \/ \u56fa\u4ef6\u5e93 \/ \u751f\u6001\u9002\u914d\u5de5\u7a0b\u5316\u89e3\u51b3\u65b9\u6848 - \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\/104125.html","og_locale":"zh_CN","og_type":"article","og_title":"\u56fd\u4ea7 MCU \u66ff\u4ee3 STM32 \u4e94\u5927\u9690\u85cf\u5751\u907f\u5751\u6307\u5357\uff1a\u5f15\u811a\u517c\u5bb9\u53ea\u662f\u8868\u9762\uff0c\u5de5\u5177\u94fe \/ \u56fa\u4ef6\u5e93 \/ \u751f\u6001\u9002\u914d\u5de5\u7a0b\u5316\u89e3\u51b3\u65b9\u6848 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","og_description":"\u4e00\u3001\u6280\u672f\u80cc\u666f&#xff1a;\u56fd\u4ea7 MCU \u66ff\u4ee3\u7684\u73b0\u72b6\u4e0e\u8bef\u533a\u968f\u7740\u4f9b\u5e94\u94fe\u5b89\u5168\u9700\u6c42\u63d0\u5347&#xff0c;\u56fd\u4ea7 MCU \u66ff\u4ee3 STM32 \u5df2\u7ecf\u6210\u4e3a\u5d4c\u5165\u5f0f\u884c\u4e1a\u7684\u666e\u904d\u8d8b\u52bf\u3002\u6839\u636e\u884c\u4e1a\u8c03\u7814\u6570\u636e&#xff0c;2026 \u5e74\u4e0a\u534a\u5e74\u56fd\u5185\u5de5\u4e1a\u7ea7 MCU \u56fd\u4ea7\u66ff\u4ee3\u7387\u5df2\u7ecf\u7a81\u7834 42%&#xff08;\u6765\u6e90&#xff1a;\u300a2026 \u5e74\u4e2d\u56fd MCU \u884c\u4e1a\u53d1\u5c55\u767d\u76ae\u4e66\u300b&#xff09;&#xff0c;\u5176\u4e2d\u5f15\u811a\u517c\u5bb9\u578b\u66ff\u4ee3\u65b9\u6848\u5360\u6bd4\u8d85\u8fc7 60%\u3002\u4f46\u5f88\u591a\u5f00\u53d1\u56e2\u961f\u5b58\u5728\u4e00\u4e2a\u6838\u5fc3\u8bef\u533a&#xff1a;\u8ba4\u4e3a\u5f15\u811a Pin to Pi","og_url":"https:\/\/www.wsisp.com\/helps\/104125.html","og_site_name":"\u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","article_published_time":"2026-09-11T13:33:49+00:00","og_image":[{"url":"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2026\/09\/20260911133342-6aa4033622324.png"}],"author":"admin","twitter_card":"summary_large_image","twitter_misc":{"\u4f5c\u8005":"admin","\u9884\u8ba1\u9605\u8bfb\u65f6\u95f4":"6 \u5206"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/www.wsisp.com\/helps\/104125.html","url":"https:\/\/www.wsisp.com\/helps\/104125.html","name":"\u56fd\u4ea7 MCU \u66ff\u4ee3 STM32 \u4e94\u5927\u9690\u85cf\u5751\u907f\u5751\u6307\u5357\uff1a\u5f15\u811a\u517c\u5bb9\u53ea\u662f\u8868\u9762\uff0c\u5de5\u5177\u94fe \/ \u56fa\u4ef6\u5e93 \/ \u751f\u6001\u9002\u914d\u5de5\u7a0b\u5316\u89e3\u51b3\u65b9\u6848 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","isPartOf":{"@id":"https:\/\/www.wsisp.com\/helps\/#website"},"datePublished":"2026-09-11T13:33:49+00:00","dateModified":"2026-09-11T13:33:49+00:00","author":{"@id":"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/358e386c577a3ab51c4493330a20ad41"},"breadcrumb":{"@id":"https:\/\/www.wsisp.com\/helps\/104125.html#breadcrumb"},"inLanguage":"zh-Hans","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.wsisp.com\/helps\/104125.html"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/www.wsisp.com\/helps\/104125.html#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"\u9996\u9875","item":"https:\/\/www.wsisp.com\/helps"},{"@type":"ListItem","position":2,"name":"\u56fd\u4ea7 MCU \u66ff\u4ee3 STM32 \u4e94\u5927\u9690\u85cf\u5751\u907f\u5751\u6307\u5357\uff1a\u5f15\u811a\u517c\u5bb9\u53ea\u662f\u8868\u9762\uff0c\u5de5\u5177\u94fe \/ \u56fa\u4ef6\u5e93 \/ \u751f\u6001\u9002\u914d\u5de5\u7a0b\u5316\u89e3\u51b3\u65b9\u6848"}]},{"@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\/104125","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=104125"}],"version-history":[{"count":0,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/posts\/104125\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/media\/104121"}],"wp:attachment":[{"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/media?parent=104125"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/categories?post=104125"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/tags?post=104125"},{"taxonomy":"topic","embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/topic?post=104125"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}