<?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>USB Bulk Out hardware bug</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/35362/usb-bulk-out-hardware-bug</link><description>I am working with production Rev 1 on nrf52840 DK v1.0.0 (2018.19). The spec section 6.35.10.2 Bulk and interrupt OUT transaction say 
 
 Until that transfer is finished, the hardware will automatically NAK any other incoming OUT+DATA packets.Only when</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Tue, 19 Jun 2018 17:17:19 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/35362/usb-bulk-out-hardware-bug" /><item><title>RE: USB Bulk Out hardware bug</title><link>https://devzone.nordicsemi.com/thread/136818?ContentTypeID=1</link><pubDate>Tue, 19 Jun 2018 17:17:19 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:286f29dd-c41b-4676-ab89-789098e9b92a</guid><dc:creator>hathach</dc:creator><description>&lt;p&gt;&lt;span&gt;Thanks for confirmation.&amp;nbsp;what you said is 90% true. However, sometimes ACK the packet that software is not ready to process, could send a wrong signal to host. I would like to have an option to force NAK, though there is not a big problem without it. We just take that into consideration :D. Thanks a lot&amp;nbsp;&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: USB Bulk Out hardware bug</title><link>https://devzone.nordicsemi.com/thread/136811?ContentTypeID=1</link><pubDate>Tue, 19 Jun 2018 16:07:36 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:d3b45c5a-2072-4c07-ab83-fdb602ef96ff</guid><dc:creator>Sigurd</dc:creator><description>&lt;p&gt;I don&amp;#39;t think that is possible.&amp;nbsp;Once you have finished processing the data from the previous transaction, you want new data to be available in the internal USB HW buffer as soon as possible. As soon as you have transferred the data to RAM, the internal USB HW buffers are ready to receive new data, and will ACK the next OUT packet.&amp;nbsp;As long as you have *not* transferred the data to RAM, the USB HW will NAK the next OUT packet.&lt;/p&gt;
