<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="https://community.arm.com/utility/feedstylesheets/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>USB-CDC</title><link>https://community.arm.com/developer/tools-software/tools/f/keil-forum/25415/usb-cdc</link><description> 
Hi im currently working on USB drivers for LP2468 MCU.I want to
send data to the host PC as fast as I can.Since i dont have much
knowledge on USB HID development on the PC end Ive decided to
implement USBCDC class which will appear as a virtual comport</description><dc:language>en-US</dc:language><generator>Telligent Community 10</generator><item><title>RE: USB-CDC</title><link>https://community.arm.com/thread/130606?ContentTypeID=1</link><pubDate>Fri, 18 Jun 2010 09:22:54 GMT</pubDate><guid isPermaLink="false">dd9e70c8-6d3c-4c71-b136-2456382a7b5c:11e26196-30bf-4c27-9c71-a71c22ef455c</guid><dc:creator>daniel A.</dc:creator><description>&lt;p&gt;&lt;p&gt;
Hello,&lt;/p&gt;

&lt;p&gt;
From the MCB2300 USBCDC example I&amp;#39;m trying to write a CDC driver
but since I can ready any incoming character, there&amp;#39;s no way for me
to get the CDC_BulkIn function called on the Endpoint2.&lt;/p&gt;

&lt;p&gt;
As far as I can see from the example, whenever a character is read
from the UART there&amp;#39;s a call to USB_WriteEP but what I want is that
the CDC_BulkIn function is called automatically requesting data from
my internal buffer.&lt;/p&gt;

&lt;p&gt;
Is there any &amp;#39;straightforward&amp;#39; way to modify this example in order
to get a &amp;#39;simple&amp;#39; virtual com driver?&lt;/p&gt;

&lt;p&gt;
Thanks and best regards,&lt;br /&gt;
Daniel&lt;/p&gt;
&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: USB-CDC</title><link>https://community.arm.com/thread/126007?ContentTypeID=1</link><pubDate>Thu, 25 Feb 2010 04:25:30 GMT</pubDate><guid isPermaLink="false">dd9e70c8-6d3c-4c71-b136-2456382a7b5c:152c7518-fd65-4fb1-8148-655255c015c5</guid><dc:creator>Tamir Michael</dc:creator><description>&lt;p&gt;&lt;p&gt;
My pleasure.&lt;/p&gt;
&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: USB-CDC</title><link>https://community.arm.com/thread/115574?ContentTypeID=1</link><pubDate>Thu, 25 Feb 2010 02:57:31 GMT</pubDate><guid isPermaLink="false">dd9e70c8-6d3c-4c71-b136-2456382a7b5c:02ee551c-18ea-4e9c-b60e-918ccd9ddbb6</guid><dc:creator>Hansen Dsouza</dc:creator><description>&lt;p&gt;&lt;p&gt;
Yeah i think that hit it...Its working with good speed now thanks
so much&lt;/p&gt;
&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: USB-CDC</title><link>https://community.arm.com/thread/103797?ContentTypeID=1</link><pubDate>Thu, 25 Feb 2010 02:24:44 GMT</pubDate><guid isPermaLink="false">dd9e70c8-6d3c-4c71-b136-2456382a7b5c:81591498-a63f-471d-8f19-d490a6021010</guid><dc:creator>Tamir Michael</dc:creator><description>&lt;p&gt;&lt;p&gt;
&lt;i&gt;Also i would like to point out that when iam directly writing
to writeEP the call back function CDC_BulkIn (); gets called. Please
suggest how do i get over this issue.&lt;/i&gt;&lt;/p&gt;

&lt;p&gt;
this is not an issue at all but normal behavior. did you not
figure that out from my first post? I posted:&lt;/p&gt;

&lt;p&gt;
&lt;b&gt;Once you &amp;#39;USB_WriteEP&amp;#39;, you can expect &amp;#39;BulkIn&amp;#39; callbacks until
you transmitted all the data&lt;/b&gt;&lt;/p&gt;

&lt;p&gt;
yes?&lt;/p&gt;

&lt;p&gt;
if &amp;#39;CDC_BulkOut&amp;#39; is not called then you probably changed your USB
stack somehow or your connection is not alive.&lt;/p&gt;
&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: USB-CDC</title><link>https://community.arm.com/thread/78134?ContentTypeID=1</link><pubDate>Thu, 25 Feb 2010 02:18:40 GMT</pubDate><guid isPermaLink="false">dd9e70c8-6d3c-4c71-b136-2456382a7b5c:379e250a-a7b1-45ff-93f4-fd17cc3ae64b</guid><dc:creator>Hansen Dsouza</dc:creator><description>&lt;p&gt;&lt;p&gt;
Hi thanks for your pointing that out,following which i have made
modified my code as below&lt;/p&gt;

&lt;p&gt;
In my custom USB_write I fill the bytes to be transmitted in a
global buffer.&lt;br /&gt;
When the call back even from usb stack is triggered.I send my buffer
on USB using writeEP in CDC_BulkIn(); and i clear the counters to
indicate my buffer is empty again.&lt;/p&gt;

&lt;p&gt;
void USB_EndPoint2 (DWORD event) {&lt;/p&gt;

&lt;p&gt;
switch (event) { case USB_EVT_OUT: CDC_BulkOut (); /* data
received from Host */ break; case USB_EVT_IN: CDC_BulkIn (); /* data
expected from Host */ break; }&lt;br /&gt;
}&lt;/p&gt;

&lt;p&gt;
However im facing the following problem&lt;br /&gt;
USB_EndPoint2 call back function is not being called
automatically.Hence CDC_bulkin(); doesnt get called.Also i would like
to point out that when iam directly writing to writeEP the call back
function CDC_BulkIn (); gets called.&lt;br /&gt;
Please suggest how do i get over this issue.&lt;/p&gt;
&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: USB-CDC</title><link>https://community.arm.com/thread/57794?ContentTypeID=1</link><pubDate>Wed, 24 Feb 2010 23:41:03 GMT</pubDate><guid isPermaLink="false">dd9e70c8-6d3c-4c71-b136-2456382a7b5c:7864d558-865b-479f-9040-158e8f78cb71</guid><dc:creator>Tamir Michael</dc:creator><description>&lt;p&gt;&lt;p&gt;
My advise to you is simple: stop the spaghettization of the sample
code. Revert back to the original sample and dp not comment anything
without fully understanding what the implication would be. Remember
that when you act as a device, USB is still a host driven bus - so
you should never &amp;#39;USB_WriteEP&amp;#39; unless the host addressed your device
using the &amp;#39;BulkOut&amp;#39; callback (you can reply from other pieces of the
program, of couse). Once you &amp;#39;USB_WriteEP&amp;#39;, you can expect &amp;#39;BulkIn&amp;#39;
callbacks until you transmitted all the data.&lt;/p&gt;
&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>