<?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>nRF52840 USB Cancel IN Transfer</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/44117/nrf52840-usb-cancel-in-transfer</link><description>I am working on the Mbed-OS HAL implementation for the nRF52840 USB device. 
 I have it almost passing all the automated tests. One where it fails is when the Mbed test suite attempts to halt an endpoint. 
 Essentially the test works like this: 
 
 OUT</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Tue, 12 Mar 2019 19:01:52 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/44117/nrf52840-usb-cancel-in-transfer" /><item><title>RE: nRF52840 USB Cancel IN Transfer</title><link>https://devzone.nordicsemi.com/thread/175777?ContentTypeID=1</link><pubDate>Tue, 12 Mar 2019 19:01:52 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:961fc1bb-6df5-4bdd-836c-b0fbd20b2f62</guid><dc:creator>George Beckstien</dc:creator><description>&lt;p&gt;I merged in errata changes and workarounds from SDK15.3 to the nrf_drv_usbd.c used by Mbed-OS. I am still seeing the wrong packet being sent every now and then in this same situation.&lt;/p&gt;
&lt;p&gt;What exactly does the workaround do in the nrfx_usbd_ep_abort() implementation you linked to? It does not seem to always &amp;quot;disarm&amp;quot; a &amp;quot;loaded&amp;quot; IN endpoint transfer.&lt;/p&gt;
&lt;p&gt;I am running automated tests and 22 out of 100 iterations had a failure caused by this issue. This was on a hub that connected thru a dock thru thunderbolt 3. I am now testing with the DUT directly connected to my laptop and will let you know what the new results are.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF52840 USB Cancel IN Transfer</title><link>https://devzone.nordicsemi.com/thread/173343?ContentTypeID=1</link><pubDate>Thu, 28 Feb 2019 00:05:57 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:5c18bb98-51d7-477a-9217-119cec76dd33</guid><dc:creator>George Beckstien</dc:creator><description>&lt;p&gt;I will certainly suggest that when Mbed-OS upgrades the Nordic SDK next.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF52840 USB Cancel IN Transfer</title><link>https://devzone.nordicsemi.com/thread/173284?ContentTypeID=1</link><pubDate>Wed, 27 Feb 2019 14:38:29 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:abab29f1-b7b0-441f-8058-a0f046f3020d</guid><dc:creator>masz</dc:creator><description>&lt;p&gt;Consider switching to nrfx if you don&amp;#39;t use SDK stack.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF52840 USB Cancel IN Transfer</title><link>https://devzone.nordicsemi.com/thread/173265?ContentTypeID=1</link><pubDate>Wed, 27 Feb 2019 13:52:32 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:0d8c6246-2034-4e07-ad1b-18785641ec77</guid><dc:creator>George Beckstien</dc:creator><description>&lt;p&gt;Ah! Mbed is currently using SDK14.2 and I only pulled in changes from 15.2 that were related to errata! I will go through the SDK15.2 driver and pull in other relevant changes... Mbed will eventually be transitioning to SDK15+ but it hasn&amp;#39;t happened yet.&lt;/p&gt;
&lt;p&gt;I figured it would be some sort of undocumented register manipulation.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Thank you masz and Einar! That should be exactly what I&amp;#39;m looking for. Hopefully it fixes this issue&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF52840 USB Cancel IN Transfer</title><link>https://devzone.nordicsemi.com/thread/173263?ContentTypeID=1</link><pubDate>Wed, 27 Feb 2019 13:48:19 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:59920a0c-94e9-41e6-93ad-fa5ffb6e4c53</guid><dc:creator>Einar Thorsrud</dc:creator><description>&lt;p&gt;Hi &lt;a href="https://devzone.nordicsemi.com/members/aglass0fmilk"&gt;George Beckstien&lt;/a&gt;,&lt;/p&gt;
&lt;p&gt;I have asked &lt;a href="https://devzone.nordicsemi.com/members/masz"&gt;masz&lt;/a&gt;&amp;nbsp;from the SDK low level driver development team to help answering your questions in this thread.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF52840 USB Cancel IN Transfer</title><link>https://devzone.nordicsemi.com/thread/173256?ContentTypeID=1</link><pubDate>Wed, 27 Feb 2019 13:41:19 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:3cc47690-65bd-4ad2-ac88-5624100465c3</guid><dc:creator>masz</dc:creator><description>&lt;p&gt;Hi Geroge,&lt;/p&gt;
&lt;p&gt;Aborting IN transfers is used in the SDK and implemented in&amp;nbsp;&lt;span&gt;hid_generic_clear_buffer&lt;/span&gt;&lt;span&gt;() function. You probably need to use&amp;nbsp;&lt;span class="pl-en"&gt;nrfx_usbd_ep_abort&lt;/span&gt;(&lt;span class="pl-c1"&gt;nrfx_usbd_ep_t&lt;/span&gt; ep), see&amp;nbsp;&lt;a href="https://github.com/NordicSemiconductor/nrfx/blob/master/drivers/src/nrfx_usbd.c#L769"&gt;here for the description.&lt;/a&gt;&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF52840 USB Cancel IN Transfer</title><link>https://devzone.nordicsemi.com/thread/173078?ContentTypeID=1</link><pubDate>Tue, 26 Feb 2019 14:59:46 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:fd74e261-1b4f-4c09-a2ed-133fb7716569</guid><dc:creator>George Beckstien</dc:creator><description>&lt;p&gt;Hi Einar,&lt;/p&gt;
&lt;p&gt;I am actually working on contributing the USB implementation to Mbed-OS for the nRF52840. This is not an issue with Mbed. The issue is that the Nordic USB hardware does not present a clear way to cancel an auto-ACK on an IN endpoint after a DMA transfer has been completed.&lt;/p&gt;
&lt;p&gt;The test only passes intermittently, presumably when the DMA transfer is fast enough to overwrite the old data before the new data is requested by the host.&lt;/p&gt;
&lt;p&gt;Is there some way I can get support from Nordic in implementing the USB HAL for Mbed-OS? The implementation is very close to done, there are just a few more bugs to iron out.&lt;/p&gt;
&lt;p&gt;Please let me know if there is a way I can converse with Nordic engineers via email.&lt;/p&gt;
&lt;p&gt;Thank you&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF52840 USB Cancel IN Transfer</title><link>https://devzone.nordicsemi.com/thread/173011?ContentTypeID=1</link><pubDate>Tue, 26 Feb 2019 12:29:00 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:34d9aa69-be75-41b6-beba-184337879a60</guid><dc:creator>Einar Thorsrud</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;I recommend you ask about this in the mbed forums, as you will probably get much better feedback on it there. (The mbed USB stack is not used in the nRF5 SDK, so we do not have much experience with it).&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>