<?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: LPC55S69 USB device receives corrupt data in LPC Microcontrollers</title>
    <link>https://community.nxp.com/t5/LPC-Microcontrollers/LPC55S69-USB-device-receives-corrupt-data/m-p/1227533#M44016</link>
    <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;We need to check it internally. Will keep you informed.&lt;/P&gt;
&lt;P&gt;Thanks,&lt;/P&gt;
&lt;P&gt;Jun Zhang&lt;/P&gt;</description>
    <pubDate>Sun, 07 Feb 2021 08:25:38 GMT</pubDate>
    <dc:creator>ZhangJennie</dc:creator>
    <dc:date>2021-02-07T08:25:38Z</dc:date>
    <item>
      <title>LPC55S69 USB device receives corrupt data</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/LPC55S69-USB-device-receives-corrupt-data/m-p/1221742#M44007</link>
      <description>&lt;P&gt;Hello, we need some help solving a USB data corruption problem on the&lt;BR /&gt;LPC55S69 (or perhaps the problem is on the i.MX8M Quad).&lt;/P&gt;&lt;P&gt;We are building a system that includes an i.MX8M acting as a USB host&lt;BR /&gt;connecting to an LPC55S69 acting as a high speed USB device. We see USB&lt;BR /&gt;messages sent from the host and received by the LPC55S69 that are&lt;BR /&gt;corrupted by the time they are stored in RAM. I have used a Beagle USB&lt;BR /&gt;480 analyzer to capture the bus traffic and it sees intact data,&lt;BR /&gt;suggesting that the corruption is happening in the LPC55S69. However,&lt;BR /&gt;this corruption never happens when an x86 laptop is used as the host,&lt;BR /&gt;and happens very frequently when the i.MX8M is the host. Using the x86&lt;BR /&gt;PC as a host I can send (and receive the replies to) hundreds of&lt;BR /&gt;thousands of consecutive messages without error, but using the i.MX8M as&lt;BR /&gt;a host I get at most one or two correct transfers before a failure. I&lt;BR /&gt;have not been able to identify a specific difference between the&lt;BR /&gt;messages sent by the PC and the ones sent by the i.MX8M.&lt;/P&gt;&lt;P&gt;We originally encountered the problem with data packets of the DFU&lt;BR /&gt;protocol, but have reduced our code in the MCU to a simple&lt;BR /&gt;vendor-defined "echo" protocol to allow the problem to be easily&lt;BR /&gt;reproduced. It simply receives a message into a buffer and then allows&lt;BR /&gt;the host to request the same buffer to be sent back. The CPU does not&lt;BR /&gt;read or write the buffer. The host side software for this test is a&lt;BR /&gt;small Python 3 program.&lt;/P&gt;&lt;P&gt;The particular form of data corruption is usually limited to the first&lt;BR /&gt;16 bytes of the received message, and usually affects entire 32-bit&lt;BR /&gt;words, but not necessarily all of the 32-bit words in the first 16&lt;BR /&gt;bytes. For example, we might see that only the second and fourth word&lt;BR /&gt;of the buffer are corrupt. Each word that is corrupt contains a copy of&lt;BR /&gt;some other 32-bit word later in the message.&lt;/P&gt;&lt;P&gt;Messages of 64 bytes or shorter do not experience this corruption. It&lt;BR /&gt;is easy to reproduce with 80-byte transfers and happens at least up to&lt;BR /&gt;512 bytes as well. The problem does not happen when the LPC55S69's&lt;BR /&gt;full speed interface is used - only on the high speed interface.&lt;/P&gt;&lt;P&gt;The problem can be reproduced using the MCIMX8M-EVKB as the host,&lt;BR /&gt;running the NXP reference Linux (4.9.88-imx) image with the addition of&lt;BR /&gt;the Python 3 "usb" module, and the LPCXpresso55S69 development board as&lt;BR /&gt;the device.&lt;/P&gt;&lt;P&gt;A typical run of the test looks like this:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;root@imx8mqevk:~# lsusb
