<?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>topic Re: RT1062 USB CDC Host Customization Example in i.MX Processors</title>
    <link>https://community.nxp.com/t5/i-MX-Processors/RT1062-USB-CDC-Host-Customization-Example/m-p/1528473#M195641</link>
    <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.nxp.com/t5/user/viewprofilepage/user-id/199889"&gt;@kennethkong852&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;
&lt;P&gt;The USB CDC host example is used to interface with a VCOM device. There isn't other example which can interface with other kind of CDC device. You can modify this example to fit with your power meter. In host_cdc.c, from line 645 to line 694 is to check the device's type. The first for...loop is to check Community Interface Class and the second for...loop is to check the Data Interface Class. You can modify&amp;nbsp;USB_HOST_CDC_DATA_CLASS_CODE to see if it can be supported.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Regards,&lt;/P&gt;
&lt;P&gt;Jing&lt;/P&gt;</description>
    <pubDate>Tue, 27 Sep 2022 02:50:03 GMT</pubDate>
    <dc:creator>jingpan</dc:creator>
    <dc:date>2022-09-27T02:50:03Z</dc:date>
    <item>
      <title>RT1062 USB CDC Host Customization Example</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/RT1062-USB-CDC-Host-Customization-Example/m-p/1525322#M195394</link>
      <description>&lt;P&gt;Hello!&lt;/P&gt;&lt;P&gt;I am currently looking into interfacing my RT1062 with a power meter, which is a USB CDC device.&amp;nbsp; However, this device is using USB Interface's Base Class = 0x00.&amp;nbsp; It means that the actual USB Class type is subsequently defined by its Interface Class.&amp;nbsp; Using USBView to view the bInterfaceClass value, I was able to confirm that this device is of CDC Class:&lt;/P&gt;&lt;LI-CODE lang="c"&gt;          ===&amp;gt;Interface Descriptor&amp;lt;===
bLength:                           0x09
bDescriptorType:                   0x04
bInterfaceNumber:                  0x00
bAlternateSetting:                 0x00
bNumEndpoints:                     0x03
bInterfaceClass:                   0x02  -&amp;gt; This is Communications (CDC Control) USB Device Interface Class
bInterfaceSubClass:                0x02
bInterfaceProtocol:                0x01&lt;/LI-CODE&gt;&lt;P&gt;Both the Interface Class and Interface SubClass are 0x02.&lt;/P&gt;&lt;P&gt;The issue with this particular device is that it does not use any CDC Data Class (0x0A).&amp;nbsp; Looking through the SDK example usb_cdc_host, it seems that the example functions by relying on the fact that the device needs to provide the Data Class in addition to the Control Class.&lt;/P&gt;&lt;P&gt;As of now, whenever I connect the power meter to my RT1060 EVK with the usb_cdc_host programmed, terminal will report 'device not supported.'&lt;/P&gt;&lt;P&gt;Is there any additional SDK example that would allow a device like this power meter that I am attempting to connect with to work with my RT1062 processor, which is set up as the USB CDC Host?&lt;/P&gt;&lt;P&gt;Any pointer or resource would be greatly appreciated!&lt;/P&gt;&lt;P&gt;Thank you,&lt;/P&gt;&lt;P&gt;Kenneth&lt;/P&gt;</description>
      <pubDate>Wed, 21 Sep 2022 00:58:51 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/RT1062-USB-CDC-Host-Customization-Example/m-p/1525322#M195394</guid>
      <dc:creator>kennethkong852</dc:creator>
      <dc:date>2022-09-21T00:58:51Z</dc:date>
    </item>
    <item>
      <title>Re: RT1062 USB CDC Host Customization Example</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/RT1062-USB-CDC-Host-Customization-Example/m-p/1528473#M195641</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.nxp.com/t5/user/viewprofilepage/user-id/199889"&gt;@kennethkong852&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;
&lt;P&gt;The USB CDC host example is used to interface with a VCOM device. There isn't other example which can interface with other kind of CDC device. You can modify this example to fit with your power meter. In host_cdc.c, from line 645 to line 694 is to check the device's type. The first for...loop is to check Community Interface Class and the second for...loop is to check the Data Interface Class. You can modify&amp;nbsp;USB_HOST_CDC_DATA_CLASS_CODE to see if it can be supported.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Regards,&lt;/P&gt;
&lt;P&gt;Jing&lt;/P&gt;</description>
      <pubDate>Tue, 27 Sep 2022 02:50:03 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/RT1062-USB-CDC-Host-Customization-Example/m-p/1528473#M195641</guid>
      <dc:creator>jingpan</dc:creator>
      <dc:date>2022-09-27T02:50:03Z</dc:date>
    </item>
    <item>
      <title>Re: RT1062 USB CDC Host Customization Example</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/RT1062-USB-CDC-Host-Customization-Example/m-p/1529706#M195756</link>
      <description>&lt;P&gt;Thank you!&amp;nbsp; I was able to modify and it supported the particular device I was attempting to interface with!&lt;/P&gt;&lt;P&gt;Much appreciated for the information!&lt;/P&gt;&lt;P&gt;Now the follow up question is as follows:&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;I have reserved OTG1 for some other task and the only available one is OTG2 now&lt;/LI&gt;&lt;LI&gt;Can I possibly set up OTG2 such that it can support either MSD or CDC Host depending on what device gets plugged in to the OTG2 port?&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;Thank you!&lt;/P&gt;</description>
      <pubDate>Wed, 28 Sep 2022 17:50:05 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/RT1062-USB-CDC-Host-Customization-Example/m-p/1529706#M195756</guid>
      <dc:creator>kennethkong852</dc:creator>
      <dc:date>2022-09-28T17:50:05Z</dc:date>
    </item>
    <item>
      <title>Re: RT1062 USB CDC Host Customization Example</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/RT1062-USB-CDC-Host-Customization-Example/m-p/1529967#M195768</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.nxp.com/t5/user/viewprofilepage/user-id/199889"&gt;@kennethkong852&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;
