{"id":918,"date":"2020-06-05T16:48:02","date_gmt":"2020-06-05T14:48:02","guid":{"rendered":"http:\/\/www.embedded-communication.com\/?p=918"},"modified":"2021-05-11T13:49:52","modified_gmt":"2021-05-11T11:49:52","slug":"english-using-uart3-as-virtual-com-on-nucleo-64-stm32l476","status":"publish","type":"post","link":"http:\/\/www.embedded-communication.com\/en\/misc\/english-using-uart3-as-virtual-com-on-nucleo-64-stm32l476\/","title":{"rendered":"Using UART3 as virtual COM on Nucleo-64 \/ STM32L476"},"content":{"rendered":"<p><\/p>\n<h1>Intention<\/h1>\n<p>By default the UART2 is connected to the virtual COM of the ST-Link. The same UART is possible to connect to the Arduino connector.<\/p>\n<p>So I want to connect the UART3 to the virtual COM connector and use the UART2 for the Arduino connector (CN9 Pin 1 and 2),<\/p>\n<p>The description is for an Nucleo-64 STM32L476, but should be compatible to some more Nucleo-64 boards, too.<\/p>\n<h1>Hardware changes<\/h1>\n<h2>Switch UART2 to the Arduino connector<\/h2>\n<ol>\n<li>open solder bridge SB13 and SB14<\/li>\n<li>close solder bridge SB62 and SB63<\/li>\n<\/ol>\n<div class=\"mceTemp\"><\/div>\n<figure id=\"attachment_924\" aria-describedby=\"caption-attachment-924\" style=\"width: 293px\" class=\"wp-caption alignnone\"><img loading=\"lazy\" decoding=\"async\" class=\"wp-image-924\" src=\"http:\/\/www.embedded-communication.com\/wp-content\/uploads\/2020\/06\/nucleo_1-251x300.jpg\" alt=\"Nucleo-64 Uart2 to Arduino\" width=\"293\" height=\"350\" srcset=\"http:\/\/www.embedded-communication.com\/wp-content\/uploads\/2020\/06\/nucleo_1-251x300.jpg 251w, http:\/\/www.embedded-communication.com\/wp-content\/uploads\/2020\/06\/nucleo_1-856x1024.jpg 856w, http:\/\/www.embedded-communication.com\/wp-content\/uploads\/2020\/06\/nucleo_1-768x919.jpg 768w, http:\/\/www.embedded-communication.com\/wp-content\/uploads\/2020\/06\/nucleo_1-1284x1536.jpg 1284w, http:\/\/www.embedded-communication.com\/wp-content\/uploads\/2020\/06\/nucleo_1-1200x1436.jpg 1200w, http:\/\/www.embedded-communication.com\/wp-content\/uploads\/2020\/06\/nucleo_1.jpg 1498w\" sizes=\"auto, (max-width: 293px) 85vw, 293px\" \/><figcaption id=\"caption-attachment-924\" class=\"wp-caption-text\">Nucleo-64 solder bridges<\/figcaption><\/figure>\n<p><a href=\"https:\/\/www.st.com\/en\/evaluation-tools\/nucleo-l476rg.html\" target=\"_blank\" rel=\"noopener noreferrer\">Nucleo-64 evaluation board<\/a><\/p>\n<h2>Switch UART3 to the VCOM of the ST-Link<\/h2>\n<ol>\n<li>\u00a0connect ST-Link connector TX to PC5 (Uart3 RX, CN10 pin 6)<\/li>\n<li>connect ST-Link connector RX to PC4 (Uart3 TX, CN10 pin 34)<\/li>\n<\/ol>\n<figure id=\"attachment_925\" aria-describedby=\"caption-attachment-925\" style=\"width: 297px\" class=\"wp-caption alignnone\"><img loading=\"lazy\" decoding=\"async\" class=\"size-medium wp-image-925\" src=\"http:\/\/www.embedded-communication.com\/wp-content\/uploads\/2020\/06\/nucleo_2-297x300.jpg\" alt=\"Nucleo-64 UART3 to ST-Link\" width=\"297\" height=\"300\" srcset=\"http:\/\/www.embedded-communication.com\/wp-content\/uploads\/2020\/06\/nucleo_2-297x300.jpg 297w, http:\/\/www.embedded-communication.com\/wp-content\/uploads\/2020\/06\/nucleo_2-1015x1024.jpg 1015w, http:\/\/www.embedded-communication.com\/wp-content\/uploads\/2020\/06\/nucleo_2-768x775.jpg 768w, http:\/\/www.embedded-communication.com\/wp-content\/uploads\/2020\/06\/nucleo_2-1200x1211.jpg 1200w, http:\/\/www.embedded-communication.com\/wp-content\/uploads\/2020\/06\/nucleo_2.jpg 1485w\" sizes=\"auto, (max-width: 297px) 85vw, 297px\" \/><figcaption id=\"caption-attachment-925\" class=\"wp-caption-text\">Wires to connect the UART3 to the ST-Link<\/figcaption><\/figure>\n<h1>Software changes<\/h1>\n<ul>\n<li>initialize UART3\u00a0 (e.g. 115200 Baud, 8N1) with PC4 and PC5<\/li>\n<li>in case you want to use printf<\/li>\n<\/ul>\n<pre style=\"padding-left: 40px;\">int __io_putchar(int ch) {\r\n    HAL_UART_Transmit(&amp;huart3, (uint8_t *)&amp;ch, 1, 0xFFFF);\r\n    \/\/ITM_SendChar(ch);\r\n    return ch;\r\n}<\/pre>\n<ul>\n<li>alternatively overwrite _write()<\/li>\n<\/ul>\n<p>&nbsp;<\/p>\n<div class=\"mceTemp\"><\/div>\n<p>&nbsp;<\/p>","protected":false},"excerpt":{"rendered":"<p>Intention By default the UART2 is connected to the virtual COM of the ST-Link. The same UART is possible to connect to the Arduino connector. So I want to connect the UART3 to the virtual COM connector and use the UART2 for the Arduino connector (CN9 Pin 1 and 2), The description is for an &hellip; <a href=\"http:\/\/www.embedded-communication.com\/en\/misc\/english-using-uart3-as-virtual-com-on-nucleo-64-stm32l476\/\" class=\"more-link\">Continue reading<span class=\"screen-reader-text\"> &#8220;Using UART3 as virtual COM on Nucleo-64 \/ STM32L476&#8221;<\/span><\/a><\/p>\n","protected":false},"author":8,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[36],"tags":[53,37,52,51],"class_list":["post-918","post","type-post","status-publish","format-standard","hentry","category-misc","tag-nucleo","tag-printf","tag-stm32","tag-uart"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v24.0 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>Using UART3 as virtual COM on Nucleo-64 \/ STM32L476 - embedded communication<\/title>\n<meta name=\"description\" content=\"(English) Switch the UART2 of the Nucle-64 board to the Arduino connector and use UART3 for the STLink virtual COM.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"http:\/\/www.embedded-communication.com\/misc\/english-using-uart3-as-virtual-com-on-nucleo-64-stm32l476\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Using UART3 as virtual COM on Nucleo-64 \/ STM32L476 - embedded communication\" \/>\n<meta property=\"og:description\" content=\"(English) Switch the UART2 of the Nucle-64 board to the Arduino connector and use UART3 for the STLink virtual COM.\" \/>\n<meta property=\"og:url\" content=\"http:\/\/www.embedded-communication.com\/misc\/english-using-uart3-as-virtual-com-on-nucleo-64-stm32l476\/\" \/>\n<meta property=\"og:site_name\" content=\"embedded communication\" \/>\n<meta property=\"article:published_time\" content=\"2020-06-05T14:48:02+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2021-05-11T11:49:52+00:00\" \/>\n<meta property=\"og:image\" content=\"http:\/\/www.embedded-communication.com\/wp-content\/uploads\/2020\/06\/nucleo_1-251x300.jpg\" \/>\n<meta name=\"author\" content=\"Steffen Rose\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@EmbeddedComm\" \/>\n<meta name=\"twitter:site\" content=\"@EmbeddedComm\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Steffen Rose\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"2 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"http:\/\/www.embedded-communication.com\/misc\/english-using-uart3-as-virtual-com-on-nucleo-64-stm32l476\/#article\",\"isPartOf\":{\"@id\":\"http:\/\/www.embedded-communication.com\/misc\/english-using-uart3-as-virtual-com-on-nucleo-64-stm32l476\/\"},\"author\":{\"name\":\"Steffen Rose\",\"@id\":\"http:\/\/www.embedded-communication.com\/#\/schema\/person\/24f46183ed01fe51931528c28674b9ee\"},\"headline\":\"Using UART3 as virtual COM on Nucleo-64 \/ STM32L476\",\"datePublished\":\"2020-06-05T14:48:02+00:00\",\"dateModified\":\"2021-05-11T11:49:52+00:00\",\"mainEntityOfPage\":{\"@id\":\"http:\/\/www.embedded-communication.com\/misc\/english-using-uart3-as-virtual-com-on-nucleo-64-stm32l476\/\"},\"wordCount\":177,\"publisher\":{\"@id\":\"http:\/\/www.embedded-communication.com\/#organization\"},\"image\":{\"@id\":\"http:\/\/www.embedded-communication.com\/misc\/english-using-uart3-as-virtual-com-on-nucleo-64-stm32l476\/#primaryimage\"},\"thumbnailUrl\":\"http:\/\/www.embedded-communication.com\/wp-content\/uploads\/2020\/06\/nucleo_1-251x300.jpg\",\"keywords\":[\"Nucleo\",\"printf\",\"STM32\",\"UART\"],\"articleSection\":[\"Misc\"],\"inLanguage\":\"en-US\"},{\"@type\":\"WebPage\",\"@id\":\"http:\/\/www.embedded-communication.com\/misc\/english-using-uart3-as-virtual-com-on-nucleo-64-stm32l476\/\",\"url\":\"http:\/\/www.embedded-communication.com\/misc\/english-using-uart3-as-virtual-com-on-nucleo-64-stm32l476\/\",\"name\":\"Using UART3 as virtual COM on Nucleo-64 \/ STM32L476 - embedded communication\",\"isPartOf\":{\"@id\":\"http:\/\/www.embedded-communication.com\/#website\"},\"primaryImageOfPage\":{\"@id\":\"http:\/\/www.embedded-communication.com\/misc\/english-using-uart3-as-virtual-com-on-nucleo-64-stm32l476\/#primaryimage\"},\"image\":{\"@id\":\"http:\/\/www.embedded-communication.com\/misc\/english-using-uart3-as-virtual-com-on-nucleo-64-stm32l476\/#primaryimage\"},\"thumbnailUrl\":\"http:\/\/www.embedded-communication.com\/wp-content\/uploads\/2020\/06\/nucleo_1-251x300.jpg\",\"datePublished\":\"2020-06-05T14:48:02+00:00\",\"dateModified\":\"2021-05-11T11:49:52+00:00\",\"description\":\"(English) Switch the UART2 of the Nucle-64 board to the Arduino connector and use UART3 for the STLink virtual COM.\",\"breadcrumb\":{\"@id\":\"http:\/\/www.embedded-communication.com\/misc\/english-using-uart3-as-virtual-com-on-nucleo-64-stm32l476\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"http:\/\/www.embedded-communication.com\/misc\/english-using-uart3-as-virtual-com-on-nucleo-64-stm32l476\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"http:\/\/www.embedded-communication.com\/misc\/english-using-uart3-as-virtual-com-on-nucleo-64-stm32l476\/#primaryimage\",\"url\":\"http:\/\/www.embedded-communication.com\/wp-content\/uploads\/2020\/06\/nucleo_1-251x300.jpg\",\"contentUrl\":\"http:\/\/www.embedded-communication.com\/wp-content\/uploads\/2020\/06\/nucleo_1-251x300.jpg\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"http:\/\/www.embedded-communication.com\/misc\/english-using-uart3-as-virtual-com-on-nucleo-64-stm32l476\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Startseite\",\"item\":\"http:\/\/www.embedded-communication.com\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"(English) Using UART3 as virtual COM on Nucleo-64 \/ STM32L476\"}]},{\"@type\":\"WebSite\",\"@id\":\"http:\/\/www.embedded-communication.com\/#website\",\"url\":\"http:\/\/www.embedded-communication.com\/\",\"name\":\"embedded communication\",\"description\":\"A blog about embedded communcation protocols.\",\"publisher\":{\"@id\":\"http:\/\/www.embedded-communication.com\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"http:\/\/www.embedded-communication.com\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"http:\/\/www.embedded-communication.com\/#organization\",\"name\":\"embedded communication\",\"url\":\"http:\/\/www.embedded-communication.com\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"http:\/\/www.embedded-communication.com\/#\/schema\/logo\/image\/\",\"url\":\"http:\/\/www.embedded-communication.com\/wp-content\/uploads\/2016\/08\/embedded-communication.png\",\"contentUrl\":\"http:\/\/www.embedded-communication.com\/wp-content\/uploads\/2016\/08\/embedded-communication.png\",\"width\":240,\"height\":240,\"caption\":\"embedded communication\"},\"image\":{\"@id\":\"http:\/\/www.embedded-communication.com\/#\/schema\/logo\/image\/\"},\"sameAs\":[\"https:\/\/x.com\/EmbeddedComm\"]},{\"@type\":\"Person\",\"@id\":\"http:\/\/www.embedded-communication.com\/#\/schema\/person\/24f46183ed01fe51931528c28674b9ee\",\"name\":\"Steffen Rose\",\"url\":\"http:\/\/www.embedded-communication.com\/en\/author\/ro\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Using UART3 as virtual COM on Nucleo-64 \/ STM32L476 - embedded communication","description":"(English) Switch the UART2 of the Nucle-64 board to the Arduino connector and use UART3 for the STLink virtual COM.","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":"http:\/\/www.embedded-communication.com\/misc\/english-using-uart3-as-virtual-com-on-nucleo-64-stm32l476\/","og_locale":"en_US","og_type":"article","og_title":"Using UART3 as virtual COM on Nucleo-64 \/ STM32L476 - embedded communication","og_description":"(English) Switch the UART2 of the Nucle-64 board to the Arduino connector and use UART3 for the STLink virtual COM.","og_url":"http:\/\/www.embedded-communication.com\/misc\/english-using-uart3-as-virtual-com-on-nucleo-64-stm32l476\/","og_site_name":"embedded communication","article_published_time":"2020-06-05T14:48:02+00:00","article_modified_time":"2021-05-11T11:49:52+00:00","og_image":[{"url":"http:\/\/www.embedded-communication.com\/wp-content\/uploads\/2020\/06\/nucleo_1-251x300.jpg","type":"","width":"","height":""}],"author":"Steffen Rose","twitter_card":"summary_large_image","twitter_creator":"@EmbeddedComm","twitter_site":"@EmbeddedComm","twitter_misc":{"Written by":"Steffen Rose","Est. reading time":"2 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"http:\/\/www.embedded-communication.com\/misc\/english-using-uart3-as-virtual-com-on-nucleo-64-stm32l476\/#article","isPartOf":{"@id":"http:\/\/www.embedded-communication.com\/misc\/english-using-uart3-as-virtual-com-on-nucleo-64-stm32l476\/"},"author":{"name":"Steffen Rose","@id":"http:\/\/www.embedded-communication.com\/#\/schema\/person\/24f46183ed01fe51931528c28674b9ee"},"headline":"Using UART3 as virtual COM on Nucleo-64 \/ STM32L476","datePublished":"2020-06-05T14:48:02+00:00","dateModified":"2021-05-11T11:49:52+00:00","mainEntityOfPage":{"@id":"http:\/\/www.embedded-communication.com\/misc\/english-using-uart3-as-virtual-com-on-nucleo-64-stm32l476\/"},"wordCount":177,"publisher":{"@id":"http:\/\/www.embedded-communication.com\/#organization"},"image":{"@id":"http:\/\/www.embedded-communication.com\/misc\/english-using-uart3-as-virtual-com-on-nucleo-64-stm32l476\/#primaryimage"},"thumbnailUrl":"http:\/\/www.embedded-communication.com\/wp-content\/uploads\/2020\/06\/nucleo_1-251x300.jpg","keywords":["Nucleo","printf","STM32","UART"],"articleSection":["Misc"],"inLanguage":"en-US"},{"@type":"WebPage","@id":"http:\/\/www.embedded-communication.com\/misc\/english-using-uart3-as-virtual-com-on-nucleo-64-stm32l476\/","url":"http:\/\/www.embedded-communication.com\/misc\/english-using-uart3-as-virtual-com-on-nucleo-64-stm32l476\/","name":"Using UART3 as virtual COM on Nucleo-64 \/ STM32L476 - embedded communication","isPartOf":{"@id":"http:\/\/www.embedded-communication.com\/#website"},"primaryImageOfPage":{"@id":"http:\/\/www.embedded-communication.com\/misc\/english-using-uart3-as-virtual-com-on-nucleo-64-stm32l476\/#primaryimage"},"image":{"@id":"http:\/\/www.embedded-communication.com\/misc\/english-using-uart3-as-virtual-com-on-nucleo-64-stm32l476\/#primaryimage"},"thumbnailUrl":"http:\/\/www.embedded-communication.com\/wp-content\/uploads\/2020\/06\/nucleo_1-251x300.jpg","datePublished":"2020-06-05T14:48:02+00:00","dateModified":"2021-05-11T11:49:52+00:00","description":"(English) Switch the UART2 of the Nucle-64 board to the Arduino connector and use UART3 for the STLink virtual COM.","breadcrumb":{"@id":"http:\/\/www.embedded-communication.com\/misc\/english-using-uart3-as-virtual-com-on-nucleo-64-stm32l476\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["http:\/\/www.embedded-communication.com\/misc\/english-using-uart3-as-virtual-com-on-nucleo-64-stm32l476\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"http:\/\/www.embedded-communication.com\/misc\/english-using-uart3-as-virtual-com-on-nucleo-64-stm32l476\/#primaryimage","url":"http:\/\/www.embedded-communication.com\/wp-content\/uploads\/2020\/06\/nucleo_1-251x300.jpg","contentUrl":"http:\/\/www.embedded-communication.com\/wp-content\/uploads\/2020\/06\/nucleo_1-251x300.jpg"},{"@type":"BreadcrumbList","@id":"http:\/\/www.embedded-communication.com\/misc\/english-using-uart3-as-virtual-com-on-nucleo-64-stm32l476\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Startseite","item":"http:\/\/www.embedded-communication.com\/"},{"@type":"ListItem","position":2,"name":"(English) Using UART3 as virtual COM on Nucleo-64 \/ STM32L476"}]},{"@type":"WebSite","@id":"http:\/\/www.embedded-communication.com\/#website","url":"http:\/\/www.embedded-communication.com\/","name":"embedded communication","description":"A blog about embedded communcation protocols.","publisher":{"@id":"http:\/\/www.embedded-communication.com\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"http:\/\/www.embedded-communication.com\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"http:\/\/www.embedded-communication.com\/#organization","name":"embedded communication","url":"http:\/\/www.embedded-communication.com\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"http:\/\/www.embedded-communication.com\/#\/schema\/logo\/image\/","url":"http:\/\/www.embedded-communication.com\/wp-content\/uploads\/2016\/08\/embedded-communication.png","contentUrl":"http:\/\/www.embedded-communication.com\/wp-content\/uploads\/2016\/08\/embedded-communication.png","width":240,"height":240,"caption":"embedded communication"},"image":{"@id":"http:\/\/www.embedded-communication.com\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/x.com\/EmbeddedComm"]},{"@type":"Person","@id":"http:\/\/www.embedded-communication.com\/#\/schema\/person\/24f46183ed01fe51931528c28674b9ee","name":"Steffen Rose","url":"http:\/\/www.embedded-communication.com\/en\/author\/ro\/"}]}},"_links":{"self":[{"href":"http:\/\/www.embedded-communication.com\/en\/wp-json\/wp\/v2\/posts\/918","targetHints":{"allow":["GET"]}}],"collection":[{"href":"http:\/\/www.embedded-communication.com\/en\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/www.embedded-communication.com\/en\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/www.embedded-communication.com\/en\/wp-json\/wp\/v2\/users\/8"}],"replies":[{"embeddable":true,"href":"http:\/\/www.embedded-communication.com\/en\/wp-json\/wp\/v2\/comments?post=918"}],"version-history":[{"count":15,"href":"http:\/\/www.embedded-communication.com\/en\/wp-json\/wp\/v2\/posts\/918\/revisions"}],"predecessor-version":[{"id":1096,"href":"http:\/\/www.embedded-communication.com\/en\/wp-json\/wp\/v2\/posts\/918\/revisions\/1096"}],"wp:attachment":[{"href":"http:\/\/www.embedded-communication.com\/en\/wp-json\/wp\/v2\/media?parent=918"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/www.embedded-communication.com\/en\/wp-json\/wp\/v2\/categories?post=918"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/www.embedded-communication.com\/en\/wp-json\/wp\/v2\/tags?post=918"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}