Bus 002 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 001 Device 002: ID 1fc9:0094 NXP Semiconductors
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
root@imx8mqevk:~# date | ./usbecho
Found 001:002 1FC9:0094 MCU VIRTUAL COM DEMO None
Data payload is 29 bytes.
Good match.
Success: received data matched sent data.
root@imx8mqevk:~# dd if=/dev/urandom bs=80 count=1 of=/tmp/shortfile
1+0 records in
1+0 records out
80 bytes copied, 0.000155521 s, 514 kB/s
root@imx8mqevk:~# ./usbecho &amp;lt; /tmp/shortfile
Found 001:002 1FC9:0094 MCU VIRTUAL COM DEMO None
Data payload is 80 bytes.
Receiving...
Failure: received data does not match sent data.
&amp;lt; d9eeb869024c4f7fac0b9b79331f7d36e7a04b7c159513d0d2277541c523a006698188b05c3c8db46bb6ace9e5c49341c4b603177eff7dee3bac0bca1b690940ed4f333ddc64ccb8b404a109126ca82a
&amp;gt; ed4f333ddc64ccb8b404a109126ca82ae7a04b7c159513d0d2277541c523a006698188b05c3c8db46bb6ace9e5c49341c4b603177eff7dee3bac0bca1b690940ed4f333ddc64ccb8b404a109126ca82a&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;In this case you can see that the first 16 bytes of the data have not been transferred correctly - specifically, they have been replaced with a copy of the last 16 bytes of the message.&lt;/P&gt;&lt;P&gt;Please find attached:&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;a patch to the NXP example program lpcxpresso55s69_dev_cdc_vcom_freertos that adds the "echo" functionality&lt;BR /&gt;The patched program, built with MCUXpresso, runs on the LPCXpresso55S69 board.&lt;/LI&gt;&lt;LI&gt;a Python 3 program to send a packet to the device, then read it back and check it for correctness&lt;BR /&gt;This program runs on x86 desktop Linux or on i.MX8M Linux.&lt;/LI&gt;&lt;LI&gt;a Beagle USB data capture file showing a packet on its way to the device and a packet reading back a corrupted copy of the data.&lt;/LI&gt;&lt;LI&gt;a screenshot showing the same&lt;/LI&gt;&lt;LI&gt;two Beagle USB data capture files showing "good" transfers (no corruption), one from the same i.MX8M board and one from the x86 laptop.&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Mike&lt;/P&gt;</description>
      <pubDate>Fri, 05 Feb 2021 18:41:11 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/LPC55S69-USB-device-receives-corrupt-data/m-p/1221742#M44007</guid>
      <dc:creator>mditto1</dc:creator>
      <dc:date>2021-02-05T18:41:11Z</dc:date>
    </item>
    <item>
      <title>Re: LPC55S69 USB device receives corrupt data</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/LPC55S69-USB-device-receives-corrupt-data/m-p/1222867#M44008</link>
      <description>&lt;P&gt;I wrote:&lt;/P&gt;&lt;BLOCKQUOTE&gt;&lt;P&gt;The particular form of data corruption is usually limited to the first&lt;BR /&gt;16 bytes of the received message,&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;I should clarify that this is when using an 80-byte message.&amp;nbsp; Presumably this has something to do with the 64-byte packet size on high speed control transfers, resulting in the last 16 bytes being sent in a second data packet.&lt;/P&gt;</description>
      <pubDate>Thu, 28 Jan 2021 20:22:39 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/LPC55S69-USB-device-receives-corrupt-data/m-p/1222867#M44008</guid>
      <dc:creator>mditto1</dc:creator>
      <dc:date>2021-01-28T20:22:39Z</dc:date>
    </item>
    <item>
      <title>Re: LPC55S69 USB device receives corrupt data</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/LPC55S69-USB-device-receives-corrupt-data/m-p/1223991#M44009</link>
      <description>&lt;P&gt;From your description. this problem only happens when message is longer than 64bytes, because you said&amp;nbsp;&lt;SPAN&gt;"Messages of 64 bytes or shorter do not experience this corruption."&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;If you don't use&amp;nbsp;i.MX8M send data, message still can't longer than 64byes? As we need to identify the problem is on LPC or i.MX8M.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Have a nice day,&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Jun Zhang&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 01 Feb 2021 10:13:36 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/LPC55S69-USB-device-receives-corrupt-data/m-p/1223991#M44009</guid>
      <dc:creator>ZhangJennie</dc:creator>
      <dc:date>2021-02-01T10:13:36Z</dc:date>
    </item>
    <item>
      <title>Re: LPC55S69 USB device receives corrupt data</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/LPC55S69-USB-device-receives-corrupt-data/m-p/1223998#M44010</link>
      <description>&lt;P&gt;Messages of any size from a PC are received correctly on the LPC.&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Mike&lt;/P&gt;</description>
      <pubDate>Tue, 02 Feb 2021 02:27:08 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/LPC55S69-USB-device-receives-corrupt-data/m-p/1223998#M44010</guid>
      <dc:creator>mditto1</dc:creator>
      <dc:date>2021-02-02T02:27:08Z</dc:date>
    </item>
    <item>
      <title>Re: LPC55S69 USB device receives corrupt data</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/LPC55S69-USB-device-receives-corrupt-data/m-p/1224464#M44011</link>
      <description>&lt;P&gt;So the problem is only on data from iMX8M. Could you collect the same data from iMX8M and PC, check them with USB analyzer. What's the difference?&lt;/P&gt;</description>
      <pubDate>Tue, 02 Feb 2021 07:05:54 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/LPC55S69-USB-device-receives-corrupt-data/m-p/1224464#M44011</guid>
      <dc:creator>ZhangJennie</dc:creator>
      <dc:date>2021-02-02T07:05:54Z</dc:date>
    </item>
    <item>
      <title>Re: LPC55S69 USB device receives corrupt data</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/LPC55S69-USB-device-receives-corrupt-data/m-p/1224786#M44012</link>
      <description>&lt;P&gt;I attached Beagle capture files to my initial report above.&amp;nbsp; You can view them with the "data center" software from &lt;A href="https://www.totalphase.com/products/data-center/" target="_blank" rel="noopener"&gt;https://www.totalphase.com/products/data-center/&lt;/A&gt;.&lt;/P&gt;&lt;P&gt;I did not see any great difference between the successful and corrupted runs.&amp;nbsp; In both cases, the 80-byte transfer is broken into a 64-byte packet and a 16-byte packet as expected (high speed control transfers have a maximum packet size of 64 bytes).&amp;nbsp; The 64-byte packet is re-transmitted one time, and the 16-byte packet is transmitted only once.&amp;nbsp; The data in the first packet is correct (in the initial transmission and in the re-transmission) when captured by the analyzer, but in the LPC memory it is corrupt only in the i.MX8M case.&amp;nbsp; The only thing I noticed was minor timing differences.&amp;nbsp; I'm attaching screenshots showing these two test runs here.&lt;/P&gt;&lt;P&gt;Mike&lt;/P&gt;</description>
      <pubDate>Tue, 02 Feb 2021 14:40:29 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/LPC55S69-USB-device-receives-corrupt-data/m-p/1224786#M44012</guid>
      <dc:creator>mditto1</dc:creator>
      <dc:date>2021-02-02T14:40:29Z</dc:date>
    </item>
    <item>
      <title>Re: LPC55S69 USB device receives corrupt data</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/LPC55S69-USB-device-receives-corrupt-data/m-p/1227093#M44013</link>
      <description>&lt;P&gt;The problem is mostly on iMX8M side. How do you think? Please let me know if you don't think.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Can you check why your iMX can't generate same USB wave as PC?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 05 Feb 2021 11:02:55 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/LPC55S69-USB-device-receives-corrupt-data/m-p/1227093#M44013</guid>
      <dc:creator>ZhangJennie</dc:creator>
      <dc:date>2021-02-05T11:02:55Z</dc:date>
    </item>
    <item>
      <title>Re: LPC55S69 USB device receives corrupt data</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/LPC55S69-USB-device-receives-corrupt-data/m-p/1227249#M44014</link>
      <description>&lt;P&gt;It's very difficult to say.&amp;nbsp; Clearly the problem only happens when the iMX8M is involved.&lt;/P&gt;&lt;P&gt;But consider this:&lt;/P&gt;&lt;P&gt;Look at evk-evk-bad.png.&amp;nbsp; At index 43, a "good" transfer of 80 bytes goes from host to device.&amp;nbsp; At index 74, the transfer in the opposite direction shows corrupt data.&amp;nbsp; Since the host-&amp;gt;device transfer is expanded in this display, we can look at the individual packets.&amp;nbsp; Index 48 shows the first attempt to send bytes 0-63, and this attempt failed (NAK at index 51).&amp;nbsp; Index 52 shows the second attempt to send those same bytes and the OUT packet at index 58 shows the bytes are not yet corrupted and the NYET packet at index 59 shows the LPC received the packet.&amp;nbsp; We assume that those bytes 0-63 were stored correctly in LPC memory at that point.&lt;/P&gt;&lt;P&gt;But the data transfer is not done yet - it's an 80-byte transfer so there are still 16 more bytes to send.&amp;nbsp; At index 60 there is another OUT transaction with those 16 bytes.&amp;nbsp; At index 66 we see the exact values of those 16 bytes, and the acknowledgement at index 67 (and ACK at index 72 for the entire control transfer).&amp;nbsp; We assume that the final 16 bytes were stored correctly in LPC memory at that point.&lt;/P&gt;&lt;P&gt;But how, exactly did those 16 bytes ALSO get stored at the beginning of the RAM buffer?&amp;nbsp; Those bytes appeared on the wire exactly once (index 66).&amp;nbsp; But they appear in RAM in two places (offset 0-15 and offset 64-79).&amp;nbsp; Why did the LPC's USB hardware and DMA engine store those bytes in RAM twice?&lt;/P&gt;&lt;P&gt;This mystery suggests a flaw on the LPC side.&amp;nbsp; But it does not explain why the problem happens only when the iMX8M is the host.&lt;/P&gt;&lt;P&gt;To reiterate, here are the bytes the iMX8M sent on the wire:&lt;/P&gt;&lt;P&gt;&lt;FONT face="courier new,courier"&gt;D9EEB869 024C4F7F AC0B9B79 331F7D36&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;E7A04B7C 159513D0 D2277541 C523A006&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;698188B0 5C3C8DB4 6BB6ACE9 E5C49341&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;C4B60317 7EFF7DEE 3BAC0BCA 1B690940&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier" color="#008000"&gt;ED4F333D DC64CCB8 B404A109 126CA82A&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;And here are the bytes that appeared in RAM on the LPC:&lt;/P&gt;&lt;P&gt;&lt;FONT face="courier new,courier" color="#008000"&gt;ED4F333D DC64CCB8 B404A109 126CA82A&lt;/FONT&gt;&amp;nbsp;&amp;nbsp; &amp;lt;-- why duplicated?&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;E7A04B7C 159513D0 D2277541 C523A006&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;698188B0 5C3C8DB4 6BB6ACE9 E5C49341&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;C4B60317 7EFF7DEE 3BAC0BCA 1B690940&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier" color="#008000"&gt;ED4F333D DC64CCB8 B404A109 126CA82A&lt;/FONT&gt;&amp;nbsp;&amp;nbsp; &amp;lt;-- why duplicated?&lt;/P&gt;&lt;P&gt;I think this should be investigated on the LPC side by someone who understands the USB1 high speed receive and DMA hardware.&lt;/P&gt;&lt;P&gt;Thanks,&lt;BR /&gt;Mike&lt;/P&gt;</description>
      <pubDate>Fri, 05 Feb 2021 18:47:16 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/LPC55S69-USB-device-receives-corrupt-data/m-p/1227249#M44014</guid>
      <dc:creator>mditto1</dc:creator>
      <dc:date>2021-02-05T18:47:16Z</dc:date>
    </item>
    <item>
      <title>Re: LPC55S69 USB device receives corrupt data</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/LPC55S69-USB-device-receives-corrupt-data/m-p/1227323#M44015</link>
      <description>&lt;P&gt;By the way, based on a suggestion via our distributor, I noticed that I had not allocated the data buffer in dedicated USB RAM.&amp;nbsp; I made that change (adding &lt;STRONG&gt;&lt;FONT face="courier new,courier"&gt;USB_GLOBAL&lt;/FONT&gt;&lt;/STRONG&gt; to the variable declaration) and it did not make any difference.&amp;nbsp; I updated the &lt;FONT face="courier new,courier"&gt;usbecho.patch&lt;/FONT&gt; attachment above with this change anyway.&lt;/P&gt;</description>
      <pubDate>Fri, 05 Feb 2021 18:45:33 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/LPC55S69-USB-device-receives-corrupt-data/m-p/1227323#M44015</guid>
      <dc:creator>mditto1</dc:creator>
      <dc:date>2021-02-05T18:45:33Z</dc:date>
    </item>
    <item>
      <title>Re: LPC55S69 USB device receives corrupt data</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/LPC55S69-USB-device-receives-corrupt-data/m-p/1227533#M44016</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;We need to check it internally. Will keep you informed.&lt;/P&gt;
