<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="https://devzone.nordicsemi.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/" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Suggestion USB CDC or CLI ?</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/52650/suggestion-usb-cdc-or-cli</link><description>I am developing a product and there is this situation. My custom board doesn&amp;#39;t have UART so I will have to communicate over a Virtual Serial COM Port. 
 I have a desktop app that sends a challenge (sort of a number) and I need nRF52840 to give a response</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Fri, 27 Sep 2019 09:54:05 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/52650/suggestion-usb-cdc-or-cli" /><item><title>RE: Suggestion USB CDC or CLI ?</title><link>https://devzone.nordicsemi.com/thread/212231?ContentTypeID=1</link><pubDate>Fri, 27 Sep 2019 09:54:05 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:659f9687-c1ca-4464-84ba-87d058bb7032</guid><dc:creator>Vipul_Saini</dc:creator><description>&lt;p&gt;Hey awneil, I have this similar question.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Thing is, I want to communicate my nrf52840 to PC through USB. Can you suggest some mechanism to access the USB receive buffer in main() in this example:&amp;nbsp;&lt;a href="https://infocenter.nordicsemi.com/topic/com.nordic.infocenter.sdk5.v15.3.0/usbd_cdc_acm_example.html?cp=5_1_4_6_50_3"&gt;https://infocenter.nordicsemi.com/topic/com.nordic.infocenter.sdk5.v15.3.0/usbd_cdc_acm_example.html?cp=5_1_4_6_50_3&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;The end goal is to make 2 functions that could be used in main() to read and write data to a USB host through virtual serial com port.&lt;/p&gt;
&lt;p&gt;Thanks&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Suggestion USB CDC or CLI ?</title><link>https://devzone.nordicsemi.com/thread/212225?ContentTypeID=1</link><pubDate>Fri, 27 Sep 2019 09:32:05 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:a111550a-a1fd-47aa-94d4-a7acfcf7d150</guid><dc:creator>awneil</dc:creator><description>[quote userid="6462" url="~/f/nordic-q-a/52650/suggestion-usb-cdc-or-cli/212222"]The wise choice would have been to have an accessible UART![/quote]
&lt;p&gt;See this thread for a whole load of suggestions on debug facilities to include in a design:&lt;/p&gt;
&lt;p&gt;&lt;a href="https://www.avrfreaks.net/forum/how-do-i-check-life-signs-scope-atmega2560-standalone"&gt;https://www.avrfreaks.net/forum/how-do-i-check-life-signs-scope-atmega2560-standalone&lt;/a&gt;&lt;/p&gt;
&lt;p style="padding-left:30px;"&gt;&lt;em&gt;&amp;quot;A key consideration of your design&amp;nbsp;from the outset&amp;nbsp;should be, &amp;#39;how will I debug this?&amp;#39; &amp;quot;&lt;/em&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Suggestion USB CDC or CLI ?</title><link>https://devzone.nordicsemi.com/thread/212222?ContentTypeID=1</link><pubDate>Fri, 27 Sep 2019 09:19:33 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:7afb50b0-0290-4def-8ad8-2abadee665e1</guid><dc:creator>awneil</dc:creator><description>[quote userid="82168" url="~/f/nordic-q-a/52650/suggestion-usb-cdc-or-cli/212213"]I mean that in my custom board I don&amp;#39;t have UART Pins[/quote]
&lt;p&gt;The UART can be assigned to &lt;em&gt;&lt;strong&gt;any&lt;/strong&gt;&lt;/em&gt; pins.&lt;/p&gt;
&lt;p&gt;As a standard design practice, &lt;em&gt;&lt;strong&gt;always&lt;/strong&gt; &lt;/em&gt;have a UART accessible - it is invaluable for debug!&lt;/p&gt;
[quote userid="82168" url="~/f/nordic-q-a/52650/suggestion-usb-cdc-or-cli/212213"]so I can&amp;#39;t use a debugger to communicate with it through nrf log[/quote]
&lt;p&gt;Not true - you can use RTT instead.&lt;/p&gt;
&lt;p&gt;&lt;a href="https://infocenter.nordicsemi.com/topic/ug_gsg_ses/UG/gsg/communicate.html"&gt;infocenter.nordicsemi.com/.../communicate.html&lt;/a&gt;&lt;/p&gt;
[quote userid="82168" url="~/f/nordic-q-a/52650/suggestion-usb-cdc-or-cli/212213"]should I use basic USB CDC and create some functions of my own or I should build on top of CLI[/quote]
&lt;p&gt;That&amp;#39;s really a design decision that only &lt;strong&gt;you&lt;/strong&gt; can make in the light of &lt;em&gt;&lt;strong&gt;your&lt;/strong&gt; &lt;/em&gt;particular requirements, resources, and constraints.&lt;/p&gt;
&lt;p&gt;Nobody else knows your&amp;nbsp;&lt;span&gt;particular requirements, resources, and constraints.&lt;/span&gt;&lt;/p&gt;
[quote userid="82168" url="~/f/nordic-q-a/52650/suggestion-usb-cdc-or-cli/212213"]Which is a wiser choice[/quote]
&lt;p&gt;The wise choice would have been to have an accessible UART!&lt;/p&gt;
&lt;p&gt;&lt;span class="emoticon" data-url="https://devzone.nordicsemi.com/cfs-file/__key/system/emoji/1f609.svg" title="Wink"&gt;&amp;#x1f609;&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Suggestion USB CDC or CLI ?</title><link>https://devzone.nordicsemi.com/thread/212213?ContentTypeID=1</link><pubDate>Fri, 27 Sep 2019 09:01:54 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:ad9de0ad-b2ee-4bd6-ac95-eb27c1f4a06d</guid><dc:creator>shockline</dc:creator><description>&lt;p&gt;I am sorry if I didn&amp;#39;t make it more clearer.&lt;/p&gt;
[quote userid="6462" url="~/f/nordic-q-a/52650/suggestion-usb-cdc-or-cli/212134"]What do you mean by that?[/quote]
&lt;p&gt;I mean that in my custom board I don&amp;#39;t have UART Pins so I can&amp;#39;t use a debugger to communicate with it through nrf log.&lt;/p&gt;
&lt;p&gt;I know CLI uses USB CDC as an underlying transport but I was asking should I use basic USB CDC and create some functions of my own or I should build on top of CLI. Which is a wiser choice ?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Suggestion USB CDC or CLI ?</title><link>https://devzone.nordicsemi.com/thread/212134?ContentTypeID=1</link><pubDate>Thu, 26 Sep 2019 19:46:11 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:06af0eec-dcc1-494d-a94e-c2151db4c4c7</guid><dc:creator>awneil</dc:creator><description>[quote userid="82168" url="~/f/nordic-q-a/52650/suggestion-usb-cdc-or-cli"]My custom board doesn&amp;#39;t have UART[/quote]
&lt;p&gt;What do you mean by that?&lt;/p&gt;
&lt;p&gt;The UART is part of the &lt;strong&gt;chip&lt;/strong&gt; - your board can&amp;#39;t remove it!&lt;/p&gt;
[quote userid="82168" url="~/f/nordic-q-a/52650/suggestion-usb-cdc-or-cli"]should I implement a something of my own based on USB CDC Example or should I use Command Line Interface[/quote]
&lt;p&gt;That&amp;#39;s not an either/or choice!&lt;/p&gt;
&lt;p&gt;The USB CDC is just a transport - so you will &lt;em&gt;&lt;strong&gt;also&lt;/strong&gt; &lt;/em&gt;need either the CLI or some other &amp;quot;handler&amp;quot; for the application comms ...&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>