{"id":40033,"date":"2023-10-03T18:49:38","date_gmt":"2023-10-03T10:49:38","guid":{"rendered":"https:\/\/www.techphant.cn\/?p=40033"},"modified":"2023-10-03T18:49:38","modified_gmt":"2023-10-03T10:49:38","slug":"szuhudqb","status":"publish","type":"post","link":"https:\/\/www.techphant.cn\/blog\/40033.html","title":{"rendered":"STM32\u4e2dUART\u548cUSART\u7684\u533a\u522b"},"content":{"rendered":"
\u5728STM32\u7cfb\u7edf\u4e2d\uff0cUART\u548cUSART\u662f\u4e24\u79cd\u4e0d\u540c\u7684\u4e32\u53e3\u901a\u4fe1\u6a21\u5f0f\uff0c\u5b83\u4eec\u90fd\u662f\u4e3a\u4e86\u5b9e\u73b0\u4e0d\u540c\u8bbe\u5907\u4e4b\u95f4\u7684\u6570\u636e\u4f20\u8f93\u800c\u8bbe\u8ba1\u7684\u3002\u8fd9\u4e24\u79cd\u6a21\u5f0f\u6709\u7740\u81ea\u5df1\u72ec\u7279\u7684\u7279\u70b9\u548c\u4f18\u70b9\uff0c\u5728\u4e0d\u540c\u7684\u5e94\u7528\u573a\u666f\u4e2d\u6709\u7740\u4e0d\u540c\u7684\u9009\u62e9\u3002\u672c\u6587\u5c06\u5bf9STM32\u4e2dUART\u548cUSART\u7684\u533a\u522b\u8fdb\u884c\u8be6\u7ec6\u4ecb\u7ecd\u3002<\/p>\n
UART\u662fUniversal Asynchronous Receiver\/Transmitter\u7684\u7f29\u5199\uff0c\u4e5f\u53eb\u901a\u7528\u5f02\u6b65\u6536\u53d1\u5668\uff0c\u662f\u4e00\u79cd\u57fa\u4e8e\u5b57\u7b26\u7684\u5f02\u6b65\u901a\u4fe1\u6a21\u5f0f\uff0c\u5b83\u53ef\u4ee5\u5b9e\u73b0\u4e24\u4e2a\u8bbe\u5907\u4e4b\u95f4\u7684\u6570\u636e\u4f20\u8f93\u3002UART\u53ef\u4ee5\u901a\u8fc7\u4e32\u884c\u63a5\u53e3\uff08Serial Port\uff09\u5c06\u6570\u636e\u4ee5\u5b57\u8282\u4e3a\u5355\u4f4d\u4f20\u8f93\u5230\u53e6\u4e00\u4e2a\u8bbe\u5907\uff0c\u8fd9\u79cd\u63a5\u53e3\u6bd4\u5e76\u884c\u63a5\u53e3\u4f20\u8f93\u6570\u636e\u8981\u5feb\u5f97\u591a\u3002UART\u7684\u4f18\u70b9\u5728\u4e8e\u5b83\u53ef\u4ee5\u540c\u65f6\u4f20\u8f93\u591a\u8def\u6570\u636e\uff0c\u5e76\u4e14\u53ef\u4ee5\u5728\u4e0d\u540c\u7684\u786c\u4ef6\u7cfb\u7edf\u4e2d\u4f7f\u7528\u3002<\/p>\n
UART\u7684\u5de5\u4f5c\u539f\u7406\u662f\u901a\u8fc7\u4e24\u4e2a\u8bbe\u5907\u4e4b\u95f4\u7684\u4e32\u884c\u63a5\u53e3\u5b9e\u73b0\u6570\u636e\u4f20\u8f93\u3002\u5b83\u4f7f\u7528\u4e00\u7ec4\u63a7\u5236\u4fe1\u53f7\uff0c\u5305\u62ec\u53d1\u9001\uff08TX\uff09\u3001\u63a5\u6536\uff08RX\uff09\u548c\u63a7\u5236\uff08CTRL\uff09\u4fe1\u53f7\uff0c\u6765\u63a7\u5236\u4e24\u4e2a\u8bbe\u5907\u4e4b\u95f4\u7684\u6570\u636e\u4f20\u8f93\u3002UART\u53ef\u4ee5\u5c06\u6570\u636e\u4ee5\u5b57\u8282\u4e3a\u5355\u4f4d\u4f20\u8f93\u5230\u53e6\u4e00\u4e2a\u8bbe\u5907\uff0c\u5e76\u4e14\u53ef\u4ee5\u5728\u4e0d\u540c\u7684\u786c\u4ef6\u7cfb\u7edf\u4e2d\u4f7f\u7528\u3002<\/p>\n
UART\u7684\u4f18\u70b9\u5728\u4e8e\u5b83\u53ef\u4ee5\u540c\u65f6\u4f20\u8f93\u591a\u8def\u6570\u636e\uff0c\u5e76\u4e14\u53ef\u4ee5\u5728\u4e0d\u540c\u7684\u786c\u4ef6\u7cfb\u7edf\u4e2d\u4f7f\u7528\u3002\u53e6\u5916\uff0cUART\u7684\u901a\u4fe1\u901f\u7387\u4e5f\u6bd4\u8f83\u5feb\uff0c\u53ef\u4ee5\u8fbe\u5230\u6570\u5343Kbps\uff0c\u8fd9\u6837\u53ef\u4ee5\u6ee1\u8db3\u5927\u591a\u6570\u5e94\u7528\u573a\u666f\u7684\u9700\u6c42\u3002<\/p>\n
USART\u662fUniversal Synchronous\/Asynchronous Receiver\/Transmitter\u7684\u7f29\u5199\uff0c\u4e5f\u53eb\u901a\u7528\u540c\u6b65\/\u5f02\u6b65\u6536\u53d1\u5668\uff0c\u662f\u4e00\u79cd\u53ef\u4ee5\u5b9e\u73b0\u540c\u6b65\u548c\u5f02\u6b65\u901a\u4fe1\u7684\u6a21\u5f0f\uff0c\u5b83\u53ef\u4ee5\u5b9e\u73b0\u4e24\u4e2a\u8bbe\u5907\u4e4b\u95f4\u7684\u6570\u636e\u4f20\u8f93\u3002USART\u53ef\u4ee5\u901a\u8fc7\u4e32\u884c\u63a5\u53e3\uff08Serial Port\uff09\u5c06\u6570\u636e\u4ee5\u5b57\u8282\u4e3a\u5355\u4f4d\u4f20\u8f93\u5230\u53e6\u4e00\u4e2a\u8bbe\u5907\uff0c\u8fd9\u79cd\u63a5\u53e3\u6bd4\u5e76\u884c\u63a5\u53e3\u4f20\u8f93\u6570\u636e\u8981\u5feb\u5f97\u591a\u3002USART\u7684\u4f18\u70b9\u5728\u4e8e\u5b83\u53ef\u4ee5\u540c\u65f6\u4f20\u8f93\u591a\u8def\u6570\u636e\uff0c\u5e76\u4e14\u53ef\u4ee5\u5728\u4e0d\u540c\u7684\u786c\u4ef6\u7cfb\u7edf\u4e2d\u4f7f\u7528\u3002<\/p>\n
USART\u7684\u5de5\u4f5c\u539f\u7406\u662f\u901a\u8fc7\u4e24\u4e2a\u8bbe\u5907\u4e4b\u95f4\u7684\u4e32\u884c\u63a5\u53e3\u5b9e\u73b0\u6570\u636e\u4f20\u8f93\u3002\u5b83\u4f7f\u7528\u4e00\u7ec4\u63a7\u5236\u4fe1\u53f7\uff0c\u5305\u62ec\u53d1\u9001\uff08TX\uff09\u3001\u63a5\u6536\uff08RX\uff09\u548c\u63a7\u5236\uff08CTRL\uff09\u4fe1\u53f7\uff0c\u6765\u63a7\u5236\u4e24\u4e2a\u8bbe\u5907\u4e4b\u95f4\u7684\u6570\u636e\u4f20\u8f93\u3002USART\u53ef\u4ee5\u5c06\u6570\u636e\u4ee5\u5b57\u8282\u4e3a\u5355\u4f4d\u4f20\u8f93\u5230\u53e6\u4e00\u4e2a\u8bbe\u5907\uff0c\u5e76\u4e14\u53ef\u4ee5\u5728\u4e0d\u540c\u7684\u786c\u4ef6\u7cfb\u7edf\u4e2d\u4f7f\u7528\u3002<\/p>\n
USART\u7684\u4f18\u70b9\u5728\u4e8e\u5b83\u53ef\u4ee5\u540c\u65f6\u4f20\u8f93\u591a\u8def\u6570\u636e\uff0c\u5e76\u4e14\u53ef\u4ee5\u5728\u4e0d\u540c\u7684\u786c\u4ef6\u7cfb\u7edf\u4e2d\u4f7f\u7528\u3002\u53e6\u5916\uff0cUSART\u7684\u901a\u4fe1\u901f\u7387\u4e5f\u6bd4\u8f83\u5feb\uff0c\u53ef\u4ee5\u8fbe\u5230\u6570\u5343Kbps\uff0c\u8fd9\u6837\u53ef\u4ee5\u6ee1\u8db3\u5927\u591a\u6570\u5e94\u7528\u573a\u666f\u7684\u9700\u6c42\u3002\u6b64\u5916\uff0cUSART\u8fd8\u652f\u6301\u540c\u6b65\u548c\u5f02\u6b65\u4e24\u79cd\u6a21\u5f0f\uff0c\u56e0\u6b64\u53ef\u4ee5\u6ee1\u8db3\u4e0d\u540c\u7684\u5e94\u7528\u573a\u666f\u3002<\/p>\n
\u4ee5\u4e0a\u5c31\u662fSTM32\u4e2dUART\u548cUSART\u7684\u533a\u522b\uff0cUART\u548cUSART\u90fd\u662f\u4e24\u79cd\u7528\u4e8e\u5b9e\u73b0\u4e0d\u540c\u8bbe\u5907\u4e4b\u95f4\u7684\u6570\u636e\u4f20\u8f93\u7684\u6a21\u5f0f\uff0c\u5b83\u4eec\u90fd\u5177\u6709\u81ea\u5df1\u72ec\u7279\u7684\u7279\u70b9\u548c\u4f18\u70b9\u3002<\/strong>UART\u53ef\u4ee5\u540c\u65f6\u4f20\u8f93\u591a\u8def\u6570\u636e\uff0c\u5e76\u4e14\u53ef\u4ee5\u5728\u4e0d\u540c\u7684\u786c\u4ef6\u7cfb\u7edf\u4e2d\u4f7f\u7528\uff0c\u800cUSART\u5219\u652f\u6301\u540c\u6b65\u548c\u5f02\u6b65\u4e24\u79cd\u6a21\u5f0f\uff0c\u56e0\u6b64\u53ef\u4ee5\u6ee1\u8db3\u4e0d\u540c\u7684\u5e94\u7528\u573a\u666f\u3002<\/p>\n","protected":false},"excerpt":{"rendered":" \u5728STM32\u7cfb\u7edf\u4e2d\uff0cUART\u548cUSART\u662f\u4e24\u79cd\u4e0d\u540c\u7684\u4e32\u53e3\u901a\u4fe1\u6a21\u5f0f\uff0c\u5b83\u4eec\u90fd\u662f\u4e3a\u4e86\u5b9e\u73b0\u4e0d\u540c\u8bbe\u5907\u4e4b\u95f4\u7684\u6570\u636e\u4f20\u8f93\u800c\u8bbe\u8ba1\u7684\u3002\u8fd9\u4e24\u79cd\u6a21\u5f0f\u6709\u7740\u81ea\u5df1\u72ec\u7279\u7684\u7279\u70b9\u548c\u4f18\u70b9\uff0c\u5728\u4e0d\u540c\u7684\u5e94\u7528\u573a\u666f\u4e2d\u6709<\/p>\n","protected":false},"author":1,"featured_media":4132,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"site-sidebar-layout":"default","site-content-layout":"default","ast-global-header-display":"","ast-main-header-display":"","ast-hfb-above-header-display":"","ast-hfb-below-header-display":"","ast-hfb-mobile-header-display":"","site-post-title":"","ast-breadcrumbs-content":"","ast-featured-img":"","footer-sml-layout":"","theme-transparent-header-meta":"","adv-header-id-meta":"","stick-header-meta":"","header-above-stick-meta":"","header-main-stick-meta":"","header-below-stick-meta":"","footnotes":""},"categories":[36],"tags":[287],"class_list":["post-40033","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-blog","tag-stm32"],"_links":{"self":[{"href":"https:\/\/www.techphant.cn\/wp-json\/wp\/v2\/posts\/40033","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.techphant.cn\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.techphant.cn\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.techphant.cn\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.techphant.cn\/wp-json\/wp\/v2\/comments?post=40033"}],"version-history":[{"count":0,"href":"https:\/\/www.techphant.cn\/wp-json\/wp\/v2\/posts\/40033\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.techphant.cn\/wp-json\/wp\/v2\/media\/4132"}],"wp:attachment":[{"href":"https:\/\/www.techphant.cn\/wp-json\/wp\/v2\/media?parent=40033"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.techphant.cn\/wp-json\/wp\/v2\/categories?post=40033"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.techphant.cn\/wp-json\/wp\/v2\/tags?post=40033"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}