&lt;P&gt;Thanks,&lt;/P&gt;
&lt;P&gt;Jun Zhang&lt;/P&gt;</description>
      <pubDate>Sun, 07 Feb 2021 08:25:38 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/LPC55S69-USB-device-receives-corrupt-data/m-p/1227533#M44016</guid>
      <dc:creator>ZhangJennie</dc:creator>
      <dc:date>2021-02-07T08:25:38Z</dc:date>
    </item>
    <item>
      <title>Re: LPC55S69 USB device receives corrupt data</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/LPC55S69-USB-device-receives-corrupt-data/m-p/1229354#M44017</link>
      <description>&lt;P&gt;Could you please provide more information about the setup?&lt;/P&gt;
&lt;P&gt;- SDK version (have you tried using SDK2.9.0?).&lt;/P&gt;
&lt;P&gt;- USB SDK demo on LPC55 and application description (if not using demo from SDK: what classes are used, what's the application flow?)&lt;/P&gt;
&lt;P&gt;- Clk frequencies&lt;/P&gt;
&lt;P&gt;- Does it also happen with FS USB?&lt;/P&gt;
&lt;P&gt;- Have you tried other PCs?&lt;/P&gt;
&lt;P&gt;Thanks.&lt;/P&gt;
&lt;P&gt;Jun Zhang&lt;/P&gt;</description>
      <pubDate>Wed, 10 Feb 2021 14:53:48 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/LPC55S69-USB-device-receives-corrupt-data/m-p/1229354#M44017</guid>
      <dc:creator>ZhangJennie</dc:creator>
      <dc:date>2021-02-10T14:53:48Z</dc:date>
    </item>
    <item>
      <title>Re: LPC55S69 USB device receives corrupt data</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/LPC55S69-USB-device-receives-corrupt-data/m-p/1229409#M44018</link>
      <description>&lt;P&gt;The problem was first seen using&amp;nbsp;L5.4.3_1.0.0.&amp;nbsp; I reproduced it using the SD card image in the &lt;A href="https://www.nxp.com/webapp/sps/download/license.jsp?colCode=L4.9.88_2.0.0_MX8MQ&amp;amp;appType=file1&amp;amp;DOWNLOAD_ID=null&amp;amp;lang_cd=en" target="_blank" rel="noopener nofollow noopener noreferrer"&gt;Linux download page&lt;/A&gt;.&amp;nbsp; I've now downloaded L5.4.70_2.3.0_MX8MND3L and used the SD card image there.&amp;nbsp; The problem is the same in all cases.&lt;/P&gt;&lt;P&gt;The application I used to repro on the LPC55 is the lpcxpresso55s69_dev_cdc_vcom_freertos demo with the patch I attached to the initial message in this thread.&amp;nbsp; All it does is receive a control transfer into a buffer or generate a control transfer back to the host from that buffer.&lt;/P&gt;&lt;P&gt;- Clk frequencies&lt;/P&gt;&lt;P&gt;Whatever the USB demo uses, I didn't change them.&lt;/P&gt;&lt;P&gt;- Does it also happen with FS USB?&lt;/P&gt;&lt;P&gt;No, only with HS.&lt;/P&gt;&lt;P&gt;- Have you tried other PCs?&lt;/P&gt;&lt;P&gt;No.&lt;/P&gt;</description>
      <pubDate>Wed, 10 Feb 2021 16:10:43 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/LPC55S69-USB-device-receives-corrupt-data/m-p/1229409#M44018</guid>
      <dc:creator>mditto1</dc:creator>
      <dc:date>2021-02-10T16:10:43Z</dc:date>
    </item>
    <item>
      <title>Re: LPC55S69 USB device receives corrupt data</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/LPC55S69-USB-device-receives-corrupt-data/m-p/1230106#M44019</link>
      <description>&lt;P&gt;With some simple changes to the LPC firmware (which really shouldn't change the behavior) the problem is now reproducible using a Linux x86 PC as the host.&amp;nbsp; So this eliminates the i.MX8 host as the cause and someone at NXP has reproduced the problem internally and is driving an internal investigation into the LPC55S69 behavior.&lt;/P&gt;</description>
      <pubDate>Fri, 12 Feb 2021 00:14:39 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/LPC55S69-USB-device-receives-corrupt-data/m-p/1230106#M44019</guid>
      <dc:creator>mditto1</dc:creator>
      <dc:date>2021-02-12T00:14:39Z</dc:date>
    </item>
    <item>
      <title>Re: LPC55S69 USB device receives corrupt data</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/LPC55S69-USB-device-receives-corrupt-data/m-p/1230162#M44020</link>
      <description>&lt;P&gt;Thanks for your update. Good to know.&lt;/P&gt;
&lt;P&gt;As you said this issue was reproduced by nxp internally, I suggest go on tracking it. If any help from community support, please contact us again. On my side, once I get feedback for LPC USB HS known issue. I will let you know as well.&lt;/P&gt;</description>
      <pubDate>Fri, 12 Feb 2021 04:35:41 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/LPC55S69-USB-device-receives-corrupt-data/m-p/1230162#M44020</guid>
      <dc:creator>ZhangJennie</dc:creator>
      <dc:date>2021-02-12T04:35:41Z</dc:date>
    </item>
    <item>
      <title>Re: LPC55S69 USB device receives corrupt data</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/LPC55S69-USB-device-receives-corrupt-data/m-p/1230703#M44021</link>
      <description>&lt;P&gt;HI&lt;/P&gt;
&lt;P&gt;I got internal feedback, we were&amp;nbsp;able to reproduce the issue and&amp;nbsp; need to check further why the buffer is being corrupted when the buffer is aligned and placed in USB_RAM section.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;"&lt;/P&gt;
&lt;P&gt;Meanwhile, I could find 2 workarounds:&lt;/P&gt;
&lt;P&gt;- Option1: Define the echoBuffer array as not aligned in USB_RAM&lt;/P&gt;
&lt;PRE class="lia-code-sample  language-c"&gt;&lt;CODE&gt;USB_GLOBAL static uint8_t echoBuffer[256];&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;- Option 2: Define the echoBuffer array in SRAM (not USB_RAM), aligned to 64 bytes.&lt;/P&gt;
&lt;PRE class="lia-code-sample  language-markup"&gt;&lt;CODE&gt;USB_RAM_ADDRESS_ALIGNMENT(USB_DATA_ALIGN_SIZE) static uint8_t echoBuffer[256];&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;This is, instead of the current implementation:&lt;/P&gt;
&lt;P&gt;USB_GLOBAL USB_RAM_ADDRESS_ALIGNMENT(USB_DATA_ALIGN_SIZE) static uint8_t echoBuffer[256]; //@TEST&lt;/P&gt;
&lt;P&gt;"&lt;/P&gt;
&lt;P&gt;See //@TEST in attached examples.&lt;/P&gt;
&lt;P&gt;Please test how it works.&lt;/P&gt;
&lt;P&gt;Best Regards&lt;/P&gt;
&lt;P&gt;Jun Zhang&lt;/P&gt;</description>
      <pubDate>Sat, 13 Feb 2021 09:43:33 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/LPC55S69-USB-device-receives-corrupt-data/m-p/1230703#M44021</guid>
      <dc:creator>ZhangJennie</dc:creator>
      <dc:date>2021-02-13T09:43:33Z</dc:date>
    </item>
    <item>
      <title>Re: LPC55S69 USB device receives corrupt data</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/LPC55S69-USB-device-receives-corrupt-data/m-p/1230718#M44022</link>
      <description>&lt;P&gt;Jun, Thanks for the workaround suggestions.&amp;nbsp; Did you test them using the &lt;FONT face="courier new,courier"&gt;-l&lt;/FONT&gt; option to &lt;FONT face="courier new,courier"&gt;usbecho.py&lt;/FONT&gt;?&lt;/P&gt;&lt;P&gt;I changed the buffer to be intentionally unaligned and tried USB SRAM and regular SRAM.&amp;nbsp; The rate of failures dropped dramatically, but not to zero.&amp;nbsp; Here is a typical run:&lt;/P&gt;&lt;BLOCKQUOTE&gt;&lt;P&gt;&lt;FONT face="courier new,courier"&gt;root@imx8mqevk:~# ./usbecho.py -l &amp;lt;/tmp/shortfile&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;Found 001:065 1FC9:0094 MCU VIRTUAL COM DEMO None&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;Data payload is 80 bytes.&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;35 successful. Receiving...&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;Failure: received data does not match sent data.&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;&amp;lt; c9e461f46959e82c37b3ffebb7655b3151aa06fd487ce46010b7d47df1144205dfc5f121034a0a67c1bcdaeb30104697b4bce9c892377a8c6753bc01bea12747962661584c98df8b5c0f5b53a0398b1f&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;&amp;gt; 962661584c98df8b5c0f5b53a0398b1f51aa06fd487ce46010b7d47df1144205dfc5f121034a0a67c1bcdaeb30104697b4bce9c892377a8c6753bc01bea12747962661584c98df8b5c0f5b53a0398b1f&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;Failed after 35 successful matches&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;&lt;A href="mailto:root@imx8mqevk:~" target="_blank"&gt;root@imx8mqevk:~#&lt;/A&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;&lt;FONT face="courier new,courier"&gt;Thanks,&lt;BR /&gt;&lt;/FONT&gt;&lt;FONT face="courier new,courier"&gt;Mike&lt;/FONT&gt;&lt;/P&gt;</description>
      <pubDate>Sat, 13 Feb 2021 21:09:50 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/LPC55S69-USB-device-receives-corrupt-data/m-p/1230718#M44022</guid>
      <dc:creator>mditto1</dc:creator>
      <dc:date>2021-02-13T21:09:50Z</dc:date>
    </item>
    <item>
      <title>Re: LPC55S69 USB device receives corrupt data</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/LPC55S69-USB-device-receives-corrupt-data/m-p/1230749#M44023</link>
      <description>&lt;P&gt;Mike,&lt;/P&gt;
&lt;P&gt;What's the difference of using and not-using&amp;nbsp;&lt;SPAN&gt;the&amp;nbsp;&lt;/SPAN&gt;&lt;FONT face="courier new,courier"&gt;-l&lt;/FONT&gt;&lt;SPAN&gt;&amp;nbsp;option to&amp;nbsp;&lt;/SPAN&gt;&lt;FONT face="courier new,courier"&gt;usbecho.py &lt;STRONG&gt;on your side?&lt;/STRONG&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="courier new,courier"&gt;&lt;STRONG&gt;Could you please specify?&lt;/STRONG&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="courier new,courier"&gt;&lt;STRONG&gt;Thanks,&lt;/STRONG&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="courier new,courier"&gt;&lt;STRONG&gt;Jun Zhang&lt;/STRONG&gt;&lt;/FONT&gt;&lt;/P&gt;</description>
      <pubDate>Sun, 14 Feb 2021 14:24:54 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/LPC55S69-USB-device-receives-corrupt-data/m-p/1230749#M44023</guid>
      <dc:creator>ZhangJennie</dc:creator>
      <dc:date>2021-02-14T14:24:54Z</dc:date>
    </item>
    <item>
      <title>Re: LPC55S69 USB device receives corrupt data</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/LPC55S69-USB-device-receives-corrupt-data/m-p/1230859#M44024</link>
      <description>&lt;P&gt;&lt;FONT face="courier new,courier"&gt;-l&lt;/FONT&gt; runs the test repeatedly until it fails and reports how many successes there were before the failure.&lt;/P&gt;</description>
      <pubDate>Mon, 15 Feb 2021 07:33:58 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/LPC55S69-USB-device-receives-corrupt-data/m-p/1230859#M44024</guid>
      <dc:creator>mditto1</dc:creator>
      <dc:date>2021-02-15T07:33:58Z</dc:date>
    </item>
    <item>
      <title>Re: LPC55S69 USB device receives corrupt data</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/LPC55S69-USB-device-receives-corrupt-data/m-p/1230912#M44025</link>
      <description>&lt;P&gt;Both option 1 and option2 has the same issue?&lt;/P&gt;</description>
      <pubDate>Mon, 15 Feb 2021 09:47:08 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/LPC55S69-USB-device-receives-corrupt-data/m-p/1230912#M44025</guid>
      <dc:creator>ZhangJennie</dc:creator>
      <dc:date>2021-02-15T09:47:08Z</dc:date>
    </item>
    <item>
      <title>Re: LPC55S69 USB device receives corrupt data</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/LPC55S69-USB-device-receives-corrupt-data/m-p/1231495#M44026</link>
      <description>&lt;P&gt;I tested the code you sent, which I believe uses option 2 as sent, and I tested my code with the simple modification to guarantee misalignment:&lt;/P&gt;&lt;BLOCKQUOTE&gt;&lt;P&gt;&lt;FONT face="courier new,courier"&gt;USB_GLOBAL USB_DMA_NONINIT_DATA_ALIGN(USB_DATA_ALIGN_SIZE)&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;static uint8_t echoBuffer[&lt;FONT color="#339966"&gt;257&lt;/FONT&gt;];&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="courier new,courier"&gt;...&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="courier new,courier"&gt;controlRequest-&amp;gt;buffer = echoBuffer&lt;FONT color="#008000"&gt; + 1&lt;/FONT&gt;;&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;controlRequest-&amp;gt;length = min(controlRequest-&amp;gt;length,&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; sizeof echoBuffer&lt;FONT color="#008000"&gt; - 1&lt;/FONT&gt;);&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="courier new,courier"&gt;...&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="courier new,courier"&gt;controlRequest-&amp;gt;buffer = echoBuffer&lt;FONT color="#008000"&gt; + 1&lt;/FONT&gt;;&lt;/FONT&gt;&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;Both options have the same or very similar behavior - about 1 in 10 failure rate.&amp;nbsp; This is different from the original aligned behavior which fails at about 9 in 10 rate (rough figures).&lt;/P&gt;&lt;P&gt;If you test with the &lt;FONT face="courier new,courier"&gt;-l&lt;/FONT&gt; option, if the workaround is truly effective it will run endlessly (hundreds of thousands of successful transfers).&amp;nbsp; But using the workarounds, I haven't seen more than 44 successful transfers before a failure.&lt;/P&gt;</description>
      <pubDate>Tue, 16 Feb 2021 10:40:34 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/LPC55S69-USB-device-receives-corrupt-data/m-p/1231495#M44026</guid>
      <dc:creator>mditto1</dc:creator>
      <dc:date>2021-02-16T10:40:34Z</dc:date>
    </item>
  </channel>
</rss>

