<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: LPC5528 USB1 Double Buffer Design in LPC Microcontrollers</title>
    <link>https://community.nxp.com/t5/LPC-Microcontrollers/LPC5528-USB1-Double-Buffer-Design/m-p/1771381#M54913</link>
    <description>&lt;P&gt;Hi&amp;nbsp;&lt;SPAN&gt;XiangJun,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;Do you have a document that explains the detailed double buffer design? I know double buffer can enhance the USB transfer efficiency but I'm not sure how it works.&lt;/P&gt;&lt;P&gt;As we know, once the active bit is cleared by the HW, it will trigger the USB interrupt and let us know which EP has the data coming in or out. Meanwhile, the HW will toggle the EPINUSE to get ready for the next same EP data transfer. My guess is that once it triggers the USB interrupt, the HW is ready for the next data. Am I correct?&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Thanks.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;BR,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Peter&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Fri, 08 Dec 2023 07:15:10 GMT</pubDate>
    <dc:creator>tks11111</dc:creator>
    <dc:date>2023-12-08T07:15:10Z</dc:date>
    <item>
      <title>LPC5528 USB1 Double Buffer Design</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/LPC5528-USB1-Double-Buffer-Design/m-p/1769539#M54891</link>
      <description>&lt;P&gt;Hi all,&lt;/P&gt;&lt;P&gt;Based on the USB sample code dev_hid_generic_bm, we can see that the SDK enables double buffer by default. After studying for days, I found that this sample code uses producerOdd and consumerOdd to toggle the USB RAM buffer. But these flags are not HW registers.&lt;/P&gt;&lt;P&gt;My questions are:&lt;/P&gt;&lt;P&gt;1. How can I find out which one is the latest USB buffer in the USB RAM using the USB1 register (if the host sends two endpoint out to the same physical EP)? Can the EPTOGGLE register (Table 844) or the EPINUSE register(Table 839) help me to know which is the latest USB buffer in USB RAM if USB double buffer is full?&lt;/P&gt;&lt;P&gt;2. Is there a way that I can make USB double buffer fully filled?&lt;/P&gt;&lt;P&gt;Thanks.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;BR,&lt;/P&gt;&lt;P&gt;Peter&lt;/P&gt;</description>
      <pubDate>Wed, 06 Dec 2023 07:19:10 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/LPC5528-USB1-Double-Buffer-Design/m-p/1769539#M54891</guid>
      <dc:creator>tks11111</dc:creator>
      <dc:date>2023-12-06T07:19:10Z</dc:date>
    </item>
    <item>
      <title>Re: LPC5528 USB1 Double Buffer Design</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/LPC5528-USB1-Double-Buffer-Design/m-p/1771334#M54910</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;This is the AE team reply:&lt;/P&gt;
&lt;P&gt;"How can I find out which one is the latest USB buffer in the USB RAM using the USB1 register (if the host sends two endpoint out to the same physical EP)? Can the EPTOGGLE register (Table 844) or the EPINUSE register(Table 839) help me to know which is the latest USB buffer in USB RAM if USB double buffer is full?&lt;/P&gt;
&lt;P&gt;User can use "USB EP Buffer in use" detect which buffer in use&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="xiangjun_rong_0-1702016256118.png" style="width: 400px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/253540iB5242ADB230BE4C0/image-size/medium?v=v2&amp;amp;px=400" role="button" title="xiangjun_rong_0-1702016256118.png" alt="xiangjun_rong_0-1702016256118.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;2. Is there a way that I can make USB double buffer fully filled?&lt;/P&gt;
&lt;P&gt;set the max transfer size in descriptor, and make sure the HOST side can reach the max transfer size.&lt;/P&gt;
&lt;P&gt;"&lt;/P&gt;
&lt;P&gt;BR&lt;/P&gt;
&lt;P&gt;XiangJun Rong&lt;/P&gt;</description>
      <pubDate>Fri, 08 Dec 2023 06:18:41 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/LPC5528-USB1-Double-Buffer-Design/m-p/1771334#M54910</guid>
      <dc:creator>xiangjun_rong</dc:creator>
      <dc:date>2023-12-08T06:18:41Z</dc:date>
    </item>
    <item>
      <title>Re: LPC5528 USB1 Double Buffer Design</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/LPC5528-USB1-Double-Buffer-Design/m-p/1771381#M54913</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;SPAN&gt;XiangJun,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;Do you have a document that explains the detailed double buffer design? I know double buffer can enhance the USB transfer efficiency but I'm not sure how it works.&lt;/P&gt;&lt;P&gt;As we know, once the active bit is cleared by the HW, it will trigger the USB interrupt and let us know which EP has the data coming in or out. Meanwhile, the HW will toggle the EPINUSE to get ready for the next same EP data transfer. My guess is that once it triggers the USB interrupt, the HW is ready for the next data. Am I correct?&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Thanks.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;BR,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Peter&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 08 Dec 2023 07:15:10 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/LPC5528-USB1-Double-Buffer-Design/m-p/1771381#M54913</guid>
      <dc:creator>tks11111</dc:creator>
      <dc:date>2023-12-08T07:15:10Z</dc:date>
    </item>
    <item>
      <title>Re: LPC5528 USB1 Double Buffer Design</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/LPC5528-USB1-Double-Buffer-Design/m-p/1772165#M54921</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;I suppose that there is not dedicated doc which focuses on the USB double buffer design.&lt;/P&gt;
&lt;P&gt;This is the USB buffer architecture:&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="xiangjun_rong_0-1702286243657.png" style="width: 400px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/253753i61867DAC007405E6/image-size/medium?v=v2&amp;amp;px=400" role="button" title="xiangjun_rong_0-1702286243657.png" alt="xiangjun_rong_0-1702286243657.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;For the double buffer design, for each logic endpoints, for the input buffer, there are two buffer for each ENDPOINT IN, for out buffer, there are two buffers.&lt;/P&gt;
&lt;P&gt;So each logic end points will like:&lt;/P&gt;
&lt;P&gt;IN buffer for each logic endpoint.&lt;/P&gt;
&lt;P&gt;CS NBYTES Offset1&lt;/P&gt;
&lt;P&gt;CS NBYTES Offset2&lt;/P&gt;
&lt;P&gt;OUT buffer for each logic endpoint.&lt;/P&gt;
&lt;P&gt;CS NBYTES Offset3&lt;/P&gt;
&lt;P&gt;CS NBYTES Offset4&lt;/P&gt;
&lt;P&gt;Hope it can help you&lt;/P&gt;
&lt;P&gt;BR&lt;/P&gt;
&lt;P&gt;XiangJun Rong&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 11 Dec 2023 09:30:31 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/LPC5528-USB1-Double-Buffer-Design/m-p/1772165#M54921</guid>
      <dc:creator>xiangjun_rong</dc:creator>
      <dc:date>2023-12-11T09:30:31Z</dc:date>
    </item>
  </channel>
</rss>

