<?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のトピックLPC1347 send large data to Endpoint in a single transaction</title>
    <link>https://community.nxp.com/t5/LPC-Microcontrollers/LPC1347-send-large-data-to-Endpoint-in-a-single-transaction/m-p/689162#M27829</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi all,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am using a LPC1347 usbd_rom_composite&amp;nbsp;example codes(lpcopen_2_05_keil_iar_nxp_lpcxpresso_1347).&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am trying to send&amp;nbsp;data with size of over 10240 bytes to endpoint 0x82(device to host). And these 10240 bytes of data must be in one transfer. Data rate is not important.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;My device is Full Speed and the endpoint 2's&amp;nbsp;wMaxPacketSize is 0x40(64).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;My problem is, when I was calling the&amp;nbsp;USBD_API-&amp;gt;hw-&amp;gt;WriteEP() and set the data length larger than 64, my device sent unpredictable data length(not the one I set).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have also tried to devide data into 160 chunks(every chunk is 64bytes)&amp;nbsp;&amp;nbsp;and call the VCOM_Write() 160 times, but it gives me seperate transactions with 64bytes each. What I need is a single transfer with 10240 bytes of data. Is there anyway&amp;nbsp;to&amp;nbsp;achieve it?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you in advance!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Li Yong&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 01 Aug 2017 08:12:55 GMT</pubDate>
    <dc:creator>szlittle</dc:creator>
    <dc:date>2017-08-01T08:12:55Z</dc:date>
    <item>
      <title>LPC1347 send large data to Endpoint in a single transaction</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/LPC1347-send-large-data-to-Endpoint-in-a-single-transaction/m-p/689162#M27829</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi all,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am using a LPC1347 usbd_rom_composite&amp;nbsp;example codes(lpcopen_2_05_keil_iar_nxp_lpcxpresso_1347).&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am trying to send&amp;nbsp;data with size of over 10240 bytes to endpoint 0x82(device to host). And these 10240 bytes of data must be in one transfer. Data rate is not important.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;My device is Full Speed and the endpoint 2's&amp;nbsp;wMaxPacketSize is 0x40(64).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;My problem is, when I was calling the&amp;nbsp;USBD_API-&amp;gt;hw-&amp;gt;WriteEP() and set the data length larger than 64, my device sent unpredictable data length(not the one I set).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have also tried to devide data into 160 chunks(every chunk is 64bytes)&amp;nbsp;&amp;nbsp;and call the VCOM_Write() 160 times, but it gives me seperate transactions with 64bytes each. What I need is a single transfer with 10240 bytes of data. Is there anyway&amp;nbsp;to&amp;nbsp;achieve it?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you in advance!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Li Yong&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 01 Aug 2017 08:12:55 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/LPC1347-send-large-data-to-Endpoint-in-a-single-transaction/m-p/689162#M27829</guid>
      <dc:creator>szlittle</dc:creator>
      <dc:date>2017-08-01T08:12:55Z</dc:date>
    </item>
    <item>
      <title>Re: LPC1347 send large data to Endpoint in a single transaction</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/LPC1347-send-large-data-to-Endpoint-in-a-single-transaction/m-p/689163#M27830</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Li yong,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please notice that for US2.0 the max packet size for control transfer is 64B. If you want to implement a specifc control transfer, following is the operation you should follow:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;First, the user call-back function should be defined as the same format as the function pointer in USB_CTRL_TYPE.&lt;/P&gt;&lt;P&gt;USB_PARAM_CB_T USB_ReqVendor, then this call-back function should be assigned to this pointer of the USB_Handle during initialization.&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;For the call-back function &lt;SPAN&gt;USB_ReqVendor&lt;/SPAN&gt;:&lt;/P&gt;&lt;P&gt;typedef ErrorCode_t (*USB_PARAM_CB_T) (USBD_HANDLE_T hUsb, uint32_t param1);&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The first parameter is the USB_Handler, the second one is the USB_EVENT defined as below.&lt;/P&gt;&lt;P&gt;enum USBD_EVENT_T {&lt;BR /&gt; USB_EVT_SETUP =1, /**&amp;lt; 1 Setup Packet received */&lt;BR /&gt; USB_EVT_OUT, /**&amp;lt; 2 OUT Packet received */&lt;BR /&gt; USB_EVT_IN, /**&amp;lt; 3 IN Packet sent */&lt;BR /&gt; USB_EVT_OUT_NAK, /**&amp;lt; 4 OUT Packet - Not Acknowledged */&lt;BR /&gt; USB_EVT_IN_NAK, /**&amp;lt; 5 IN Packet - Not Acknowledged */&lt;BR /&gt; USB_EVT_OUT_STALL, /**&amp;lt; 6 OUT Packet - Stalled */&lt;BR /&gt; USB_EVT_IN_STALL, /**&amp;lt; 7 IN Packet - Stalled */&lt;BR /&gt; USB_EVT_OUT_DMA_EOT, /**&amp;lt; 8 DMA OUT EP - End of Transfer */&lt;BR /&gt; USB_EVT_IN_DMA_EOT, /**&amp;lt; 9 DMA IN EP - End of Transfer */&lt;BR /&gt; USB_EVT_OUT_DMA_NDR, /**&amp;lt; 10 DMA OUT EP - New Descriptor Request */&lt;BR /&gt; USB_EVT_IN_DMA_NDR, /**&amp;lt; 11 DMA IN EP - New Descriptor Request */&lt;BR /&gt; USB_EVT_OUT_DMA_ERR, /**&amp;lt; 12 DMA OUT EP - Error */&lt;BR /&gt; USB_EVT_IN_DMA_ERR, /**&amp;lt; 13 DMA IN EP - Error */&lt;BR /&gt; USB_EVT_RESET, /**&amp;lt; 14 Reset event recieved */&lt;BR /&gt; USB_EVT_SOF, /**&amp;lt; 15 Start of Frame event */&lt;BR /&gt; USB_EVT_DEV_STATE, /**&amp;lt; 16 Device status events */&lt;BR /&gt; USB_EVT_DEV_ERROR /**&amp;lt; 17 Device error events */&lt;BR /&gt;};&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;During setup stage of the USB control transfer, setup package data will be stored in the&amp;nbsp;SetupPacket of &lt;SPAN&gt;hUsb.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;During the data stage, the data will be stored in the&amp;nbsp;EP0Data of&amp;nbsp;hUsb for OUT_EVENT transfer, and user also should copy data in the&amp;nbsp;EP0Data of hUsb for IN_EVENT transfer.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;Hope it helps!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Best Regards,&lt;BR /&gt;Carlos Mendoza&lt;BR /&gt;Technical Support Engineer&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 02 Aug 2017 17:18:19 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/LPC1347-send-large-data-to-Endpoint-in-a-single-transaction/m-p/689163#M27830</guid>
      <dc:creator>Carlos_Mendoza</dc:creator>
      <dc:date>2017-08-02T17:18:19Z</dc:date>
    </item>
  </channel>
</rss>

