<?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>USBD endpoint transfer completion event.</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/114956/usbd-endpoint-transfer-completion-event</link><description>In my NRF52840 based device using NRF5 SDK 17.1.0, I notice that sometimes this loop in the nrfx usbd driver code of the SDK doesn&amp;#39;t finish: 
 [modules/nrfx/drivers/src/nrfx_usbd.c: 1444] 
 /* There is a lot of USBD registers that cannot be accessed during</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Tue, 03 Dec 2024 09:26:10 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/114956/usbd-endpoint-transfer-completion-event" /><item><title>RE: USBD endpoint transfer completion event.</title><link>https://devzone.nordicsemi.com/thread/513140?ContentTypeID=1</link><pubDate>Tue, 03 Dec 2024 09:26:10 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:01fb371f-39b5-4e70-80db-730a34ca46d1</guid><dc:creator>Hung Bui</dc:creator><description>&lt;p&gt;Hi Ronald,&amp;nbsp;&lt;br /&gt;The legacy driver you pointed to will be retired.&amp;nbsp;&lt;br /&gt;You can find the current driver here, without the loop:&amp;nbsp;&lt;br /&gt;&lt;a href="https://github.com/zephyrproject-rtos/zephyr/blob/main/drivers/usb/common/nrf_usbd_common/nrf_usbd_common.c#L897C4-L904C20"&gt;https://github.com/zephyrproject-rtos/zephyr/blob/main/drivers/usb/common/nrf_usbd_common/nrf_usbd_common.c#L897C4-L904C20&lt;/a&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: USBD endpoint transfer completion event.</title><link>https://devzone.nordicsemi.com/thread/512728?ContentTypeID=1</link><pubDate>Fri, 29 Nov 2024 11:22:30 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:b5637e36-1a3f-4b6f-80c3-2a78f2864d5c</guid><dc:creator>Ronald Hoogenboom</dc:creator><description>&lt;p&gt;Thanks for the feedback. It is weird that his conclusion is not aligning with what I experience. For me, the hardware is a black box. All I have is whatever information Nordic provides and the inconsistencies I can detect in it. Anyway, my modification seems to solve my issue, I haven&amp;#39;t had any issues with usbd since.&lt;/p&gt;
&lt;p&gt;&amp;quot;&lt;em&gt;the Zephyr usbd driver no longer does busy loop waiting in the interrupt context&amp;quot;&lt;br /&gt;&lt;br /&gt;&lt;/em&gt;What I see in&amp;nbsp;&lt;a href="https://github.com/nrfconnect/sdk-hal_nordic/blob/ncs_2_7_0_system_nrf54l_mdk_8_67_fix/nrfx/drivers/src/nrfx_usbd.c#L1442"&gt;sdk-hal_nordic/nrfx/drivers/src/nrfx_usbd.c at ncs_2_7_0_system_nrf54l_mdk_8_67_fix &amp;middot; nrfconnect/sdk-hal_nordic (github.com)&lt;/a&gt;&amp;nbsp;, there is still the busy wait loop, exactly the same as in NRF5 SDK. Maybe this is not part of NCS? Can you tell me where the nrfx_usbd driver for NCS is? I would be happy to transplant the newer code in my NRF5 SDK tree and get rid of the busy wait in interrupt context.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: USBD endpoint transfer completion event.</title><link>https://devzone.nordicsemi.com/thread/512584?ContentTypeID=1</link><pubDate>Thu, 28 Nov 2024 13:23:42 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:07940348-813e-4f51-a30a-ed9dff6bde58</guid><dc:creator>Hung Bui</dc:creator><description>&lt;p&gt;Hi Ronald,&amp;nbsp;&lt;br /&gt;I&amp;#39;m really sorry for the late response. It&amp;#39;s my mistake that the feedback from our R&amp;amp;D engineer didn&amp;#39;t get back here. Here is his thought:&amp;nbsp;&lt;br /&gt;&lt;span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;em&gt;STARTED event is completely independent from host issuing the IN token. The host may not issue IN token at all, and yet the STARTED event will be generated.&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;&lt;em&gt;The customer seems to be chasing something, but the conclusion that this in any way allows to determine whether IN token is sent by host is wrong. It does not, never did and never will. Can he observe the issue with Zephyr or NCS?&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;/span&gt;&lt;em&gt;By the way, the Zephyr usbd driver no longer does busy loop waiting in the interrupt context. If the customer can reproduce it with Zephyr or NCS, I would be very interesting in investigating this. Otherwise, I just assume there&amp;#39;s some bug somewhere in the NRF5 SDK or the customer application and not in the silicon.&lt;/em&gt;&lt;br /&gt;&lt;em&gt;&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;&lt;em&gt;Without a reproducer (full software package both on nRF52840 and host) I cannot check what&amp;#39;s going on.&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;&lt;em&gt;&amp;nbsp;&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;&lt;em&gt;In the ticket customer was asking &amp;quot;What could be the reason why a DMA action isn&amp;#39;t captured? Could it be because a previous DMA isn&amp;#39;t finished yet?&amp;quot; - there can only be one DMA transfer (between main system memory and USBD endpoint buffer) active at a time. If the previous one hasn&amp;#39;t finished before new one is started then for sure things won&amp;#39;t work. But considering that nrfx does busy loop until the transfer ends, I don&amp;#39;t think it is possible to trigger next DMA before previous one finished with nrfx.&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;&lt;em&gt;&amp;nbsp;&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;&lt;em&gt;A long shot at tackling this problem could be to try to remove the &lt;code&gt;*((volatile uint32_t *)0x40027C1C) = 0x00000000;&lt;/code&gt; from &lt;code&gt;usbd_dma_pending_clear()&lt;/code&gt; completely. This would result in increased current consumption, but could provide some insight whether or not the issue is related to errata 199 or not.&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;&lt;em&gt;&amp;nbsp;&lt;/em&gt;&lt;br /&gt;&lt;br /&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: USBD endpoint transfer completion event.</title><link>https://devzone.nordicsemi.com/thread/512555?ContentTypeID=1</link><pubDate>Thu, 28 Nov 2024 11:22:55 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:f935b706-e307-47ad-9672-a4b5243801d9</guid><dc:creator>Ronald Hoogenboom</dc:creator><description>&lt;p&gt;Is there any progress on this?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: USBD endpoint transfer completion event.</title><link>https://devzone.nordicsemi.com/thread/504392?ContentTypeID=1</link><pubDate>Mon, 30 Sep 2024 14:29:03 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:2fb50e20-48cc-4ac7-bfd1-b403ce32e011</guid><dc:creator>Hung Bui</dc:creator><description>&lt;p&gt;Hi Ronald,&amp;nbsp;&lt;/p&gt;
&lt;p&gt;I would need to check internally to see if this can cause any potential issue. I will get back when I have a reply.&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: USBD endpoint transfer completion event.</title><link>https://devzone.nordicsemi.com/thread/504126?ContentTypeID=1</link><pubDate>Fri, 27 Sep 2024 08:46:34 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:310516bd-a142-4e4b-8b85-5dae85338cf1</guid><dc:creator>Ronald Hoogenboom</dc:creator><description>&lt;p&gt;Hi Hung Bui,&lt;/p&gt;
&lt;p&gt;There are just no IN tokens coming from the host, because it didn&amp;#39;t listen for the interrupts from the endpoint yet. This apparently results in the DMA for the triggered endpoint task to never &amp;#39;capture&amp;#39; (no STARTED event) and thus no END event either (which is what the loop in the driver is waiting for).&lt;/p&gt;
&lt;p&gt;I think it&amp;#39;s better to check a few times for the STARTED event (which should come quickly, as all DMA requests are serialized by the driver software already) than have a longer timeout on the END event. ISRs are timing critical, because they block all other parts of the code. I have seen that the STARTED event always comes within 5 loops, so timing out for the STARTED event can be done with as little as 10 loops or so. Then when the STARTED loop times out, it&amp;#39;s useless to wait for END. I&amp;#39;m not sure if the triggered endpoint task needs to be canceled in the timeout case. I didn&amp;#39;t do that and it seems to not harm anything.&lt;/p&gt;
&lt;p&gt;The fragment in the nrfx_usbd.c around line 1440 looks like this now:&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family:&amp;#39;courier new&amp;#39;, courier;"&gt;&amp;nbsp; &amp;nbsp; /* Start transfer to the endpoint buffer */&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:&amp;#39;courier new&amp;#39;, courier;"&gt;&amp;nbsp; &amp;nbsp; nrf_usbd_ep_easydma_set(ep, transfer.p_data.addr, (uint32_t)transfer.size);&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family:&amp;#39;courier new&amp;#39;, courier;"&gt;&amp;nbsp; &amp;nbsp; usbd_dma_start(ep);&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:&amp;#39;courier new&amp;#39;, courier;"&gt;&amp;nbsp; &amp;nbsp; for (int i=0; ; i++)&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:&amp;#39;courier new&amp;#39;, courier;"&gt;&amp;nbsp; &amp;nbsp; {&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:&amp;#39;courier new&amp;#39;, courier;"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; if (nrf_usbd_event_check(NRF_USBD_EVENT_STARTED)) break;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:&amp;#39;courier new&amp;#39;, courier;"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; if (i&amp;gt;8)&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:&amp;#39;courier new&amp;#39;, courier;"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; {&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:&amp;#39;courier new&amp;#39;, courier;"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; if (NRFX_USBD_DMAREQ_PROCESS_DEBUG)&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:&amp;#39;courier new&amp;#39;, courier;"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; {&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:&amp;#39;courier new&amp;#39;, courier;"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; NRFX_LOG_DEBUG(&amp;quot;USB DMA process - not started&amp;quot;);&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:&amp;#39;courier new&amp;#39;, courier;"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:&amp;#39;courier new&amp;#39;, courier;"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; /* Transfer won&amp;#39;t capture - abort */&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:&amp;#39;courier new&amp;#39;, courier;"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; return;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:&amp;#39;courier new&amp;#39;, courier;"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:&amp;#39;courier new&amp;#39;, courier;"&gt;&amp;nbsp; &amp;nbsp; }&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:&amp;#39;courier new&amp;#39;, courier;"&gt;&amp;nbsp; &amp;nbsp; usbd_dma_pending_set();&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family:&amp;#39;courier new&amp;#39;, courier;"&gt;&amp;nbsp; &amp;nbsp; /* There is a lot of USBD registers that cannot be accessed during EasyDMA transfer.&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:&amp;#39;courier new&amp;#39;, courier;"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;* This is quick fix to maintain stability of the stack.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;This seems to make the behavior stable for both when the host sends IN tokens to the interrupt endpoint and when it doesn&amp;#39;t.&lt;/p&gt;
&lt;p&gt;What do you think?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: USBD endpoint transfer completion event.</title><link>https://devzone.nordicsemi.com/thread/504113?ContentTypeID=1</link><pubDate>Fri, 27 Sep 2024 08:22:34 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:25c889e2-cbfb-448e-b4ef-5c6835c7d4b5</guid><dc:creator>Hung Bui</dc:creator><description>&lt;p&gt;Hi Ronald,&amp;nbsp;&lt;br /&gt;So from my understanding, it&amp;#39;s the issue with the host that it doesn&amp;#39;t send IN requests. But I still don&amp;#39;t understand why that would cause the driver to end in a deadloop as in your initial question. Would that because the host is unresponsive and leading to END event never come ?&amp;nbsp;&lt;br /&gt;Maybe we can safeguard this loop by adding a way to exit it if it stuck there for a while ?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: USBD endpoint transfer completion event.</title><link>https://devzone.nordicsemi.com/thread/503897?ContentTypeID=1</link><pubDate>Thu, 26 Sep 2024 08:27:52 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:5f56bcd8-fafc-4557-b27a-4b01ba761944</guid><dc:creator>Ronald Hoogenboom</dc:creator><description>&lt;p&gt;I now have the real root cause of the problem. In some situations, the host doesn&amp;#39;t do any IN request on the interrupt endpoint after configuring the usb device. When it doesn&amp;#39;t, and I send an interrupt transfer to the host, this phenomenon in the dmareq_process function occurs and it still does after the change I described above. I&amp;#39;m not sure why I initially saw that the change solved the issue.&lt;/p&gt;
&lt;p&gt;I don&amp;#39;t see a way to check whether the host &amp;#39;activated&amp;#39; the interrupt endpoint (by sending IN requests) before doing the endpoint tranfer. I think a valid way to handle such situations is to just ignore the transfer, possibly returning an error, not hang in an interrupt routine in the driver code.&lt;/p&gt;
&lt;p&gt;Maybe polling a few times for the &amp;#39;STARTED&amp;#39; event before setting dma_pending?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: USBD endpoint transfer completion event.</title><link>https://devzone.nordicsemi.com/thread/503701?ContentTypeID=1</link><pubDate>Wed, 25 Sep 2024 09:23:56 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:2bcba3f7-bdef-4dd6-9f2f-3be09e1f5bbf</guid><dc:creator>Hung Bui</dc:creator><description>&lt;p&gt;Hi Ronald,&amp;nbsp;&lt;br /&gt;Thanks for the report. I have forwarded your finding internally. I will keep you updated when I get a feedback.&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: USBD endpoint transfer completion event.</title><link>https://devzone.nordicsemi.com/thread/503540?ContentTypeID=1</link><pubDate>Tue, 24 Sep 2024 09:21:17 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:48dd37ca-7c58-4b0c-a1d7-7b335fa55f5b</guid><dc:creator>Ronald Hoogenboom</dc:creator><description>&lt;p&gt;I have found the reason for the issue. Look at the comments on the function usbd_dma_pending_set:&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family:&amp;#39;courier new&amp;#39;, courier;"&gt;/**&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:&amp;#39;courier new&amp;#39;, courier;"&gt;&amp;nbsp;* @brief Mark that EasyDMA is working.&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:&amp;#39;courier new&amp;#39;, courier;"&gt;&amp;nbsp;*&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:&amp;#39;courier new&amp;#39;, courier;"&gt;&amp;nbsp;* Internal function to set the flag informing about EasyDMA transfer pending.&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:&amp;#39;courier new&amp;#39;, courier;"&gt;&amp;nbsp;* This function is called always just after the EasyDMA transfer is started.&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:&amp;#39;courier new&amp;#39;, courier;"&gt;&amp;nbsp;*/&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:&amp;#39;courier new&amp;#39;, courier;"&gt;static inline void usbd_dma_pending_set(void)&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:&amp;#39;courier new&amp;#39;, courier;"&gt;{&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:&amp;#39;courier new&amp;#39;, courier;"&gt;&amp;nbsp; &amp;nbsp; if (nrfx_usbd_errata_199())&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:&amp;#39;courier new&amp;#39;, courier;"&gt;&amp;nbsp; &amp;nbsp; {&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:&amp;#39;courier new&amp;#39;, courier;"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; *((volatile uint32_t *)0x40027C1C) = 0x00000082;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:&amp;#39;courier new&amp;#39;, courier;"&gt;&amp;nbsp; &amp;nbsp; }&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:&amp;#39;courier new&amp;#39;, courier;"&gt;&amp;nbsp; &amp;nbsp; m_dma_pending = true;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:&amp;#39;courier new&amp;#39;, courier;"&gt;}&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family:inherit;"&gt;It says that this function is (to be) called &lt;span style="text-decoration:underline;"&gt;just AFTER the DMA is started&lt;/span&gt;, but in the function usbd_dmareq_process, it is called &lt;span style="text-decoration:underline;"&gt;a little BEFORE the DMA is started&lt;/span&gt;. This isn&amp;#39;t a problem for setting the value of m_dma_pending (of course) but it is a problem for the errata 199 workaround.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family:inherit;"&gt;I moved the call to the pending_set function from line 1429 to right after usbd_dma_start(ep), line 1443 and it solves the issue with raspberry pi. It also still works fine with the windows laptop.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family:inherit;"&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family:inherit;"&gt;I do think this should be rectified in the NRF5 SDK and in the NRF Connect SDK (sdk-hal_nordic/nrfx/drivers/src/nrfx_usbd.c).&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: USBD endpoint transfer completion event.</title><link>https://devzone.nordicsemi.com/thread/503539?ContentTypeID=1</link><pubDate>Mon, 23 Sep 2024 15:41:50 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:61673077-2d38-448f-a064-feb4800899b7</guid><dc:creator>Ronald Hoogenboom</dc:creator><description>&lt;p&gt;I dove a bit deeper in the situation and it seems the notification ep transfer isn&amp;#39;t started at all (or at least it doesn&amp;#39;t arrive at the host side) and therefore the end event doesn&amp;#39;t occur either. The driver code just calls 2 inline functions (nrf_usbd_ep_easydma_set and usbd_dma_start) and assumes the transfer is started without checking if it really did.&lt;/p&gt;
&lt;p&gt;According to the&amp;nbsp;nRF52840_PS_v1.8.pdf, there should be a &amp;#39;STARTED&amp;#39; event when the PTR and MAXCOUNT have been &amp;#39;captured&amp;#39;. Only when they have, it makes sense to wait for the ENDEPIN event to ensure the buffer is &amp;#39;free&amp;#39; again (although I disagree that this should be done in the interrupt routine, alas).&lt;/p&gt;
&lt;p&gt;What could be the reason why a DMA action isn&amp;#39;t captured? Could it be because a previous DMA isn&amp;#39;t finished yet?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: USBD endpoint transfer completion event.</title><link>https://devzone.nordicsemi.com/thread/503538?ContentTypeID=1</link><pubDate>Fri, 20 Sep 2024 12:16:37 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:bdb79d48-0773-4ac0-bcb6-463802ee8de6</guid><dc:creator>Ronald Hoogenboom</dc:creator><description>&lt;p&gt;This is for an outgoing notification to the host, so it should be ENDEPIN. The endpoint address is 0x83 and the ep_to_endevent(ep) results in 0x114.&lt;/p&gt;
&lt;p&gt;Since this is involving interrupts, it&amp;#39;s hard to see if anything else reset the end event before the handler code has the chance to look at it, but since this is code run in interrupt context, I guess the likelihood is very minimal.&lt;/p&gt;
&lt;p&gt;I will try to find an example that is suitable to demonstrate this issue. Maybe you have a suggestion which one?&lt;/p&gt;
&lt;p&gt;I don&amp;#39;t have a working NC SDK at my disposal now. But it looks like that code didn&amp;#39;t change much between nRF5 SDK and NRF Connect.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: USBD endpoint transfer completion event.</title><link>https://devzone.nordicsemi.com/thread/503537?ContentTypeID=1</link><pubDate>Fri, 20 Sep 2024 12:03:10 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:fef0304d-858f-4ed2-9856-76ef46355c77</guid><dc:creator>Hung Bui</dc:creator><description>&lt;p&gt;Hi Ronald,&amp;nbsp;&lt;br /&gt;Please correct me if I&amp;#39;m wrong, what you are saying is that the hardware event&amp;nbsp;ENDEPIN or&amp;nbsp;ENDEPOUT didn&amp;#39;t come as expected ? Could you check exactly which one ?&amp;nbsp;&lt;br /&gt;Is there any chance that it&amp;#39;s been cleared by something else and got stuck there&amp;nbsp; ? Are you able to reproduce the issue with an example in the nRF5 SDK ? This way we can be sure it&amp;#39;s not something else with the application may cause the problem.&amp;nbsp;&lt;br /&gt;&lt;br /&gt;As you know the nRF5 SDK is discontinued for a long time, but if you can reproduce with NCS then it&amp;#39;s easier for us to request investigation/bug fix in NCS than on nRF5 SDK.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: USBD endpoint transfer completion event.</title><link>https://devzone.nordicsemi.com/thread/503536?ContentTypeID=1</link><pubDate>Fri, 20 Sep 2024 08:53:27 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:9ee94071-0553-4676-9b5b-ba787799f498</guid><dc:creator>Ronald Hoogenboom</dc:creator><description>&lt;p&gt;I see that in the nrfconnect SDK, this piece of code is still there:&amp;nbsp;&lt;a href="https://github.com/nrfconnect/sdk-hal_nordic/blob/ncs_2_7_0_system_nrf54l_mdk_8_67_fix/nrfx/drivers/src/nrfx_usbd.c#L1442"&gt;sdk-hal_nordic/nrfx/drivers/src/nrfx_usbd.c at ncs_2_7_0_system_nrf54l_mdk_8_67_fix · nrfconnect/sdk-hal_nordic (github.com)&lt;/a&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>