&lt;p&gt;In your sequence, when you are finished with &lt;span&gt;processing the current transaction, the next transaction is not ready at all, and you will need to wait for the USB host to send the data again. This would have a negative effect on the transfer speed.&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: USB Bulk Out hardware bug</title><link>https://devzone.nordicsemi.com/thread/136797?ContentTypeID=1</link><pubDate>Tue, 19 Jun 2018 14:39:05 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:0afddd61-7eab-4021-b099-24b389e72b7d</guid><dc:creator>hathach</dc:creator><description>&lt;p&gt;&lt;a href="https://devzone.nordicsemi.com/members/sigurdon"&gt;Sigurd&lt;/a&gt; Thank you very much for answering. Though, I would like to force NAK&amp;nbsp;but still need to trigger DMA to process data of current transaction. The&amp;nbsp;sequence would be&lt;/p&gt;
&lt;p&gt;1.&amp;nbsp;receive data from the current transaction,&lt;/p&gt;
&lt;p&gt;2. Process data, force NAK meanwhile&lt;/p&gt;
&lt;p&gt;3. Done with data, start to accept the next Data&lt;/p&gt;
&lt;p&gt;I only wonder if there is any way to enforce it, it is no a problem if we have to implement driver to adapt to nrf usb controller.&amp;nbsp;&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: USB Bulk Out hardware bug</title><link>https://devzone.nordicsemi.com/thread/136757?ContentTypeID=1</link><pubDate>Tue, 19 Jun 2018 12:51:35 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:44dcbcc7-acb5-48ea-93b3-20d2c1dda650</guid><dc:creator>Sigurd</dc:creator><description>[quote userid="2131" url="~/f/nordic-q-a/35362/usb-bulk-out-hardware-bug/136710"]Bump, is there anyway to enforce usb hw to NAK bulk out after DMA is done. Only ACK after we overwrite the SIZE.EPOUT[n]&amp;nbsp;[/quote]
&lt;p&gt;The ACK/NAK is controlled by the STARTEPOUT[n] task. You start the EasyDMA transfer with the STARTEPOUT[n] task, and when it&amp;rsquo;s finished, signaled by the ENDEPOUT event, the HW will ack the next OUT packet. If you want the HW to NAK the next OUT packet, then you could possibly try to delay triggering the STARTEPOUT task. (i.e. don&amp;rsquo;t start the EasyDMA transfer) (as long as you are not starting the EasyDMA transfer, the HW should NAK the next OUT packet)&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: USB Bulk Out hardware bug</title><link>https://devzone.nordicsemi.com/thread/136710?ContentTypeID=1</link><pubDate>Tue, 19 Jun 2018 10:22:45 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:6736e798-7bd2-443d-8065-45de0d0e3e74</guid><dc:creator>hathach</dc:creator><description>&lt;p&gt;Bump, is there anyway to enforce usb hw to NAK bulk out after DMA is done. Only ACK after we overwrite the SIZE.EPOUT[n]&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: USB Bulk Out hardware bug</title><link>https://devzone.nordicsemi.com/thread/136403?ContentTypeID=1</link><pubDate>Fri, 15 Jun 2018 14:45:20 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:affee333-395c-47e7-ab37-dbc76eb8f513</guid><dc:creator>hathach</dc:creator><description>&lt;p&gt;Ah I&amp;nbsp;understand&amp;nbsp;it now, look like the specs did change from &lt;strong&gt;AND to OR&lt;/strong&gt;&amp;nbsp;regarding this requirement with latest revision of nrf52840 PS, it is my bad.&amp;nbsp;Thanks for your clarification.&lt;/p&gt;
&lt;p&gt;(from the pre-1.0 specs)&lt;/p&gt;
&lt;p&gt;&lt;img alt=" " src="https://devzone.nordicsemi.com/resized-image/__size/640x240/__key/communityserver-discussions-components-files/4/Screenshot-from-2018_2D00_06_2D00_15-21_2D00_53_2D00_57.png" /&gt;&lt;/p&gt;
&lt;p&gt;Still for question 2) &lt;strong&gt;is there any way for the software to&amp;nbsp;instruct&amp;nbsp;peripheral&amp;nbsp;to&amp;nbsp;NAK&amp;nbsp;the next packet from host&lt;/strong&gt;. Sometime auto ACK the packet that you are not ready to handle could cause issue e.g Host will start its timeout timer waiting for response which SW is not ready to process the received data.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Thanks for you recommendation, though I am working on adding nrf52840 to my open usb stack here&amp;nbsp; &lt;a href="https://github.com/hathach/tinyusb/tree/develop"&gt;https://github.com/hathach/tinyusb/tree/develop&lt;/a&gt;&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: USB Bulk Out hardware bug</title><link>https://devzone.nordicsemi.com/thread/136387?ContentTypeID=1</link><pubDate>Fri, 15 Jun 2018 13:35:11 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:4c7968d8-2cd1-40e1-9f03-535aab1afdc6</guid><dc:creator>Sigurd</dc:creator><description>&lt;p&gt;&lt;span&gt;After we have written to SIZE.EPOUT once, we are allowing traffic on that EP. When the EasyDMA transfer is done, the endpoint will accept incoming OUT+DATA again, you dont need to write to&amp;nbsp;SIZE.EPOUT again for this. This can be seen in &lt;a href="https://infocenter.nordicsemi.com/topic/com.nordic.infocenter.nrf52840.ps/ip/usbd/doc/image/bulk_out.svg"&gt;Figure 10&lt;/a&gt; in the PS.&amp;nbsp;&lt;/span&gt;&lt;span&gt;Writing to SIZE.EPOUT after that, is used to&amp;nbsp;&lt;/span&gt;clearing out endpoint to accept any new incoming traffic(function nrf_usbd_epout_clear()).&lt;/p&gt;
&lt;p&gt;PS: I recommend using our USBD drivers in the SDK.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: USB Bulk Out hardware bug</title><link>https://devzone.nordicsemi.com/thread/136120?ContentTypeID=1</link><pubDate>Thu, 14 Jun 2018 09:58:13 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:9f5e80cf-1e80-4634-a2f3-606eabd8198c</guid><dc:creator>hathach</dc:creator><description>&lt;p&gt;Since I haven&amp;#39;t written anything to SIZE.OUT[n] again. Maybe I misinterpret the specs, Is this register a one-time deal only ?&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: USB Bulk Out hardware bug</title><link>https://devzone.nordicsemi.com/thread/136109?ContentTypeID=1</link><pubDate>Thu, 14 Jun 2018 09:32:05 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:e4f4b915-fb06-4991-9f37-58988b269d14</guid><dc:creator>Sigurd</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
[quote userid="2131" url="~/f/nordic-q-a/35362/usb-bulk-out-hardware-bug"]will always accept &amp;amp; ACK the Data from host whenever DMA is complete[/quote][quote userid="2131" url="~/f/nordic-q-a/35362/usb-bulk-out-hardware-bug"]Only when the EasyDMA transfer is done (signalled by the ENDEPOUT[n] event), or as soon as any values are written by the software in register SIZE.EPOUT[n], the endpoint n will accept incoming OUT+DATA again.[/quote]
&lt;p&gt;I don&amp;#39;t see why this is out of spec. When you say &amp;quot;whenever DMA is complete&amp;quot;, then according to the spec, it should&amp;nbsp;&lt;span&gt;accept incoming OUT+DATA again.&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>