<?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>LPC MicrocontrollersのトピックShared memory buffer - nxpUSBLib</title>
    <link>https://community.nxp.com/t5/LPC-Microcontrollers/Shared-memory-buffer-nxpUSBLib/m-p/523993#M6629</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;STRONG&gt;Content originally posted in LPCWare by fjarnjak on Tue Jul 03 21:38:17 MST 2012&lt;/STRONG&gt;&lt;BR /&gt;&lt;SPAN&gt;Shared memory buffer in the nxpUSBLib is limiting my application...&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;What I want to do is to constantly stream data as fast as possible (no explicit delays, except ones that occur due to snprintf, send, etc) as a virtual COM port to my Windows machine. In case user sends something to the device, stream will be changed, stopped, or whatever else...&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;However, buffer gets corrupted the moment I send something to the device; streaming one-way works fine. If I send data for example every 1 second, and in the mean time something comes from the PC to the device, buffer is not corrupted because send/receive operations do not overlap. Sometimes though, it naturally happens in case you were unlucky and typed when device was about to send/or sending. &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Shared buffer would work in the request &amp;amp; reply scenario - PC sends command; device responds; PC sends another command; device responds, and so on. &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Is there a plan to make 2 separate buffers for outgoing and incoming endpoint? Maybe as user-configurable option to save memory for those who do not need separate buffers?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Also, I noticed that when I follow CDC library documentation - meaning calling CDC_Device_USBTask followed by USB_Task() function, after receiving 1 charachter as in the virtual serial demo, it will constantly send charachters back (echo). If I comment out CDC_Device_USBTask it sends one echo. I can see in the example that call to CDC_Device_USBTask was commented out...which seems to confirm my observation. I suggest this issue should get documented or even better it should be resolved so that we can follow API.&amp;nbsp; &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;It would be nice to have working CDC_Device_CreateStream to get the stream and use printf type methods directly...&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 15 Jun 2016 16:47:25 GMT</pubDate>
    <dc:creator>lpcware</dc:creator>
    <dc:date>2016-06-15T16:47:25Z</dc:date>
    <item>
      <title>Shared memory buffer - nxpUSBLib</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/Shared-memory-buffer-nxpUSBLib/m-p/523993#M6629</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;STRONG&gt;Content originally posted in LPCWare by fjarnjak on Tue Jul 03 21:38:17 MST 2012&lt;/STRONG&gt;&lt;BR /&gt;&lt;SPAN&gt;Shared memory buffer in the nxpUSBLib is limiting my application...&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;What I want to do is to constantly stream data as fast as possible (no explicit delays, except ones that occur due to snprintf, send, etc) as a virtual COM port to my Windows machine. In case user sends something to the device, stream will be changed, stopped, or whatever else...&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;However, buffer gets corrupted the moment I send something to the device; streaming one-way works fine. If I send data for example every 1 second, and in the mean time something comes from the PC to the device, buffer is not corrupted because send/receive operations do not overlap. Sometimes though, it naturally happens in case you were unlucky and typed when device was about to send/or sending. &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Shared buffer would work in the request &amp;amp; reply scenario - PC sends command; device responds; PC sends another command; device responds, and so on. &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Is there a plan to make 2 separate buffers for outgoing and incoming endpoint? Maybe as user-configurable option to save memory for those who do not need separate buffers?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Also, I noticed that when I follow CDC library documentation - meaning calling CDC_Device_USBTask followed by USB_Task() function, after receiving 1 charachter as in the virtual serial demo, it will constantly send charachters back (echo). If I comment out CDC_Device_USBTask it sends one echo. I can see in the example that call to CDC_Device_USBTask was commented out...which seems to confirm my observation. I suggest this issue should get documented or even better it should be resolved so that we can follow API.&amp;nbsp; &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;It would be nice to have working CDC_Device_CreateStream to get the stream and use printf type methods directly...&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 15 Jun 2016 16:47:25 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/Shared-memory-buffer-nxpUSBLib/m-p/523993#M6629</guid>
      <dc:creator>lpcware</dc:creator>
      <dc:date>2016-06-15T16:47:25Z</dc:date>
    </item>
    <item>
      <title>Re: Shared memory buffer - nxpUSBLib</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/Shared-memory-buffer-nxpUSBLib/m-p/523994#M6630</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;STRONG&gt;Content originally posted in LPCWare by rsargant on Wed Jul 04 09:12:58 MST 2012&lt;/STRONG&gt;&lt;BR /&gt;&lt;SPAN&gt;+1 on this from me.&amp;nbsp; The CDC_Device_Receive_Byte and CDC_Device_SendByte are sharing the same buffer variables.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;uint8_t usb_data_buffer[USB_DATA_BUFFER_TEM_LENGTH] ATTR_ALIGNED(64) __DATA(USBRAM_SECTION);&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;uint32_t usb_data_buffer_size;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;uint32_t usb_data_buffer_index;&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;IMHO, CDC mode is currently unusable in a "two way communication" production environment.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 15 Jun 2016 16:47:26 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/Shared-memory-buffer-nxpUSBLib/m-p/523994#M6630</guid>
      <dc:creator>lpcware</dc:creator>
      <dc:date>2016-06-15T16:47:26Z</dc:date>
    </item>
    <item>
      <title>Re: Shared memory buffer - nxpUSBLib</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/Shared-memory-buffer-nxpUSBLib/m-p/523995#M6631</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;STRONG&gt;Content originally posted in LPCWare by triffid_hunter on Sat Jul 07 03:58:22 MST 2012&lt;/STRONG&gt;&lt;BR /&gt;&lt;SPAN&gt;wow that's a huge show stopper for me using nxpUSBLib, thanks for the heads up guys :)&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 15 Jun 2016 16:47:26 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/Shared-memory-buffer-nxpUSBLib/m-p/523995#M6631</guid>
      <dc:creator>lpcware</dc:creator>
      <dc:date>2016-06-15T16:47:26Z</dc:date>
    </item>
    <item>
      <title>Re: Shared memory buffer - nxpUSBLib</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/Shared-memory-buffer-nxpUSBLib/m-p/523996#M6632</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;STRONG&gt;Content originally posted in LPCWare by tuong on Thu Jul 12 00:55:23 MST 2012&lt;/STRONG&gt;&lt;BR /&gt;&lt;SPAN&gt;Hi All,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I also think seperating the buffer for IN and OUT can slove this issue.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;BTW, have you try the demo running on ROM stack by define:&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; #define USE_USB_ROM_STACK&amp;nbsp; 1&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;With best regards!&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 15 Jun 2016 16:47:27 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/Shared-memory-buffer-nxpUSBLib/m-p/523996#M6632</guid>
      <dc:creator>lpcware</dc:creator>
      <dc:date>2016-06-15T16:47:27Z</dc:date>
    </item>
    <item>
      <title>Re: Shared memory buffer - nxpUSBLib</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/Shared-memory-buffer-nxpUSBLib/m-p/523997#M6633</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;STRONG&gt;Content originally posted in LPCWare by Hansi on Sat Aug 04 13:20:28 MST 2012&lt;/STRONG&gt;&lt;BR /&gt;&lt;SPAN&gt;I also found the problem of the original poster annoying. Why not have a separate buffer for _every_ endpoint instead of one common buffer? That would IMHO follow the original intention of the USB core and its Endpoint command/status list (see user manual, p. 203ff). The buffer could be reserved Endpoint_ConfigureEndpoint() automatically.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Bye&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp; Hansi&lt;/SPAN&gt;&lt;BR /&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 15 Jun 2016 16:47:27 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/Shared-memory-buffer-nxpUSBLib/m-p/523997#M6633</guid>
      <dc:creator>lpcware</dc:creator>
      <dc:date>2016-06-15T16:47:27Z</dc:date>
    </item>
    <item>
      <title>Re: Shared memory buffer - nxpUSBLib</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/Shared-memory-buffer-nxpUSBLib/m-p/523998#M6634</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;STRONG&gt;Content originally posted in LPCWare by peplin on Wed Sep 05 13:05:06 MST 2012&lt;/STRONG&gt;&lt;BR /&gt;&lt;SPAN&gt;&lt;SPAN&gt;I've started working on a solution for this in my fork of the library, in the 'buffer-per-endpoint' branch: &lt;/SPAN&gt;&lt;A class="jive-link-external-small" href="https://community.nxp.com/external-link.jspa?url=https%3A%2F%2Fgithub.com%2Fopenxc%2FnxpUSBlib%2Ftree%2Fbuffer-per-endpoint" rel="nofollow" target="_blank"&gt;https://github.com/openxc/nxpUSBlib/tree/buffer-per-endpoint&lt;/A&gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;The first step is to have it use a separate buffer for each endpoint. That's working, at least with the LPC1768 board I have to test on. The next step is to use separate buffers for IN/OUT on each endpoint as well.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 15 Jun 2016 16:47:28 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/Shared-memory-buffer-nxpUSBLib/m-p/523998#M6634</guid>
      <dc:creator>lpcware</dc:creator>
      <dc:date>2016-06-15T16:47:28Z</dc:date>
    </item>
    <item>
      <title>Re: Shared memory buffer - nxpUSBLib</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/Shared-memory-buffer-nxpUSBLib/m-p/523999#M6635</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;STRONG&gt;Content originally posted in LPCWare by mozmck on Tue Jul 30 09:17:05 MST 2013&lt;/STRONG&gt;&lt;BR /&gt;&lt;SPAN&gt;Did this problem ever get fixed/resolved?&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 15 Jun 2016 16:47:29 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/Shared-memory-buffer-nxpUSBLib/m-p/523999#M6635</guid>
      <dc:creator>lpcware</dc:creator>
      <dc:date>2016-06-15T16:47:29Z</dc:date>
    </item>
    <item>
      <title>Re: Shared memory buffer - nxpUSBLib</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/Shared-memory-buffer-nxpUSBLib/m-p/524000#M6636</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;STRONG&gt;Content originally posted in LPCWare by triffid_hunter on Tue Jul 30 17:36:24 MST 2013&lt;/STRONG&gt;&lt;BR /&gt;&lt;SPAN&gt;&lt;A class="jive-link-external-small" href="https://community.nxp.com/external-link.jspa?url=https%3A%2F%2Fgithub.com%2Farthurwolf%2FSmoothie%2Ftree%2Fmaster%2Fsrc%2Flibs%2FUSBDevice" rel="nofollow" target="_blank"&gt;https://github.com/arthurwolf/Smoothie/tree/master/src/libs/USBDevice&lt;/A&gt;&lt;SPAN&gt; may interest you :)&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 15 Jun 2016 16:47:29 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/Shared-memory-buffer-nxpUSBLib/m-p/524000#M6636</guid>
      <dc:creator>lpcware</dc:creator>
      <dc:date>2016-06-15T16:47:29Z</dc:date>
    </item>
  </channel>
</rss>

