{"id":38381,"date":"2025-05-20T09:18:31","date_gmt":"2025-05-20T01:18:31","guid":{"rendered":"https:\/\/www.wsisp.com\/helps\/38381.html"},"modified":"2025-05-20T09:18:31","modified_gmt":"2025-05-20T01:18:31","slug":"stm32-usart%e4%b8%b2%e5%8f%a3%e9%80%9a%e4%bf%a1%ef%bc%889%ef%bc%89","status":"publish","type":"post","link":"https:\/\/www.wsisp.com\/helps\/38381.html","title":{"rendered":"STM32-USART\u4e32\u53e3\u901a\u4fe1\uff089\uff09"},"content":{"rendered":"<p id=\"main-toc\">\u76ee\u5f55<\/p>\n<p id=\"-toc\" style=\"margin-left:0px\">\n<p id=\"%E4%B8%80%E3%80%81%E9%80%9A%E4%BF%A1%E6%8E%A5%E5%8F%A3%E4%BB%8B%E7%BB%8D-toc\" style=\"margin-left:0px\">\u4e00\u3001\u901a\u4fe1\u63a5\u53e3\u4ecb\u7ecd<\/p>\n<p id=\"%E4%BA%8C%E3%80%81%E4%B8%B2%E5%8F%A3%E9%80%9A%E4%BF%A1%E4%BB%8B%E7%BB%8D-toc\" style=\"margin-left:0px\">\u4e8c\u3001\u4e32\u53e3\u901a\u4fe1\u4ecb\u7ecd<\/p>\n<p id=\"1%E3%80%81%E5%AE%9A%E4%B9%89%E5%92%8C%E5%8A%9F%E8%83%BD-toc\" style=\"margin-left:40px\">1\u3001\u5b9a\u4e49\u548c\u529f\u80fd<\/p>\n<p id=\"2%E3%80%81%E7%A1%AC%E4%BB%B6%E7%94%B5%E8%B7%AF-toc\" style=\"margin-left:40px\">2\u3001\u786c\u4ef6\u7535\u8def<\/p>\n<p id=\"3%E3%80%81%E7%94%B5%E5%B9%B3%E6%A0%87%E5%87%86-toc\" style=\"margin-left:40px\">3\u3001\u7535\u5e73\u6807\u51c6<\/p>\n<p id=\"4%E3%80%81%E4%B8%B2%E5%8F%A3%E5%8F%82%E6%95%B0%E5%8F%8A%E6%97%B6%E5%BA%8F%E5%9B%BE-toc\" style=\"margin-left:40px\">4\u3001\u4e32\u53e3\u53c2\u6570\u53ca\u65f6\u5e8f\u56fe<\/p>\n<p id=\"%E4%B8%89%E3%80%81USART%E4%B8%B2%E5%8F%A3%E5%A4%96%E8%AE%BE-toc\" style=\"margin-left:0px\">\u4e09\u3001USART\u4e32\u53e3\u5916\u8bbe<\/p>\n<p id=\"%E5%9B%9B%E3%80%81USART%E6%A1%86%E5%9B%BE-toc\" style=\"margin-left:0px\">\u56db\u3001USART\u6846\u56fe<\/p>\n<p id=\"%E4%BA%94%E3%80%81USART%E5%9F%BA%E6%9C%AC%E7%BB%93%E6%9E%84-toc\" style=\"margin-left:0px\">\u4e94\u3001USART\u57fa\u672c\u7ed3\u6784<\/p>\n<p id=\"%E5%85%AD%E3%80%81%E4%B8%B2%E5%8F%A3%E6%95%B0%E6%8D%AE%E5%8C%85%E7%9A%84%E6%94%B6%E5%8F%91-toc\" style=\"margin-left:0px\">\u516d\u3001\u4e32\u53e3\u6570\u636e\u5305\u7684\u6536\u53d1<\/p>\n<hr id=\"hr-toc\" \/>\n<h2 id=\"%E4%B8%80%E3%80%81%E9%80%9A%E4%BF%A1%E6%8E%A5%E5%8F%A3%E4%BB%8B%E7%BB%8D\">\u4e00\u3001\u901a\u4fe1\u534f\u8bae\u4ecb\u7ecd<\/h2>\n<p>\u901a\u4fe1\u7684\u76ee\u7684&#xff1a;\u5c06\u4e00\u4e2a\u8bbe\u5907\u7684\u6570\u636e\u4f20\u9001\u5230\u53e6\u4e00\u4e2a\u8bbe\u5907&#xff0c;\u6269\u5c55\u786c\u4ef6\u7cfb\u7edf\u3002<\/p>\n<p>\u5f53STM32\u60f3\u8981\u5b9e\u73b0\u4e00\u4e9b\u529f\u80fd&#xff0c;\u4f46\u662f\u9700\u8981\u5916\u6302\u4e00\u4e9b\u5176\u4ed6\u6a21\u5757\u624d\u80fd\u5b9e\u73b0&#xff0c;\u8fd9\u5c31\u9700\u8981\u5728\u4e24\u4e2a\u8bbe\u5907\u4e4b\u95f4\u8fde\u63a5\u4e0a\u4e00\u6839\u6216\u591a\u8ddf\u901a\u4fe1\u7ebf&#xff0c;\u901a\u8fc7\u901a\u4fe1\u7ebf\u8def\u53d1\u9001\u6216\u8005\u63a5\u6536\u6570\u636e&#xff0c;\u5b8c\u6210\u6570\u636e\u4ea4\u6362&#xff0c;\u4ece\u800c\u5b9e\u73b0\u63a7\u5236\u5916\u6302\u6a21\u5757\u548c\u8bfb\u53d6\u5916\u6302\u6a21\u5757\u6570\u636e\u7684\u76ee\u7684\u3002<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" alt=\"\" height=\"340\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2025\/05\/20250520011827-682bd863c0490.png\" width=\"1192\" \/><\/p>\n<p>\u901a\u4fe1\u534f\u8bae&#xff1a;\u5236\u5b9a\u901a\u4fe1\u7684\u89c4\u5219&#xff0c;\u901a\u4fe1\u53cc\u65b9\u6309\u7167\u534f\u8bae\u89c4\u5219\u8fdb\u884c\u6570\u636e\u6536\u53d1\u3002<\/p>\n<p>\u5355\u5de5&#xff1a;\u53ea\u5141\u8bb8\u6570\u636e\u5355\u5411\u4f20\u8f93&#xff1b; \u53cc\u5de5&#xff1a;\u6307\u901a\u4fe1\u53cc\u65b9\u80fd\u591f\u8fdb\u884c\u53cc\u5411\u901a\u4fe1&#xff1b; \u534a\u53cc\u5de5&#xff1a;\u53d1\u9001\u6570\u636e\u548c\u63a5\u6536\u6570\u636e\u4e0d\u80fd\u540c\u65f6\u4f20\u8f93&#xff1b; \u5168\u53cc\u5de5&#xff1a;\u53ef\u4ee5\u540c\u65f6\u8fdb\u884c\u53d1\u9001\u6570\u636e\u548c\u63a5\u53d7\u6570\u636e&#xff0c;\u4e00\u822c\u6709\u4e24\u6839\u901a\u4fe1\u7ebf&#xff0c;\u4e00\u6839\u53d1\u9001\u6570\u636e&#xff0c;\u4e00\u6839\u63a5\u6536\u6570\u636e&#xff0c;\u53d1\u9001\u7ebf\u8def\u548c\u63a5\u6536\u7ebf\u8def\u4e92\u4e0d\u5f71\u54cd\u3002<\/p>\n<p>\u65f6\u949f\u7279\u6027\u5206\u4e3a\u540c\u6b65\u548c\u5f02\u6b65\u3002 \u540c\u6b65&#xff1a;\u4e00\u822c\u6709\u65f6\u949f\u7ebf\u8fde\u63a5&#xff0c;\u63a5\u6536\u8bbe\u5907\u53ef\u4ee5\u5728\u65f6\u949f\u4fe1\u53f7\u7684\u6307\u5f15\u4e0b\u8fdb\u884c\u91c7\u6837&#xff1b; \u5f02\u6b65&#xff1a;\u6ca1\u6709\u65f6\u949f\u7ebf&#xff0c;\u9700\u8981\u901a\u4fe1\u53cc\u65b9\u7ea6\u5b9a\u4e00\u4e2a\u91c7\u6837\u9891\u7387&#xff0c;\u5e76\u4e14\u8fd8\u9700\u8981\u52a0\u4e00\u4e9b\u5e27\u5934\u5e27\u5c3e\u7b49&#xff0c;\u8fdb\u884c\u91c7\u6837\u4f4d\u7f6e\u7684\u5bf9\u9f50\u3002<\/p>\n<p>\u7535\u5e73\u4fe1\u53f7 \u5355\u7aef&#xff1a;\u5f15\u811a\u7684\u9ad8\u4f4e\u7535\u5e73\u90fd\u662f\u5bf9GND\u7684\u7535\u538b\u5dee&#xff0c;\u5355\u7aef\u4fe1\u53f7\u901a\u4fe1\u7684\u53cc\u65b9\u5fc5\u987b\u8981\u5171\u5730&#xff0c;\u5c31\u662f\u628aGND\u8fde\u63a5\u5728\u4e00\u8d77&#xff1b; \u5dee\u5206&#xff1a;\u9760\u4e24\u4e2a\u5dee\u5206\u5f15\u811a\u7684\u7535\u538b\u5dee\u6765\u4f20\u8f93\u4fe1\u53f7&#xff0c;\u5dee\u5206\u4fe1\u53f7\u53ef\u4ee5\u6781\u5927\u5730\u63d0\u9ad8\u6297\u5e72\u6270\u7279\u6027\u3002 USB\u534f\u8bae\u4e2d\u6709\u4e00\u4e9b\u5730\u65b9\u4e5f\u9700\u8981\u7528\u5230\u5355\u7aef\u4fe1\u53f7&#xff0c;\u56e0\u6b64USB\u534f\u8bae\u4e5f\u9700\u8981\u5171\u5730\u3002<\/p>\n<p>\u8bbe\u5907\u7279\u6027 \u70b9\u5bf9\u70b9&#xff1a;\u540c\u4e00\u65f6\u95f4\u53ea\u80fd\u5728\u4e24\u4e2a\u8bbe\u5907\u4e4b\u95f4\u8fdb\u884c\u901a\u4fe1&#xff1b; \u591a\u8bbe\u5907&#xff1a;\u53ef\u4ee5\u5728\u603b\u7ebf\u4e0a\u6302\u8f7d\u591a\u4e2a\u8bbe\u5907\u3002<\/p>\n<h2 id=\"%E4%BA%8C%E3%80%81%E4%B8%B2%E5%8F%A3%E9%80%9A%E4%BF%A1%E4%BB%8B%E7%BB%8D\">\u4e8c\u3001\u4e32\u53e3\u901a\u4fe1\u4ecb\u7ecd<\/h2>\n<h3 id=\"1%E3%80%81%E5%AE%9A%E4%B9%89%E5%92%8C%E5%8A%9F%E8%83%BD\">1\u3001\u5b9a\u4e49\u548c\u529f\u80fd<\/h3>\n<p>\u5b9a\u4e49&#xff1a;\u4e32\u53e3\u662f\u4e00\u79cd\u5e94\u7528\u5341\u5206\u5e7f\u6cdb\u7684\u901a\u8baf\u63a5\u53e3&#xff0c;\u4e32\u53e3\u6210\u672c\u4f4e&#xff0c;\u5bb9\u6613\u4f7f\u7528\u3001\u901a\u4fe1\u7ebf\u8def\u7b80\u5355&#xff0c;\u53ef\u5b9e\u73b0\u4e24\u4e2a\u8bbe\u5907\u7684\u76f8\u4e92\u901a\u4fe1\u3002<\/p>\n<p>\u529f\u80fd&#xff1a;\u5355\u7247\u673a\u7684\u4e32\u53e3\u53ef\u4ee5\u4f7f\u5355\u7247\u673a\u4e0e\u5355\u7247\u673a\u3001\u5355\u7247\u673a\u4e0e\u7535\u8111\u3001\u5355\u7247\u673a\u4e0e\u5404\u5f0f\u5404\u6837\u7684\u6a21\u5757\u76f8\u4e92\u901a\u4fe1&#xff0c;\u6781\u5927\u7684\u6269\u5c55\u4e86\u5355\u7247\u673a\u7684\u5e94\u7528\u8303\u56f4&#xff0c;\u589e\u5f3a\u4e86\u5355\u7247\u673a\u7cfb\u7edf\u7684\u786c\u4ef6\u5b9e\u529b\u3002<\/p>\n<p>51\u5355\u7247\u673a\u5185\u90e8\u81ea\u5e26UART&#xff08;\u901a\u7528\u5f02\u6b65\u6536\u53d1\u5668&#xff09;&#xff0c;\u53ef\u5b9e\u73b0\u5355\u7247\u673a\u7684\u4e32\u53e3\u901a\u4fe1\u3002<\/p>\n<h3 id=\"2%E3%80%81%E7%A1%AC%E4%BB%B6%E7%94%B5%E8%B7%AF\">2\u3001\u786c\u4ef6\u7535\u8def<\/h3>\n<p>\u7b80\u5355\u53cc\u5411\u4e32\u53e3\u901a\u4fe1\u6709\u4e24\u6839\u901a\u4fe1\u7ebf&#xff08;\u53d1\u9001\u7aefTXD\u548c\u63a5\u6536\u7aefRXD&#xff09;&#xff1b;<\/p>\n<p>TXD\u4e0eRXD\u8981\u4ea4\u53c9\u8fde\u63a5&#xff1b;<\/p>\n<p>\u5f53\u53ea\u9700\u5355\u5411\u7684\u6570\u636e\u4f20\u8f93\u65f6&#xff0c;\u53ef\u4ee5\u76f4\u63a5\u4e00\u6839\u901a\u4fe1\u7ebf&#xff1b;<\/p>\n<p>\u5f53\u7535\u5e73\u6807\u51c6\u4e0d\u4e00\u81f4\u65f6&#xff0c;\u9700\u8981\u52a0\u7535\u5e73\u8f6c\u6362\u82af\u7247\u3002<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" alt=\"\" height=\"411\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2025\/05\/20250520011827-682bd863eb8a3.png\" width=\"915\" \/><\/p>\n<h3 id=\"3%E3%80%81%E7%94%B5%E5%B9%B3%E6%A0%87%E5%87%86\">3\u3001\u7535\u5e73\u6807\u51c6<\/h3>\n<p>\u7535\u5e73\u6807\u51c6\u662f\u6570\u636e1\u548c\u6570\u636e0\u7684\u8868\u8fbe\u65b9\u5f0f&#xff0c;\u662f\u4f20\u8f93\u7ebf\u7f06\u4e2d\u4eba\u4e3a\u89c4\u5b9a\u7684\u7535\u538b\u4e0e\u6570\u636e\u7684\u5bf9\u5e94\u5173\u7cfb&#xff0c;\u4e32\u53e3\u5e38\u7528\u7684\u7535\u5e73\u6807\u51c6\u6709\u4e0b\u9762\u4e09\u79cd&#xff1a;<\/p>\n<p>&#xff08;1&#xff09;TTL\u7535\u5e73&#xff1a;&#043;5V\u8868\u793a1&#xff0c;0V\u8868\u793a0&#xff1b;<\/p>\n<p>&#xff08;2&#xff09;RS232\u7535\u5e73&#xff1a;-3V ~ -15V\u8868\u793a1&#xff0c;&#043;3V ~ &#043;15V\u8868\u793a0&#xff1b;<\/p>\n<p>&#xff08;3&#xff09;RS485\u7535\u5e73&#xff1a;\u4e24\u7ebf\u7535\u538b\u5dee&#043;2V ~ &#043;6V\u8868\u793a1&#xff0c;-2V ~ -6V\u8868\u793a0&#xff08;\u5dee\u5206\u4fe1\u53f7&#xff09;\u3002 \u00a0<\/p>\n<h3 id=\"4%E3%80%81%E4%B8%B2%E5%8F%A3%E5%8F%82%E6%95%B0%E5%8F%8A%E6%97%B6%E5%BA%8F%E5%9B%BE\"> 4\u3001\u4e32\u53e3\u53c2\u6570\u53ca\u65f6\u5e8f\u56fe<\/h3>\n<p>\u6ce2\u7279\u7387&#xff1a;\u4e32\u53e3\u901a\u4fe1\u7684\u901f\u7387&#xff08;\u53d1\u9001\u548c\u63a5\u6536\u5404\u6570\u636e\u4f4d\u7684\u95f4\u9694\u65f6\u95f4&#xff09;,\u5355\u4f4d&#xff1b;\u7801\u5143\/s\u6216\u6ce2\u7279&#xff08;Baud&#xff09;&#xff0c; \u6bd4\u7279\u7387&#xff1a;\u6bcf\u79d2\u4f20\u8f93\u7684\u6bd4\u7279\u6570&#xff0c;\u5355\u4f4dbit\/s\u6216bps&#xff0c;\u5728\u4e8c\u8fdb\u5236\u8c03\u5236\u7684\u60c5\u51b5\u4e0b&#xff0c;\u4e00\u4e2a\u7801\u5143\u5c31\u662f\u4e00\u4e2abit&#xff0c;\u6b64\u65f6\u6ce2\u7279\u7387\u5c31\u7b49\u4e8e\u6bd4\u7279\u7387&#xff0c;\u5355\u7247\u673a\u7684\u4e32\u53e3\u901a\u4fe1&#xff0c;\u57fa\u672c\u90fd\u662f\u4e8c\u8fdb\u5236\u8c03\u5236\u3002 \u4e8c\u8fdb\u5236\u8c03\u5236&#xff1a;\u9ad8\u7535\u5e73\u8868\u793a1&#xff0c;\u4f4e\u7535\u5e73\u8868\u793a0&#xff0c;\u4e00\u4f4d\u5c31\u662f1bit\u3002 \u00a0\u00a0 \u00a0\u4f8b\u5982\u6ce2\u7279\u7387\u4e3a1000bps&#xff0c;\u53731s\u53d1\u90011000\u4f4d\u6570\u636e&#xff0c;\u6bcf\u4e00\u4f4d\u7684\u53d1\u9001\u65f6\u95f4\u5c31\u662f1ms&#xff0c;\u63a5\u6536\u65b9\u4e5f\u662f\u6bcf\u96941ms\u63a5\u6536\u4e00\u4f4d\u3002<\/p>\n<p>\u7a7a\u95f2\u65f6&#xff1a;\u5f15\u811a\u9ed8\u8ba4\u4e3a\u9ad8\u7535\u5e73&#xff1b; \u8d77\u59cb\u4f4d&#xff1a;\u6807\u5fd7\u4e00\u4e2a\u6570\u636e\u5e27\u7684\u5f00\u59cb&#xff0c;\u56fa\u5b9a\u4e3a\u4f4e\u7535\u5e73&#xff1b; \u6570\u636e\u4f4d&#xff1a;\u6570\u636e\u5e27\u7684\u6709\u6548\u8f7d\u8377&#xff0c;1\u4e3a\u9ad8\u7535\u5e73&#xff0c;0\u4e3a\u4f4e\u7535\u5e73&#xff0c;\u4ece\u4f4e\u4f4d\u5230\u9ad8\u4f4d\u53d1\u9001\u6570\u636e&#xff1b; \u68c0\u9a8c\u4f4d&#xff1a;\u7528\u4e8e\u6570\u636e\u9a8c\u8bc1&#xff0c;\u6839\u636e\u6570\u636e\u4f4d\u8ba1\u7b97\u5f97\u6765&#xff1b; \u505c\u6b62\u4f4d&#xff1a;\u7528\u4e8e\u6570\u636e\u5e27\u95f4\u9694&#xff0c;\u56fa\u5b9a\u4e3a\u9ad8\u7535\u5e73\u3002<\/p>\n<p>\u6821\u9a8c\u6709\u4e09\u79cd\u65b9\u5f0f&#xff0c;\u5206\u522b\u662f\u65e0\u6821\u9a8c\u3001\u5947\u6821\u9a8c\u548c\u5076\u6821\u9a8c\u3002 \u5982\u679c\u4f7f\u7528\u5947\u6821\u9a8c&#xff0c;\u5219\u6570\u636e\u4f4d8\u4f4d&#xff0b;\u6821\u9a8c\u4f4d\u4f1a\u51fa\u73b0\u5947\u6570\u4e2a1&#xff0c;\u5982\u4f20\u8f93\u6570\u636e\u662f0000 1111&#xff0c;\u5219\u6821\u9a8c\u4f4d\u4f1a\u88651\u3002 \u5982\u679c\u4f7f\u7528\u5076\u6821\u9a8c&#xff0c;\u5219\u6570\u636e\u4f4d8\u4f4d&#xff0b;\u6821\u9a8c\u4f4d\u4f1a\u51fa\u73b0\u5076\u6570\u4e2a1&#xff0c;\u5982\u4f20\u8f93\u6570\u636e\u662f0000 1111&#xff0c;\u5219\u6821\u9a8c\u4f4d\u4f1a\u88650\u3002<img loading=\"lazy\" decoding=\"async\" alt=\"\" height=\"249\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2025\/05\/20250520011828-682bd86415e8d.png\" width=\"1314\" \/><\/p>\n<p><img loading=\"lazy\" decoding=\"async\" alt=\"\" height=\"357\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2025\/05\/20250520011828-682bd86436bb9.png\" width=\"1220\" \/><\/p>\n<p><img loading=\"lazy\" decoding=\"async\" alt=\"\" height=\"361\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2025\/05\/20250520011828-682bd86479974.png\" width=\"1217\" \/><\/p>\n<h2 id=\"%E4%B8%89%E3%80%81USART%E4%B8%B2%E5%8F%A3%E5%A4%96%E8%AE%BE\"> \u4e09\u3001USART\u4e32\u53e3\u5916\u8bbe<\/h2>\n<p>\u200b\u901a\u7528\u540c\u6b65\/\u5f02\u6b65\u6536\u53d1\u5668&#xff0c;\u7b80\u79f0USART&#xff08;Universal Synchronous\/Asynchronous Receiver\/Transmitter&#xff09;&#xff0c;\u572851\u5355\u7247\u673a\u4e2d\u8fd8\u4f1a\u53ebUART&#xff0c;\u4e5f\u5c31\u662f\u901a\u7528\u5f02\u6b65\u6536\u53d1\u5668\u3002STM32\u4e2d\u8fd9\u4e2a\u540c\u6b65\u529f\u80fd\u7528\u7684\u5f88\u5c11&#xff0c;\u6240\u4ee5\u4e24\u8005\u533a\u522b\u4e0d\u5927\u3002<\/p>\n<p>USART\u662fSTM32\u5185\u90e8\u96c6\u6210\u7684\u786c\u4ef6\u5916\u8bbe&#xff0c;\u53ef\u6839\u636e\u6570\u636e\u5bc4\u5b58\u5668\u7684\u4e00\u4e2a\u5b57\u8282\u6570\u636e\u81ea\u52a8\u751f\u6210\u6570\u636e\u5e27\u65f6\u5e8f&#xff0c;\u4eceTX\u5f15\u811a\u53d1\u9001\u51fa\u53bb&#xff0c;\u4e5f\u53ef\u81ea\u52a8\u63a5\u6536RX\u5f15\u811a\u7684\u6570\u636e\u5e27\u65f6\u5e8f&#xff0c;\u62fc\u63a5\u4e3a\u4e00\u4e2a\u5b57\u8282\u6570\u636e&#xff0c;\u5b58\u653e\u5728\u6570\u636e\u5bc4\u5b58\u5668\u91cc\u3002<\/p>\n<p>USART\u81ea\u5e26\u6ce2\u7279\u7387\u53d1\u751f\u5668&#xff0c;\u6700\u9ad8\u8fbe4.5Mbits\/s&#xff0c;\u5b83\u672c\u8d28\u4e0a\u5c31\u662f\u4e00\u4e2a\u5206\u9891\u5668&#xff0c;\u901a\u8fc7APB2\u603b\u7ebf\u7ed9\u768472MHz\u7684\u9891\u7387&#xff0c;\u5bf9\u5176\u8fdb\u884c\u5206\u9891&#xff0c;\u5f97\u5230\u60f3\u8981\u7684\u6ce2\u7279\u7387\u65f6\u949f&#xff0c;\u6700\u540e\u5728\u8fd9\u4e2a\u65f6\u949f\u4e0b&#xff0c;\u8fdb\u884c\u6536\u53d1\u6570\u636e\u3002 \u6ce2\u7279\u7387\u4e00\u822c\u91c7\u75289600bits\/s\u3001115200bits\/s\u3002<\/p>\n<p>STM32\u4e2d\u7684\u4e32\u53e3\u901a\u4fe1\u53ef\u914d\u7f6e\u6570\u636e\u4f4d\u957f\u5ea6&#xff08;8\/9&#xff09;&#xff0c;\u6570\u636e\u4f4d\u4e0d\u9700\u8981\u6821\u9a8c\u4f4d\u5c31\u662f8\u4f4d&#xff0c;\u52a0\u4e0a\u6821\u9a8c\u4f4d\u5c31\u662f9\u4f4d\u3002\u53ef\u9009\u6821\u9a8c\u4f4d&#xff08;\u65e0\u6821\u9a8c\/\u5947\u6821\u9a8c\/\u5076\u6821\u9a8c&#xff09;\u3002 \u505c\u6b62\u4f4d\u957f\u5ea6&#xff08;0.5\/1\/1.5\/2&#xff09;&#xff0c;\u51b3\u5b9a\u4e86\u6570\u636e\u5e27\u7684\u95f4\u9694&#xff0c;\u4e00\u822c\u90fd\u662f\u91c7\u75281\u4f4d\u3002<\/p>\n<p>\u652f\u6301\u540c\u6b65\u6a21\u5f0f\u3001\u786c\u4ef6\u6d41\u63a7\u5236\u3001DMA\u3001\u667a\u80fd\u5361\u3001IrDA\u3001LIN\u3002 \u540c\u6b65\u6a21\u5f0f&#xff1a;\u76f8\u6bd4\u6b63\u5e38\u7684\u4e32\u53e3\u901a\u4fe1&#xff0c;\u591a\u4e86\u4e00\u4e2a\u65f6\u949fCLK\u7684\u8f93\u51fa&#xff1b; \u786c\u4ef6\u6d41\u63a7\u5236&#xff1a;\u5982A\u8bbe\u5907TX\u5411B\u8bbe\u5907\u7684RX\u53d1\u9001\u6570\u636e&#xff0c;A\u8bbe\u5907\u53d1\u9001\u7684\u6570\u636e\u592a\u5feb&#xff0c;B\u5904\u7406\u8fc7\u4e0d\u6765&#xff0c;B\u5c31\u53ea\u80fd\u9009\u62e9\u629b\u5f03\u65b0\u6570\u636e\u6216\u8005\u8986\u76d6\u539f\u6570\u636e&#xff1b;\u5982\u679c\u6709\u786c\u4ef6\u6d41\u63a7\u5236&#xff0c;\u4e24\u8005\u4e4b\u95f4\u7684\u786c\u4ef6\u7535\u8def\u4e0a\u8fd8\u4f1a\u591a\u51fa\u4e00\u6839\u7ebf&#xff0c;\u5982\u679cB\u6ca1\u6709\u51c6\u5907\u597d&#xff0c;\u5c31\u7f6e\u9ad8\u7535\u5e73&#xff0c;\u5982\u679c\u51c6\u5907\u597d\u4e86&#xff0c;\u5c31\u7f6e\u4f4e\u7535\u5e73&#xff0c;A\u63a5\u6536\u5230\u4e86B\u53cd\u9988\u7684\u51c6\u5907\u4fe1\u53f7&#xff0c;\u5c31\u53ea\u6709\u5728B\u51c6\u5907\u597d\u4e86\u4ee5\u540e&#xff0c;\u624d\u4f1a\u53d1\u9001\u6570\u636e\u3002\u786c\u4ef6\u6d41\u63a7\u5236\u5c31\u662f\u4e3a\u4e86\u9632\u6b62B\u5904\u7406\u6570\u636e\u592a\u6162\u5bfc\u81f4\u6570\u636e\u4e22\u5931\u7684\u95ee\u9898\u3002 DMA&#xff1a;\u4e32\u53e3\u901a\u4fe1\u652f\u6301DMA\u6570\u636e\u8f6c\u8fd0&#xff1b; \u667a\u80fd\u5361&#xff1a;\u8ddf\u5b66\u6821\u996d\u5361\u6216\u8005\u516c\u4ea4\u5361\u6709\u5173&#xff1b; IrDA&#xff1a;\u7528\u4e8e\u7ea2\u5916\u901a\u4fe1\u7684&#xff0c;\u4e00\u4e2a\u4e3a\u7ea2\u5916\u53d1\u5149\u7ba1&#xff0c;\u4e00\u4e2a\u4e3a\u7ea2\u5916\u63a5\u6536\u7ba1&#xff0c;\u9760\u95ea\u70c1\u7ea2\u5916\u5149\u901a\u4fe1&#xff1b; LIN&#xff1a;\u5c40\u57df\u7f51\u7684\u901a\u4fe1\u534f\u8bae\u3002<\/p>\n<p>STM32F103C8T6 USART\u8d44\u6e90&#xff1a; USART1\u3001 USART2\u3001 USART3\u3002<\/p>\n<h2 id=\"%E5%9B%9B%E3%80%81USART%E6%A1%86%E5%9B%BE\">\u56db\u3001USART\u6846\u56fe<\/h2>\n<p><img loading=\"lazy\" decoding=\"async\" alt=\"\" height=\"871\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2025\/05\/20250520011828-682bd864bc8b4.png\" width=\"782\" \/><\/p>\n<p>\u53d1\u9001\u6570\u636e&#xff1a;\u9996\u5148\u5c06\u8981\u53d1\u9001\u7684\u6570\u636e&#xff0c;\u5199\u5165TDR\u53d1\u9001\u6570\u636e\u5bc4\u5b58\u5668&#xff0c;\u7136\u540e\u4f1a\u68c0\u6d4b\u53d1\u9001\u79fb\u4f4d\u5bc4\u5b58\u5668\u4e2d\u662f\u5426\u6709\u6570\u636e\u6b63\u5728\u79fb\u4f4d&#xff0c;\u5982\u679c\u6ca1\u6709&#xff0c;\u5c31\u4f1a\u5c06\u6570\u636e\u4eceTDR\u8f6c\u5165\u5230\u79fb\u4f4d\u5bc4\u5b58\u5668\u4e2d&#xff0c;\u8fd9\u65f6\u4f1a\u4f7f\u6807\u5fd7\u4f4dTXE\u7f6e1&#xff0c;TDR\u4e3a\u7a7a&#xff0c;\u8fd9\u65f6\u5c31\u53ef\u4ee5\u5199\u5165\u4e0b\u4e00\u4e2a\u6570\u636e\u4e86&#xff0c;\u79fb\u4f4d\u5bc4\u5b58\u5668\u4e2d\u7684\u6570\u636e\u5c31\u4f1a\u5411\u53f3&#xff08;\u4f4e\u4f4d\u5148\u884c&#xff09;\u4e00\u4f4d\u4e00\u4f4d\u5730\u628a\u6570\u636e\u8f93\u51fa\u5230TX\u5f15\u811a&#xff0c;\u53d1\u9001\u5b8c\u6210\u540e&#xff0c;\u65b0\u7684\u6570\u636e\u5c31\u4f1a\u81ea\u52a8\u7684\u4eceTDR\u8f6c\u79fb\u5230\u79fb\u4f4d\u5bc4\u5b58\u5668\u4e2d\u3002 \u63a5\u6536\u6570\u636e\u8fc7\u7a0b\u8ddf\u4e0a\u9762\u7c7b\u4f3c&#xff0c;\u5176\u4e2d\u6807\u5fd7\u4f4d\u4e3aRXNE&#xff0c;\u63a5\u6536\u6570\u636e\u5bc4\u5b58\u5668\u975e\u7a7a&#xff0c;\u6807\u5fd7\u4f4d\u7f6e1\u65f6&#xff0c;\u5c31\u53ef\u4ee5\u5c06\u6570\u636e\u8bfb\u8d70\u4e86\u3002<\/p>\n<p>TDR\u548cRDR\u662f\u5728\u540c\u4e00\u4e2a\u6570\u636e\u5bc4\u5b58\u5668DR\u4e2d\u7684\u3002<\/p>\n<h2 id=\"%E4%BA%94%E3%80%81USART%E5%9F%BA%E6%9C%AC%E7%BB%93%E6%9E%84\">\u4e94\u3001USART\u57fa\u672c\u7ed3\u6784<\/h2>\n<p><img loading=\"lazy\" decoding=\"async\" alt=\"\" height=\"565\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2025\/05\/20250520011829-682bd8650d520.png\" width=\"1255\" \/><\/p>\n<p>\u65f6\u949f\u6765\u6e90\u662fPCLK2\/1&#xff0c;\u7ecf\u8fc7\u6ce2\u7279\u7387\u5206\u9891\u540e&#xff0c;\u4ea7\u751f\u7684\u65f6\u949f\u901a\u5411\u53d1\u9001\u63a7\u5236\u5668\u548c\u63a5\u6536\u5668&#xff0c;\u5b83\u4eec\u4e24\u4e2a\u7528\u6765\u63a7\u5236\u79fb\u4f4d&#xff1b;<\/p>\n<p>\u5199\u5165\u6570\u636e\u901a\u8fc7\u4e24\u4e2a\u5bc4\u5b58\u5668\u79fb\u51fa&#xff0c;\u7136\u540e\u901a\u8fc7GPIO\u7684\u590d\u7528\u8f93\u51fa&#xff0c;\u8f93\u51fa\u5230TX\u5f15\u811a&#xff0c;\u4ea7\u751f\u4e32\u53e3\u534f\u8bae\u89c4\u5b9a\u7684\u6ce2\u5f62\u3002 \u8bfb\u53d6\u6570\u636e\u7c7b\u4f3c\u3002<\/p>\n<p>USART\u521d\u59cb\u5316\u6b65\u9aa4&#xff1a; &#xff08;1&#xff09;RCC\u5f00\u542f\u65f6\u949f&#xff0c;\u5305\u62ecUSART\u548cGPIO\u7684\u65f6\u949f&#xff1b; &#xff08;2&#xff09;GPIO\u521d\u59cb\u5316&#xff0c;\u628aTX\u914d\u7f6e\u6210\u590d\u7528\u8f93\u51fa&#xff0c;RX\u914d\u7f6e\u6210\u8f93\u5165&#xff1b; &#xff08;3&#xff09;\u914d\u7f6eUSART&#xff1b; &#xff08;4&#xff09;\u5982\u679c\u6709\u63a5\u6536\u6570\u636e&#xff0c;\u8fd8\u9700\u8981\u914d\u7f6e\u4e2d\u65ad&#xff0c;\u52a0\u4e0aITconfig\u548cNVIC&#xff1b; &#xff08;5&#xff09;\u5f00\u542fUSART\u3002<\/p>\n<\/p>\n<h2 id=\"%E5%85%AD%E3%80%81%E4%B8%B2%E5%8F%A3%E6%95%B0%E6%8D%AE%E5%8C%85%E7%9A%84%E6%94%B6%E5%8F%91\">\u516d\u3001\u4e32\u53e3\u6570\u636e\u5305\u7684\u6536\u53d1<\/h2>\n<\/p>\n<p>HEX\u6570\u636e\u5305\u548c\u6587\u672c\u6570\u636e\u5305<\/p>\n<p>\u6570\u636e\u5305\u4f5c\u7528&#xff1a;\u628a\u4e00\u4e2a\u4e2a\u5355\u72ec\u7684\u6570\u636e\u6253\u5305\u8d77\u6765&#xff0c;\u65b9\u4fbf\u8fdb\u884c\u591a\u5b57\u8282\u7684\u6570\u636e\u901a\u4fe1\u3002 \u4f8b\u5982&#xff0c;\u4e00\u4e2a\u9640\u87ba\u4eea\u9700\u8981\u901a\u8fc7\u4e32\u53e3\u4f20\u8f93x\u3001y\u3001z\u4e09\u8f74\u7684\u59ff\u6001\u6570\u636e&#xff0c;\u5982\u679c\u8fde\u7eed\u53d1\u9001\u4e09\u8f74\u6570\u636e&#xff0c;\u63a5\u6536\u65b9\u4f1a\u65e0\u6cd5\u8bc6\u522b\u8fd9\u4e9b\u6570\u636e\u5206\u522b\u5bf9\u5e94\u7684\u8f74&#xff0c;\u63a5\u6536\u65b9\u53ef\u80fd\u4ece\u4efb\u610f\u4f4d\u7f6e\u63a5\u6536\u6570\u636e&#xff0c;\u6240\u4ee5\u4f1a\u51fa\u73b0\u6570\u636e\u9519\u4f4d\u7684\u73b0\u8c61\u3002\u6240\u4ee5\u6570\u636e\u5305\u5c31\u80fd\u5c06\u540c\u4e00\u6279\u6570\u636e\u8fdb\u884c\u6253\u5305\u548c\u5206\u5272&#xff0c;\u65b9\u4fbf\u63a5\u6536\u65b9\u8bc6\u522b\u3002<\/p>\n<p>\u6709\u5173\u6253\u5305\u5206\u5272\u7684\u65b9\u6cd5&#xff1a;\u4f8b\u5982\u53ef\u5c06x\u6570\u636e\u7684\u6700\u9ad8\u4f4d\u7f6e1&#xff0c;yz\u6570\u636e\u7684\u6700\u9ad8\u4f4d\u90fd\u7f6e0&#xff0c;\u8fd9\u6837\u6536\u5230\u6570\u636e\u540e&#xff0c;\u5c31\u80fd\u901a\u8fc7\u6700\u9ad8\u4f4d\u6765\u5224\u65ad\u54ea\u4e2a\u6570\u636e\u662fx\u8f74\u7684&#xff0c;\u4e4b\u540e\u7684\u6570\u636e\u5c31\u5206\u522b\u662fy\u8f74\u548cz\u8f74\u3002 \u00a0<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" alt=\"\" height=\"556\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2025\/05\/20250520011829-682bd8654a511.png\" width=\"1280\" \/><\/p>\n<p>\u4e32\u53e3\u6570\u636e\u5305\u4f7f\u7528\u7684\u6253\u5305\u5206\u5272\u65b9\u6cd5&#xff1a;\u5728\u6570\u636e\u5305\u7684\u4e24\u7aef\u989d\u5916\u6dfb\u52a0\u5305\u5934\u548c\u5305\u5c3e&#xff0c;\u5982\u4e0a\u56fe\u6240\u793a\u3002<\/p>\n<p>\u5b9a\u4e490xFF\u4e3a\u5305\u5934&#xff0c;\u5f53\u63a5\u6536\u52300xFF\u540e&#xff0c;\u5c31\u80fd\u76f4\u5230\u662f\u4e00\u4e2a\u6570\u636e\u5305\u6765\u4e86&#xff0c;\u63a5\u7740\u518d\u6536\u5230\u76844\u4e2a\u5b57\u8282\u5c31\u5f53\u505a\u6570\u636e\u5305\u7684\u7b2c1\u30012\u30013\u30014\u4e2a\u6570\u636e&#xff0c;\u5b58\u5728\u4e00\u4e2a\u6570\u7ec4\u91cc&#xff0c;\u6700\u540e\u8ddf\u4e00\u4e2a\u5305\u5c3e&#xff0c;\u5b9a\u4e49\u4e3a0xFE&#xff0c;\u6b64\u65f6\u5c31\u53ef\u4ee5\u7f6e\u4e00\u4e2a\u6807\u5fd7\u4f4d&#xff0c;\u544a\u8bc9\u7a0b\u5e8f&#xff0c;\u6536\u5230\u4e86\u4e00\u4e2a\u6570\u636e\u5305&#xff0c;\u7136\u540e\u7ee7\u7eed\u4ee5\u4e0a\u64cd\u4f5c&#xff0c;\u8fd9\u6837\u5c31\u80fd\u5728\u4e00\u4e2a\u8fde\u7eed\u7684\u6570\u636e\u6d41\u4e2d&#xff0c;\u5c06\u6570\u636e\u5b9e\u73b0\u6253\u5305\u5206\u5272\u7684\u64cd\u4f5c\u3002<\/p>\n<p>\u4ee5\u4e0a\u65b9\u6cd5\u7684\u95ee\u9898&#xff1a; 1\u3001\u5305\u5934\u5305\u5c3e\u548c\u6570\u636e\u8f7d\u8377\u91cd\u590d\u7684\u95ee\u9898&#xff1b; \u89e3\u51b3\u65b9\u6cd5&#xff1a;&#xff08;1&#xff09;\u9650\u5236\u8f7d\u8377\u6570\u636e\u7684\u8303\u56f4&#xff0c;\u59820-100&#xff1b;&#xff08;2&#xff09;\u5982\u679c\u65e0\u6cd5\u907f\u514d\u91cd\u590d&#xff0c;\u90a3\u4e48\u5c3d\u91cf\u4f7f\u7528\u56fa\u5b9a\u957f\u5ea6\u7684\u6570\u636e\u5305&#xff0c;\u8fd9\u6837\u5305\u5934\u5305\u5c3e\u548c\u8f7d\u8377\u6570\u636e\u7684\u4f4d\u7f6e\u662f\u533a\u5206\u5f00\u6765\u7684\u3002&#xff08;3&#xff09;\u5c3d\u91cf\u8ba9\u5305\u5934\u5305\u5c3e\u5448\u73b0\u8f7d\u8377\u6570\u636e\u51fa\u73b0\u4e0d\u4e86\u7684\u72b6\u6001&#xff0c;\u6bd4\u5982\u5b9a\u4e49\u5305\u5934\u5305\u5c3e\u4e3aFF&#xff0c;FE&#xff0c;\u8f7d\u8377\u6570\u636e\u5f88\u5c0f\u6982\u7387\u8fd9\u4e9b\u6570\u3002<\/p>\n<p>2\u3001\u5305\u5934\u5305\u5c3e\u5e76\u4e0d\u662f\u6bcf\u4e2a\u6570\u636e\u5305\u90fd\u9700\u8981&#xff0c;\u6bd4\u5982\u5728\u56fa\u5b9a\u5305\u957f\u7684\u6570\u636e\u5305\u4e2d&#xff0c;\u53ef\u4ee5\u53bb\u6389\u5305\u5c3e&#xff0c;\u5b9a\u4e49\u5305\u5934\u4e3a0xFF&#xff0c;\u7136\u540e\u540e\u9762\u8ddf\u7740\u56db\u4e2a\u5b57\u8282&#xff0c;\u6536\u591f\u56db\u4e2a\u5b57\u8282\u5c31\u7f6e\u6807\u5fd7\u4f4d&#xff0c;\u8fd9\u6837\u5c31\u662f\u4e00\u4e2a\u6570\u636e\u5305\u3002\u7f3a\u70b9\u662f\u5305\u5934\u5305\u5c3e\u548c\u6570\u636e\u8f7d\u8377\u91cd\u590d\u7684\u95ee\u9898\u4f1a\u66f4\u4e25\u91cd\u3002<\/p>\n<p>3\u3001\u9009\u62e9\u56fa\u5b9a\u5305\u957f\u8fd8\u662f\u53ef\u53d8\u5305\u957f\u3002 \u5bf9HEX\u6570\u636e\u5305\u6765\u8bf4&#xff0c;\u5982\u679c\u4f1a\u51fa\u73b0\u5305\u5934\u5305\u5c3e\u548c\u6570\u636e\u8f7d\u8377\u91cd\u590d\u95ee\u9898&#xff0c;\u90a3\u5c31\u9009\u62e9\u56fa\u5b9a\u5305\u957f&#xff0c;\u5305\u5934\u5305\u5c3e\u548c\u6570\u636e\u8f7d\u8377\u4e0d\u4f1a\u91cd\u590d&#xff0c;\u5c31\u9009\u62e9\u53ef\u53d8\u5305\u957f\u3002<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" alt=\"\" height=\"542\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2025\/05\/20250520011829-682bd8658329b.png\" width=\"1221\" \/><\/p>\n<p>\u5728HEX\u6570\u636e\u5305\u4e2d&#xff0c;\u6570\u636e\u90fd\u662f\u4ee5\u539f\u59cb\u7684\u5b57\u8282\u6570\u636e\u672c\u8eab\u5448\u73b0\u7684&#xff0c;\u800c\u5728\u6587\u672c\u6570\u636e\u5305\u4e2d&#xff0c;\u6bcf\u4e2a\u5b57\u8282\u5c31\u7ecf\u8fc7\u4e86\u4e00\u5c42\u7f16\u7801\u548c\u8bd1\u7801&#xff0c;\u6700\u7ec8\u8868\u73b0\u51fa\u6765\u7684\u5c31\u662f\u6587\u672c\u683c\u5f0f\u3002<\/p>\n<p>\u6587\u672c\u6570\u636e\u5305\u5b9a\u4e49\u2018&#064;\u2019\u4e3a\u5305\u5934&#xff0c;\u5b9a\u4e49\u2018\\\\r\\\\n\u2019&#xff08;\u6362\u884c\u7b26&#xff09;\u4e3a\u5305\u5c3e&#xff0c;\u7531\u4e8e\u662f\u5b57\u7b26\u5f62\u5f0f&#xff0c;\u5f88\u5c11\u4f1a\u51fa\u73b0\u5305\u5934\u5305\u5c3e\u548c\u6570\u636e\u8f7d\u8377\u91cd\u590d\u95ee\u9898\u3002<\/p>\n<p>\u5f53\u6536\u5230\u8f7d\u8377\u6570\u636e\u540e&#xff0c;\u5f97\u5230\u7684\u5c31\u662f\u4e00\u4e2a\u5b57\u7b26\u4e32&#xff0c;\u5728\u8f6f\u4ef6\u4e2d\u518d\u5bf9\u5b57\u7b26\u4e32\u8fdb\u884c\u64cd\u4f5c\u548c\u5224\u65ad&#xff0c;\u5c31\u53ef\u4ee5\u5b9e\u73b0\u5404\u79cd\u6307\u4ee4\u63a7\u5236\u7684\u529f\u80fd\u4e86\u3002<\/p>\n<\/p>\n<p>\u6570\u636e\u5305\u7684\u6536\u53d1\u6d41\u7a0b<\/p>\n<p>\u53d1\u9001\u6570\u636e\u5305\u76f4\u63a5\u8c03\u7528\u5305\u88c5\u7684\u51fd\u6570\u5373\u53ef&#xff0c;\u968f\u7528\u968f\u53d1&#xff0c;\u8fd9\u91cc\u4e0d\u591a\u9610\u8ff0&#xff0c;\u8fd9\u91cc\u4e0b\u9762\u4e3b\u8981\u4ecb\u7ecd\u4e00\u4e0b\u5982\u4f55\u63a5\u6536\u6570\u636e\u5305\u3002<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" alt=\"\" height=\"504\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2025\/05\/20250520011829-682bd865bd816.png\" width=\"1206\" \/><\/p>\n<p style=\"text-align:center\">\u63a5\u6536HEX\u6570\u636e\u5305\u00a0<\/p>\n<p>\u6bcf\u6536\u5230\u4e00\u4e2a\u5b57\u8282&#xff0c;\u7a0b\u5e8f\u5c31\u4f1a\u8fdb\u4e00\u904d\u4e2d\u65ad&#xff0c;\u5728\u4e2d\u65ad\u4e2d\u83b7\u53d6\u8fd9\u4e2a\u5b57\u8282\u540e&#xff0c;\u5c31\u4f1a\u9000\u51fa\u4e2d\u65ad&#xff0c;\u6240\u4ee5\u6bcf\u6b21\u62ff\u5230\u6570\u636e\u90fd\u662f\u4e00\u4e2a\u72ec\u7acb\u7684\u8fc7\u7a0b\u3002\u4f46\u662f\u5728\u6570\u636e\u5305\u4e2d&#xff0c;\u5305\u5934\u4e4b\u540e\u662f\u6570\u636e&#xff0c;\u6570\u636e\u4e4b\u540e\u662f\u5305\u5c3e&#xff0c;\u5bf9\u8fd9\u4e09\u79cd\u6570\u636e\u72b6\u6001\u90fd\u5f97\u6709\u4e0d\u540c\u7684\u5904\u7406\u903b\u8f91&#xff0c;\u6240\u4ee5\u9700\u8981\u8bbe\u8ba1\u4e00\u4e2a\u80fd\u8bb0\u4f4f\u4e0d\u540c\u72b6\u6001\u7684\u673a\u5236&#xff0c;\u5728\u4e0d\u540c\u72b6\u6001\u6267\u884c\u4e0d\u540c\u7684\u64cd\u4f5c&#xff0c;\u540c\u65f6\u8fd8\u8981\u8fdb\u884c\u72b6\u6001\u7684\u5408\u7406\u8f6c\u79fb&#xff0c;\u8fd9\u79cd\u7a0b\u5e8f\u8bbe\u8ba1\u601d\u7ef4&#xff0c;\u5c31\u53eb\u505a\u201c\u72b6\u6001\u673a\u201d\u3002<\/p>\n<p>\u4e0a\u56fe\u662f\u4e00\u4e2a\u72b6\u6001\u8f6c\u79fb\u56fe&#xff0c;\u7b2c\u4e00\u4e2a\u72b6\u6001\u662f\u7b49\u5f85\u5305\u5934&#xff0c;\u7b2c\u4e8c\u4e2a\u72b6\u6001\u662f\u63a5\u6536\u6570\u636e&#xff0c;\u7b2c\u4e09\u4e2a\u72b6\u6001\u662f\u7b49\u5f85\u5305\u5c3e&#xff0c;\u6bcf\u4e2a\u72b6\u6001\u5206\u522b\u7528S&#061;0&#xff0c;S&#061;1&#xff0c;S&#061;2\u6765\u6807\u5fd7\u3002<\/p>\n<p>\u6267\u884c\u6d41\u7a0b&#xff1a; S&#061;0\u65f6&#xff0c;\u5f00\u59cb\u6536\u5230\u4e00\u4e2a\u6570\u636e\u540e&#xff0c;\u8fdb\u4e2d\u65ad&#xff0c;\u5224\u65ad\u6570\u636e\u662f\u5426\u662f\u5305\u5934FF&#xff0c;\u5982\u679c\u662f\u5305\u5934FF&#xff0c;\u5219\u7f6eS&#061;1&#xff0c;\u9000\u51fa\u4e2d\u65ad&#xff1b;\u5982\u679c\u6536\u5230\u7684\u6570\u636e\u4e0d\u662f\u5305\u5934FF&#xff0c;\u8bf4\u660e\u6570\u636e\u5305\u6ca1\u6709\u5bf9\u9f50&#xff0c;\u5219\u7ee7\u7eed\u7b49\u5f85\u5305\u5934FF\u7684\u51fa\u73b0&#xff1b; S&#061;1\u65f6&#xff0c;\u6536\u5230\u6570\u636e\u4ee5\u540e&#xff0c;\u8fdb\u5165\u4e2d\u65ad&#xff0c;\u5c31\u53ef\u4ee5\u6839\u636e\u6807\u5fd7\u4f4dS&#061;1&#xff0c;\u8fdb\u884c\u63a5\u6536\u6570\u636e\u7684\u7a0b\u5e8f&#xff0c;\u628a\u6570\u636e\u5b58\u5728\u6570\u7ec4\u4e2d&#xff0c;\u518d\u7528\u4e00\u4e2a\u53d8\u91cf\u8bb0\u5f55\u6536\u5230\u4e86\u591a\u5c11\u4e2a\u6570\u636e&#xff0c;\u5f53\u8fd9\u4e2a\u53d8\u91cf&#061;4\u65f6&#xff0c;\u518d\u7f6e\u6807\u5fd7\u4f4dS&#061;2&#xff1b; S&#061;2\u65f6&#xff0c;\u6536\u5230\u6570\u636e\u540e&#xff0c;\u5224\u65ad\u6570\u636e\u662f\u5426\u662f\u5305\u5c3eFE&#xff0c;\u5982\u679c\u662fFE&#xff0c;\u5c31\u7f6eS&#061;0&#xff0c;\u91cd\u65b0\u5f00\u59cb\u4e0b\u4e00\u4e2a\u5468\u671f&#xff1b;\u5982\u679c\u4e0d\u662f&#xff0c;\u5c31\u8fdb\u5165\u91cd\u590d\u7b49\u5f85\u5305\u5c3e\u7684\u72b6\u6001\u3002<\/p>\n<p>\u6587\u672c\u6570\u636e\u5305\u63a5\u6536\u6570\u636e\u6d41\u7a0b\u4e0eHEX\u7c7b\u4f3c\u3002 <img loading=\"lazy\" decoding=\"async\" alt=\"\" height=\"502\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2025\/05\/20250520011830-682bd866016f6.png\" width=\"1144\" \/><\/p>\n<\/p><\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u6587\u7ae0\u6d4f\u89c8\u9605\u8bfb1k\u6b21\uff0c\u70b9\u8d5e23\u6b21\uff0c\u6536\u85cf13\u6b21\u3002\u5b9a\u4e49\uff1a\u4e32\u53e3\u662f\u4e00\u79cd\u5e94\u7528\u5341\u5206\u5e7f\u6cdb\u7684\u901a\u8baf\u63a5\u53e3\uff0c\u4e32\u53e3\u6210\u672c\u4f4e\uff0c\u5bb9\u6613\u4f7f\u7528\u3001\u901a\u4fe1\u7ebf\u8def\u7b80\u5355\uff0c\u53ef\u5b9e\u73b0\u4e24\u4e2a\u8bbe\u5907\u7684\u76f8\u4e92\u901a\u4fe1\u3002\u529f\u80fd\uff1a\u5355\u7247\u673a\u7684\u4e32\u53e3\u53ef\u4ee5\u4f7f\u5355\u7247\u673a\u4e0e\u5355\u7247\u673a\u3001\u5355\u7247\u673a\u4e0e\u7535\u8111\u3001\u5355\u7247\u673a\u4e0e\u5404\u5f0f\u5404\u6837\u7684\u6a21\u5757\u76f8\u4e92\u901a\u4fe1\uff0c\u6781\u5927\u7684\u6269\u5c55\u4e86\u5355\u7247\u673a\u7684\u5e94\u7528\u8303\u56f4\uff0c\u589e\u5f3a\u4e86\u5355\u7247\u673a\u7cfb\u7edf\u7684\u786c\u4ef6\u5b9e\u529b\u300251\u5355\u7247\u673a\u5185\u90e8\u81ea\u5e26UART\uff08\u901a\u7528\u5f02\u6b65\u6536\u53d1\u5668\uff09\uff0c\u53ef\u5b9e\u73b0\u5355\u7247\u673a\u7684\u4e32\u53e3\u901a\u4fe1\u3002_stm32 \u4e32\u53e3 9\u4f4d \u5305\u62ec\u6821\u9a8c\u5417<\/p>\n","protected":false},"author":2,"featured_media":38370,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[217,3359,270,269],"topic":[],"class_list":{"0":"post-38381","1":"post","2":"type-post","3":"status-publish","4":"format-standard","5":"has-post-thumbnail","6":"hentry","7":"category-server","8":"tag-stm32","10":"tag-270","11":"tag-269"},"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v20.3 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>STM32-USART\u4e32\u53e3\u901a\u4fe1\uff089\uff09 - \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\/38381.html\" \/>\n<meta property=\"og:locale\" content=\"zh_CN\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"STM32-USART\u4e32\u53e3\u901a\u4fe1\uff089\uff09 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\" \/>\n<meta property=\"og:description\" content=\"\u6587\u7ae0\u6d4f\u89c8\u9605\u8bfb1k\u6b21\uff0c\u70b9\u8d5e23\u6b21\uff0c\u6536\u85cf13\u6b21\u3002\u5b9a\u4e49\uff1a\u4e32\u53e3\u662f\u4e00\u79cd\u5e94\u7528\u5341\u5206\u5e7f\u6cdb\u7684\u901a\u8baf\u63a5\u53e3\uff0c\u4e32\u53e3\u6210\u672c\u4f4e\uff0c\u5bb9\u6613\u4f7f\u7528\u3001\u901a\u4fe1\u7ebf\u8def\u7b80\u5355\uff0c\u53ef\u5b9e\u73b0\u4e24\u4e2a\u8bbe\u5907\u7684\u76f8\u4e92\u901a\u4fe1\u3002\u529f\u80fd\uff1a\u5355\u7247\u673a\u7684\u4e32\u53e3\u53ef\u4ee5\u4f7f\u5355\u7247\u673a\u4e0e\u5355\u7247\u673a\u3001\u5355\u7247\u673a\u4e0e\u7535\u8111\u3001\u5355\u7247\u673a\u4e0e\u5404\u5f0f\u5404\u6837\u7684\u6a21\u5757\u76f8\u4e92\u901a\u4fe1\uff0c\u6781\u5927\u7684\u6269\u5c55\u4e86\u5355\u7247\u673a\u7684\u5e94\u7528\u8303\u56f4\uff0c\u589e\u5f3a\u4e86\u5355\u7247\u673a\u7cfb\u7edf\u7684\u786c\u4ef6\u5b9e\u529b\u300251\u5355\u7247\u673a\u5185\u90e8\u81ea\u5e26UART\uff08\u901a\u7528\u5f02\u6b65\u6536\u53d1\u5668\uff09\uff0c\u53ef\u5b9e\u73b0\u5355\u7247\u673a\u7684\u4e32\u53e3\u901a\u4fe1\u3002_stm32 \u4e32\u53e3 9\u4f4d \u5305\u62ec\u6821\u9a8c\u5417\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.wsisp.com\/helps\/38381.html\" \/>\n<meta property=\"og:site_name\" content=\"\u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\" \/>\n<meta property=\"article:published_time\" content=\"2025-05-20T01:18:31+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2025\/05\/20250520011827-682bd863c0490.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=\"4 \u5206\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/38381.html\",\"url\":\"https:\/\/www.wsisp.com\/helps\/38381.html\",\"name\":\"STM32-USART\u4e32\u53e3\u901a\u4fe1\uff089\uff09 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\",\"isPartOf\":{\"@id\":\"https:\/\/www.wsisp.com\/helps\/#website\"},\"datePublished\":\"2025-05-20T01:18:31+00:00\",\"dateModified\":\"2025-05-20T01:18:31+00:00\",\"author\":{\"@id\":\"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/358e386c577a3ab51c4493330a20ad41\"},\"breadcrumb\":{\"@id\":\"https:\/\/www.wsisp.com\/helps\/38381.html#breadcrumb\"},\"inLanguage\":\"zh-Hans\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.wsisp.com\/helps\/38381.html\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/38381.html#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"\u9996\u9875\",\"item\":\"https:\/\/www.wsisp.com\/helps\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"STM32-USART\u4e32\u53e3\u901a\u4fe1\uff089\uff09\"}]},{\"@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":"STM32-USART\u4e32\u53e3\u901a\u4fe1\uff089\uff09 - \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\/38381.html","og_locale":"zh_CN","og_type":"article","og_title":"STM32-USART\u4e32\u53e3\u901a\u4fe1\uff089\uff09 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","og_description":"\u6587\u7ae0\u6d4f\u89c8\u9605\u8bfb1k\u6b21\uff0c\u70b9\u8d5e23\u6b21\uff0c\u6536\u85cf13\u6b21\u3002\u5b9a\u4e49\uff1a\u4e32\u53e3\u662f\u4e00\u79cd\u5e94\u7528\u5341\u5206\u5e7f\u6cdb\u7684\u901a\u8baf\u63a5\u53e3\uff0c\u4e32\u53e3\u6210\u672c\u4f4e\uff0c\u5bb9\u6613\u4f7f\u7528\u3001\u901a\u4fe1\u7ebf\u8def\u7b80\u5355\uff0c\u53ef\u5b9e\u73b0\u4e24\u4e2a\u8bbe\u5907\u7684\u76f8\u4e92\u901a\u4fe1\u3002\u529f\u80fd\uff1a\u5355\u7247\u673a\u7684\u4e32\u53e3\u53ef\u4ee5\u4f7f\u5355\u7247\u673a\u4e0e\u5355\u7247\u673a\u3001\u5355\u7247\u673a\u4e0e\u7535\u8111\u3001\u5355\u7247\u673a\u4e0e\u5404\u5f0f\u5404\u6837\u7684\u6a21\u5757\u76f8\u4e92\u901a\u4fe1\uff0c\u6781\u5927\u7684\u6269\u5c55\u4e86\u5355\u7247\u673a\u7684\u5e94\u7528\u8303\u56f4\uff0c\u589e\u5f3a\u4e86\u5355\u7247\u673a\u7cfb\u7edf\u7684\u786c\u4ef6\u5b9e\u529b\u300251\u5355\u7247\u673a\u5185\u90e8\u81ea\u5e26UART\uff08\u901a\u7528\u5f02\u6b65\u6536\u53d1\u5668\uff09\uff0c\u53ef\u5b9e\u73b0\u5355\u7247\u673a\u7684\u4e32\u53e3\u901a\u4fe1\u3002_stm32 \u4e32\u53e3 9\u4f4d \u5305\u62ec\u6821\u9a8c\u5417","og_url":"https:\/\/www.wsisp.com\/helps\/38381.html","og_site_name":"\u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","article_published_time":"2025-05-20T01:18:31+00:00","og_image":[{"url":"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2025\/05\/20250520011827-682bd863c0490.png"}],"author":"admin","twitter_card":"summary_large_image","twitter_misc":{"\u4f5c\u8005":"admin","\u9884\u8ba1\u9605\u8bfb\u65f6\u95f4":"4 \u5206"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/www.wsisp.com\/helps\/38381.html","url":"https:\/\/www.wsisp.com\/helps\/38381.html","name":"STM32-USART\u4e32\u53e3\u901a\u4fe1\uff089\uff09 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","isPartOf":{"@id":"https:\/\/www.wsisp.com\/helps\/#website"},"datePublished":"2025-05-20T01:18:31+00:00","dateModified":"2025-05-20T01:18:31+00:00","author":{"@id":"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/358e386c577a3ab51c4493330a20ad41"},"breadcrumb":{"@id":"https:\/\/www.wsisp.com\/helps\/38381.html#breadcrumb"},"inLanguage":"zh-Hans","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.wsisp.com\/helps\/38381.html"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/www.wsisp.com\/helps\/38381.html#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"\u9996\u9875","item":"https:\/\/www.wsisp.com\/helps"},{"@type":"ListItem","position":2,"name":"STM32-USART\u4e32\u53e3\u901a\u4fe1\uff089\uff09"}]},{"@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\/38381","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=38381"}],"version-history":[{"count":0,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/posts\/38381\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/media\/38370"}],"wp:attachment":[{"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/media?parent=38381"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/categories?post=38381"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/tags?post=38381"},{"taxonomy":"topic","embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/topic?post=38381"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}