&lt;P&gt;Yes, you can. You can refer to the host_keyboard2mouse_bm demo for how to make a composite host.&lt;/P&gt;
&lt;P&gt;To use OTG2, you can set&amp;nbsp;controllerId to&amp;nbsp;kUSB_ControllerEhci1.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Regards,&lt;/P&gt;
&lt;P&gt;Jing&lt;/P&gt;</description>
      <pubDate>Thu, 29 Sep 2022 02:23:26 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/RT1062-USB-CDC-Host-Customization-Example/m-p/1529967#M195768</guid>
      <dc:creator>jingpan</dc:creator>
      <dc:date>2022-09-29T02:23:26Z</dc:date>
    </item>
    <item>
      <title>Re: RT1062 USB CDC Host Customization Example</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/RT1062-USB-CDC-Host-Customization-Example/m-p/1530689#M195836</link>
      <description>&lt;P&gt;Hi Jing,&lt;/P&gt;&lt;P&gt;Thank you for the info!&amp;nbsp; I hope I didn't make it confusing...&lt;/P&gt;&lt;P&gt;What I was trying to say was that I wish to set up OTG2 (controllerId = kUSB_ControllerEhci1) to support different devices plugged in (for example, a flash memory stick drive or a cdc device like the power meter as described previously).&amp;nbsp;&lt;/P&gt;&lt;P&gt;In this case, do I just need 1 count of g_hostHandle overall in my project (even though I have two different host types)?&amp;nbsp;&lt;/P&gt;&lt;P&gt;And within the USB_HostEvent(), do I need to call both&amp;nbsp;USB_HostMsdEvent() and&amp;nbsp;USB_HostCdcEvent() in these cases:&amp;nbsp;&lt;BR /&gt;kUSB_HostEventAttach,&amp;nbsp;kUSB_HostEventEnumerationDone,&amp;nbsp;kUSB_HostEventDetach&lt;/P&gt;&lt;P&gt;Thank you once again!&lt;/P&gt;&lt;P&gt;-Ken&lt;/P&gt;</description>
      <pubDate>Thu, 29 Sep 2022 18:47:30 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/RT1062-USB-CDC-Host-Customization-Example/m-p/1530689#M195836</guid>
      <dc:creator>kennethkong852</dc:creator>
      <dc:date>2022-09-29T18:47:30Z</dc:date>
    </item>
    <item>
      <title>Re: RT1062 USB CDC Host Customization Example</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/RT1062-USB-CDC-Host-Customization-Example/m-p/1530899#M195849</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.nxp.com/t5/user/viewprofilepage/user-id/199889"&gt;@kennethkong852&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Q:&amp;nbsp; do I just need 1 count of g_hostHandle overall in my projec?&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;A: yes&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Q: And within the USB_HostEvent(), do I need to call both&amp;nbsp;USB_HostMsdEvent() and&amp;nbsp;USB_HostCdcEvent() in these cases?&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;A: yes. You can refer to the example.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Regards,&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Jing&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 30 Sep 2022 06:13:29 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/RT1062-USB-CDC-Host-Customization-Example/m-p/1530899#M195849</guid>
      <dc:creator>jingpan</dc:creator>
      <dc:date>2022-09-30T06:13:29Z</dc:date>
    </item>
    <item>
      <title>Re: RT1062 USB CDC Host Customization Example</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/RT1062-USB-CDC-Host-Customization-Example/m-p/1531868#M195926</link>
      <description>&lt;P&gt;Thank you very much! I have gotten both CDC and MSD hosts on same USB port/controller! &lt;LI-EMOJI id="lia_slightly-smiling-face" title=":slightly_smiling_face:"&gt;&lt;/LI-EMOJI&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 04 Oct 2022 01:36:00 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/RT1062-USB-CDC-Host-Customization-Example/m-p/1531868#M195926</guid>
      <dc:creator>kennethkong852</dc:creator>
      <dc:date>2022-10-04T01:36:00Z</dc:date>
    </item>
    <item>
      <title>Re: RT1062 USB CDC Host Customization Example</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/RT1062-USB-CDC-Host-Customization-Example/m-p/1531869#M195927</link>
      <description>&lt;P&gt;Jing,&lt;/P&gt;&lt;P&gt;Thank you so much! I have finally gotten both my CDC &amp;amp; MSD Hosts work on same USB controller!&lt;/P&gt;&lt;P&gt;Best Regards,&lt;/P&gt;&lt;P&gt;Kenneth&lt;/P&gt;</description>
      <pubDate>Tue, 04 Oct 2022 01:37:46 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/RT1062-USB-CDC-Host-Customization-Example/m-p/1531869#M195927</guid>
      <dc:creator>kennethkong852</dc:creator>
      <dc:date>2022-10-04T01:37:46Z</dc:date>
    </item>
  </channel>
</rss>

