<?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>FX2 checking if endpoit 6 is armed. How?</title><link>https://community.arm.com/developer/tools-software/tools/f/keil-forum/24208/fx2-checking-if-endpoit-6-is-armed-how</link><description> 
I&amp;#39;m trying to poll my device to see if EP6 Out is armed, just to
check if it is armed, not to actually transfer anything. I want to
use EP0 to check that and get a response in my host. 
Any clues? 
Gabriel Camiro 
 </description><dc:language>en-US</dc:language><generator>Telligent Community 10</generator><item><title>RE: FX2 checking if endpoit 6 is armed. How?</title><link>https://community.arm.com/thread/114176?ContentTypeID=1</link><pubDate>Tue, 09 Sep 2008 09:16:36 GMT</pubDate><guid isPermaLink="false">dd9e70c8-6d3c-4c71-b136-2456382a7b5c:45b40936-46a3-4f00-917c-d8682591c56d</guid><dc:creator>Gabriel Camiro</dc:creator><description>&lt;p&gt;&lt;p&gt;
Tsuneo,&lt;br /&gt;
Thanks a lot for this response.&lt;br /&gt;
It has been indeed helpful.&lt;br /&gt;
Regards,&lt;br /&gt;
Gabriel Camiro&lt;/p&gt;
&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: FX2 checking if endpoit 6 is armed. How?</title><link>https://community.arm.com/thread/100981?ContentTypeID=1</link><pubDate>Mon, 18 Aug 2008 23:18:35 GMT</pubDate><guid isPermaLink="false">dd9e70c8-6d3c-4c71-b136-2456382a7b5c:339fff78-3bdb-4cb6-a4d9-0145e542b13f</guid><dc:creator>Tsuneo Chinzei</dc:creator><description>&lt;p&gt;&lt;p&gt;
&lt;i&gt;&amp;quot;EP6 is configured as IN endpoint and Bulk.&lt;br /&gt;
I want only to Read from the host if the endpoint is armed.&lt;br /&gt;
...&lt;br /&gt;
My question is, if there is a register within FX2 that can determine
that.&amp;quot;&lt;/i&gt;&lt;/p&gt;

&lt;p&gt;
See this chapter of EZ-USB Technical Reference Manual (TRM)&lt;br /&gt;
8.6.2.3 EP2CS, EP4CS, EP6CS, EP8CS&lt;/p&gt;

&lt;p&gt;
EP6 has multiple buffers. Then, single ready flag is not enough to
show the state of these buffers. NPAK[2:0] on EP6CS indicates the
number of ready buffers. When EMPTY bit of EP6CS is set to &amp;#39;1&amp;#39;, there
is no ready buffer.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
On the TRM, they often use the ambiguous word &amp;quot;armed&amp;quot; to mean data is
ready on the endpoint. But I don&amp;#39;t think this is a good expression.
It will be misunderstood as &amp;quot;configured&amp;quot;. Just Cypress uses this
word, no other one on this field. &amp;quot;The endpoint is ready&amp;quot; or &amp;quot;loaded&amp;quot;
is the common expression.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;i&gt;&amp;quot;I figured that if I send a vendor command that would return via
EP0 an answer byte to the host to know if EP6 is armed or
not.&amp;quot;&lt;/i&gt;&lt;/p&gt;

&lt;p&gt;
Are you calling ReadFile synchronously on your host app?&lt;br /&gt;
Then, learn about asynchronous (OVERLAPPED) call.&lt;br /&gt;
It is the &lt;b&gt;must&lt;/b&gt; on USB programming on the host app.&lt;/p&gt;

&lt;p&gt;
Synchronous ReadFile blocks the thread on your host app, until the
endpoint is ready and the transfer finishes. In this reason, you need
to know if it is ready or not. However, OVERLAPPED ReadFile doesn&amp;#39;t
block the thread. It completes when the transfer finishes, and your
app is notified by the completion callback (ReadFileEx) or the
OVERLAPPED event or Wait-API (WaitForSingleObject, etc). For USB
programming, there is no difference from usual OVERLAPPED file
access.&lt;/p&gt;

&lt;p&gt;
Tsuneo&lt;/p&gt;
&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: FX2 checking if endpoit 6 is armed. How?</title><link>https://community.arm.com/thread/76581?ContentTypeID=1</link><pubDate>Mon, 18 Aug 2008 15:56:37 GMT</pubDate><guid isPermaLink="false">dd9e70c8-6d3c-4c71-b136-2456382a7b5c:10fa309e-417d-4f13-a0a7-c5afddcd28ff</guid><dc:creator>Gabriel Camiro</dc:creator><description>&lt;p&gt;&lt;p&gt;
It is FX2.&lt;br /&gt;
What I want to know is if there is a register in the FX2 that would
determine if and en endpoint is armed.&lt;br /&gt;
EP6 is configured as IN endpoint and Bulk.&lt;br /&gt;
I want only to Read from the host if the endpoint is armed.&lt;br /&gt;
I figured that if I send a vendor command that would return via EP0
an answer byte to the host to know if EP6 is armed or not.&lt;br /&gt;
My question is, if there is a register within FX2 that can determine
that.&lt;/p&gt;
&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: FX2 checking if endpoit 6 is armed. How?</title><link>https://community.arm.com/thread/52232?ContentTypeID=1</link><pubDate>Mon, 18 Aug 2008 13:03:47 GMT</pubDate><guid isPermaLink="false">dd9e70c8-6d3c-4c71-b136-2456382a7b5c:eb32c032-5970-4ae5-820b-1510b0074dfb</guid><dc:creator>Tsuneo Chinzei</dc:creator><description>&lt;p&gt;&lt;p&gt;
I believe you are talking about Cypress EZ-USB FX2(LP).&lt;br /&gt;
Aren&amp;#39;t you?&lt;/p&gt;

&lt;p&gt;
a) What is the USB class implemented on the device?&lt;/p&gt;

&lt;p&gt;
b) Is EP6 declared in any endpoint descriptor?&lt;/p&gt;

&lt;p&gt;
c) Can you replace the firmware on the FX2, for the customization
of this task? Or, you have to do this job without any customization
on the FX firmware, just on the host app (or device driver) side?&lt;/p&gt;

&lt;p&gt;
Tsuneo&lt;/p&gt;
&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>