<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>MCUXpresso SDKのトピックRe: Questions about SDK 2.3.1 USB CDC VCOM Example</title>
    <link>https://community.nxp.com/t5/MCUXpresso-SDK/Questions-about-SDK-2-3-1-USB-CDC-VCOM-Example/m-p/762180#M641</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi &lt;A _jive_internal="true" class="" data-content-finding="Community" data-userid="40376" data-username="Keith4DSmith" href="https://community.nxp.com/people/Keith4DSmith"&gt;Keith Smith&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;We are busy at testing SDK2.4.0 now, which will be released very soon. Could you please give more details about the typos in the USB middle ware files?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Daniel&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 09 May 2018 07:08:16 GMT</pubDate>
    <dc:creator>danielchen</dc:creator>
    <dc:date>2018-05-09T07:08:16Z</dc:date>
    <item>
      <title>Questions about SDK 2.3.1 USB CDC VCOM Example</title>
      <link>https://community.nxp.com/t5/MCUXpresso-SDK/Questions-about-SDK-2-3-1-USB-CDC-VCOM-Example/m-p/762177#M638</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I have questions&amp;nbsp;about the &lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt;USB CDC VCOM&lt;/SPAN&gt;&amp;nbsp;FreeRTOS example as well as the USB Middleware stack.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The example is basically a&amp;nbsp;poll&amp;nbsp;loop in the main application waiting for USB data, one character at a time. I would like to have the application wait for a fully formed message. My questions below are to clarify my understanding of the USB stack to remove the polling in favor of a 'wait for message'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1 - It appears that the&amp;nbsp;CDC class receives&amp;nbsp;one character at time.&lt;/P&gt;&lt;P&gt;Is this correct?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;There is&amp;nbsp;a configuration file, &lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt;usb_device_config.h&lt;/SPAN&gt;, which is provided for each USB example.&lt;/P&gt;&lt;P&gt;All the defines are &lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt;#define USB_DEVICE_CONFIG_xxx&lt;/SPAN&gt;.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;2 - The &lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt;#define&amp;nbsp;USB_DEVICE_CONFIG_USE_TASK&lt;/SPAN&gt;&amp;nbsp;(1) is used to&amp;nbsp;configure the USB stack to run in its own task.&lt;/P&gt;&lt;P&gt;The design of the &lt;SPAN style="font-family: helvetica, arial, sans-serif;"&gt;cdc&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt;&lt;SPAN style="font-family: helvetica, arial, sans-serif;"&gt;callback,&lt;/SPAN&gt;&amp;nbsp;&lt;SPAN&gt;USB_DeviceCdcVcomCallback()&lt;SPAN style="font-family: helvetica, arial, sans-serif;"&gt;,&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN style="font-family: helvetica, arial, sans-serif;"&gt; in&lt;/SPAN&gt; virtual_com.&amp;lt;c,h&amp;gt;&lt;/SPAN&gt; is such that regardless of the value of &lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt;USB_DEVICE_CONFIG_USE_TASK&lt;/SPAN&gt;,&amp;nbsp;&amp;nbsp;&lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt;USB_DeviceCdcVcomCallback()&lt;/SPAN&gt; is called to handle the CDC class events.&lt;/P&gt;&lt;P&gt;In the non-task case,&amp;nbsp;&lt;SPAN&gt;&lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt;USB_DeviceCdcVcomCallback()&lt;/SPAN&gt; is called from within the USB IRQ context.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;In the task case,&amp;nbsp;&lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt;USB_DeviceCdcVcomCallback()&lt;/SPAN&gt; is called&amp;nbsp;within the USB task context.&amp;nbsp;[The USB IRQ issues a FreeRTOS &lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt;xQueueSendToBackFromISR()&lt;/SPAN&gt; message from &lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt;USB_OsaMsgqSend()&lt;/SPAN&gt; to the USB task to handle the cdc class events.]&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;Is this correct?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;3- In&amp;nbsp;&lt;SPAN&gt;&lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt;USB_DeviceCdcVcomCallback()&lt;/SPAN&gt;, there are two events, &lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt;kUSB_DeviceCdcEventSendResponse&lt;/SPAN&gt;, and&amp;nbsp;&lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt;kUSB_DeviceCdcEventRecvResponse&lt;/SPAN&gt;.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;It would appear that any data handling or additional messages to another task to handle the USB data stream would be placed in these case statements.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Is this correct?&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;There is a comment&amp;nbsp;in the &lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt;kUSB_DeviceCdcEventSendResponse&amp;nbsp;&lt;/SPAN&gt;case &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #00ff00;"&gt;&lt;SPAN style="color: #339966;"&gt;/* User: add your own code for send complete event */&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt;but not such a comment for the&amp;nbsp;&lt;SPAN style="color: #3d3d3d;"&gt;&lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt;kUSB_DeviceCdcEventRecvResponse&lt;/SPAN&gt; case.&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;4 - If a FreeRTOS message is sent from these two cases, then the &lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt;#define&amp;nbsp;USB_DEVICE_CONFIG_USE_TASK&lt;/SPAN&gt; would have to select between &lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt;SendFromISR&lt;/SPAN&gt; or &lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt;Send&lt;/SPAN&gt;, as the context of&amp;nbsp;&lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt;USB_DeviceCdcVcomCallback()&lt;/SPAN&gt; changes.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Is this correct?&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;[BTW, there are many typos in the comments in just about every USB middleware file. Using Eclipse, the typos are automatically highlighted. Some typos are difficult to understand, did the author mean 'reserved' or 'reversed'?]&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 24 Apr 2018 14:31:15 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MCUXpresso-SDK/Questions-about-SDK-2-3-1-USB-CDC-VCOM-Example/m-p/762177#M638</guid>
      <dc:creator>Keith4DSmith</dc:creator>
      <dc:date>2018-04-24T14:31:15Z</dc:date>
    </item>
    <item>
      <title>Re: Questions about SDK 2.3.1 USB CDC VCOM Example</title>
      <link>https://community.nxp.com/t5/MCUXpresso-SDK/Questions-about-SDK-2-3-1-USB-CDC-VCOM-Example/m-p/762178#M639</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Nice questions.&amp;nbsp; It's a shame no-one from NXP cares to answer them...&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 04 May 2018 04:07:12 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MCUXpresso-SDK/Questions-about-SDK-2-3-1-USB-CDC-VCOM-Example/m-p/762178#M639</guid>
      <dc:creator>geoffsokoll</dc:creator>
      <dc:date>2018-05-04T04:07:12Z</dc:date>
    </item>
    <item>
      <title>Re: Questions about SDK 2.3.1 USB CDC VCOM Example</title>
      <link>https://community.nxp.com/t5/MCUXpresso-SDK/Questions-about-SDK-2-3-1-USB-CDC-VCOM-Example/m-p/762179#M640</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Keith:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For question 1:&lt;/P&gt;&lt;P&gt;It appears that the&amp;nbsp;CDC class receives&amp;nbsp;one character at time.Is this correct?&lt;/P&gt;&lt;P&gt;[Daniel]:CDC class can send and receive a buffer at one time, not only a character.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For question 2:&amp;nbsp; &lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt;#define&amp;nbsp;USB_DEVICE_CONFIG_USE_TASK&lt;/SPAN&gt;&amp;nbsp;(1) is used to&amp;nbsp;configure the USB stack to run in its own task, Is this correct?&lt;/P&gt;&lt;P&gt;[Daniel]: &lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;If&amp;nbsp; &lt;SPAN style="font-size: 12.0pt;"&gt;USB_DEVICE_CONFIG_USE_TASK &lt;/SPAN&gt;is 0 &amp;nbsp;&amp;nbsp; , it means when USB_DeviceCdcVcomCallback is serviced, cpu is in interrupted mode.&lt;/P&gt;&lt;P&gt;If&amp;nbsp; USB_DEVICE_CONFIG_USE_TASK is 1,CPU is in normal mode.&lt;/P&gt;&lt;P&gt;In other words, this macro is defined to check whether the callback is trigger by a task, or by an interrupt.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Daniel&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 08 May 2018 07:43:01 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MCUXpresso-SDK/Questions-about-SDK-2-3-1-USB-CDC-VCOM-Example/m-p/762179#M640</guid>
      <dc:creator>danielchen</dc:creator>
      <dc:date>2018-05-08T07:43:01Z</dc:date>
    </item>
    <item>
      <title>Re: Questions about SDK 2.3.1 USB CDC VCOM Example</title>
      <link>https://community.nxp.com/t5/MCUXpresso-SDK/Questions-about-SDK-2-3-1-USB-CDC-VCOM-Example/m-p/762180#M641</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi &lt;A _jive_internal="true" class="" data-content-finding="Community" data-userid="40376" data-username="Keith4DSmith" href="https://community.nxp.com/people/Keith4DSmith"&gt;Keith Smith&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;We are busy at testing SDK2.4.0 now, which will be released very soon. Could you please give more details about the typos in the USB middle ware files?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Daniel&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 09 May 2018 07:08:16 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MCUXpresso-SDK/Questions-about-SDK-2-3-1-USB-CDC-VCOM-Example/m-p/762180#M641</guid>
      <dc:creator>danielchen</dc:creator>
      <dc:date>2018-05-09T07:08:16Z</dc:date>
    </item>
  </channel>
</rss>

