<?xml-stylesheet type="text/xsl" href="https://community.element14.com/cfs-file/__key/system/syndication/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/"><channel><title>help: how do I use the Pico USB as COM port, with support for RX interrupt?</title><link>/products/raspberry-pi/raspberrypi_projects/b/blog/posts/help-how-do-i-use-the-pico-usb-as-com-port-with-support-for-rx-interrupt</link><description>I know how to use plain UART on the Pico, with receive interrupt. See advanced_uart.c .
I also know how to make the UART show and work as a COM device. See hello_usb makefile .
I&amp;#39;m looking for help on the following: use the USB as a COM, and ...</description><dc:language>en-US</dc:language><generator>Telligent Community 12</generator><item><title>RE: help: how do I use the Pico USB as COM port, with support for RX interrupt?</title><link>https://community.element14.com/products/raspberry-pi/raspberrypi_projects/b/blog/posts/help-how-do-i-use-the-pico-usb-as-com-port-with-support-for-rx-interrupt</link><pubDate>Wed, 19 Oct 2022 21:33:14 GMT</pubDate><guid isPermaLink="false">93d5dcb4-84c2-446f-b2cb-99731719e767:611541ae-8696-4aa6-8a29-b0fc8ca3bf4c</guid><dc:creator>Jan Cumps</dc:creator><slash:comments>0</slash:comments><description>&lt;p&gt;current status: a compromise:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;If the UART library is linked (&lt;span&gt;#if&lt;/span&gt;&lt;span&gt; &lt;/span&gt;&lt;span&gt;LIB_PICO_STDIO_UART&lt;/span&gt;), I make my code use the interrupt version.&lt;/li&gt;
&lt;li&gt;If the USB library is linked (&lt;span&gt;#if&lt;/span&gt;&lt;span&gt; LIB_PICO_STDIO_USB&lt;/span&gt;), I make my code use a polling task (check character, no wait if none available), and then a 50 ms yield for other processes.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;It&amp;#39;s not what I&amp;#39;m looking for. I may be able to make an interrupt driven USB serial device project. But what I learned today, is that there&amp;#39;s no short path for that. I need to learn the low level USB APIs.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;&lt;img src="https://community.element14.com/aggbug?PostID=24618&amp;AppID=84&amp;AppType=Weblog&amp;ContentType=0" width="1" height="1"&gt;</description></item><item><title>RE: help: how do I use the Pico USB as COM port, with support for RX interrupt?</title><link>https://community.element14.com/products/raspberry-pi/raspberrypi_projects/b/blog/posts/help-how-do-i-use-the-pico-usb-as-com-port-with-support-for-rx-interrupt</link><pubDate>Wed, 19 Oct 2022 19:56:45 GMT</pubDate><guid isPermaLink="false">93d5dcb4-84c2-446f-b2cb-99731719e767:611541ae-8696-4aa6-8a29-b0fc8ca3bf4c</guid><dc:creator>Jan Cumps</dc:creator><slash:comments>1</slash:comments><description>&lt;p&gt;Oki:&lt;/p&gt;
&lt;p&gt;&lt;img src="/resized-image/__size/1280x720/__key/commentfiles/f7d226abd59f475c9d224a79e3f0ec07-611541ae-8696-4aa6-8a29-b0fc8ca3bf4c/pastedimage1666209289658v1.png" alt=" " /&gt;&lt;/p&gt;
&lt;p&gt;It registers an exclusive service handler. If I try to and add a shared interrupt handler, I get an assert.&lt;/p&gt;&lt;img src="https://community.element14.com/aggbug?PostID=24618&amp;AppID=84&amp;AppType=Weblog&amp;ContentType=0" width="1" height="1"&gt;</description></item><item><title>RE: help: how do I use the Pico USB as COM port, with support for RX interrupt?</title><link>https://community.element14.com/products/raspberry-pi/raspberrypi_projects/b/blog/posts/help-how-do-i-use-the-pico-usb-as-com-port-with-support-for-rx-interrupt</link><pubDate>Wed, 19 Oct 2022 15:36:17 GMT</pubDate><guid isPermaLink="false">93d5dcb4-84c2-446f-b2cb-99731719e767:611541ae-8696-4aa6-8a29-b0fc8ca3bf4c</guid><dc:creator>baldengineer</dc:creator><slash:comments>1</slash:comments><description>&lt;p&gt;Are you talking about using the SDK&amp;#39;s stdio or are you creating a second CDC device? If it is a second CDC case, then I think you want to poke into the interrupts that TinyUSB generates.&lt;/p&gt;
&lt;p&gt;This &lt;a href="https://forums.raspberrypi.com/viewtopic.php?t=333027" rel="noopener noreferrer" target="_blank"&gt;thread on the Pi forums&lt;/a&gt; has some points to consider.&lt;/p&gt;&lt;img src="https://community.element14.com/aggbug?PostID=24618&amp;AppID=84&amp;AppType=Weblog&amp;ContentType=0" width="1" height="1"&gt;</description></item><item><title>RE: help: how do I use the Pico USB as COM port, with support for RX interrupt?</title><link>https://community.element14.com/products/raspberry-pi/raspberrypi_projects/b/blog/posts/help-how-do-i-use-the-pico-usb-as-com-port-with-support-for-rx-interrupt</link><pubDate>Wed, 19 Oct 2022 12:05:13 GMT</pubDate><guid isPermaLink="false">93d5dcb4-84c2-446f-b2cb-99731719e767:611541ae-8696-4aa6-8a29-b0fc8ca3bf4c</guid><dc:creator>misaz</dc:creator><slash:comments>0</slash:comments><description>&lt;p&gt;I have not tried it but most probably you can change USB interrupt vector to your own vector. In your handler at the begining call original interrupt handler and after it completes check for new data.&lt;/p&gt;&lt;img src="https://community.element14.com/aggbug?PostID=24618&amp;AppID=84&amp;AppType=Weblog&amp;ContentType=0" width="1" height="1"&gt;</description></item></channel></rss>