<?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>i.MX RT Crossover MCUs中的主题 USB DMA Read Endian Select</title>
    <link>https://community.nxp.com/t5/i-MX-RT-Crossover-MCUs/USB-DMA-Read-Endian-Select/m-p/970457#M4780</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Operating in USB Host Mode, I'm using the USB Audio class to read 16-bit, 16kHz PCM audio from a connected microphone.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The algorithm that processes the audio requires that the samples be&amp;nbsp;in big-endian format; however, it appears that all USB data is transferred in little-endian.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I noticed that the&amp;nbsp;USB Device Mode has&amp;nbsp;an Endian Select field to switch between the two types, but I have not been able to find any mechanism for converting from little-endian to big-endian when reading USB audio in host mode.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Can anyone suggest a mechanism to&amp;nbsp;accomplish this?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 25 Oct 2019 16:43:17 GMT</pubDate>
    <dc:creator>amwilhite</dc:creator>
    <dc:date>2019-10-25T16:43:17Z</dc:date>
    <item>
      <title>USB DMA Read Endian Select</title>
      <link>https://community.nxp.com/t5/i-MX-RT-Crossover-MCUs/USB-DMA-Read-Endian-Select/m-p/970457#M4780</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Operating in USB Host Mode, I'm using the USB Audio class to read 16-bit, 16kHz PCM audio from a connected microphone.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The algorithm that processes the audio requires that the samples be&amp;nbsp;in big-endian format; however, it appears that all USB data is transferred in little-endian.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I noticed that the&amp;nbsp;USB Device Mode has&amp;nbsp;an Endian Select field to switch between the two types, but I have not been able to find any mechanism for converting from little-endian to big-endian when reading USB audio in host mode.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Can anyone suggest a mechanism to&amp;nbsp;accomplish this?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 25 Oct 2019 16:43:17 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-RT-Crossover-MCUs/USB-DMA-Read-Endian-Select/m-p/970457#M4780</guid>
      <dc:creator>amwilhite</dc:creator>
      <dc:date>2019-10-25T16:43:17Z</dc:date>
    </item>
    <item>
      <title>Re: USB DMA Read Endian Select</title>
      <link>https://community.nxp.com/t5/i-MX-RT-Crossover-MCUs/USB-DMA-Read-Endian-Select/m-p/970458#M4781</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I checked the USB OS Adapter has the ENDIANNESS definition at &amp;lt;usb_osa.h&amp;gt;:&lt;/P&gt;&lt;P&gt;/*! @brief Define big endian */&lt;BR /&gt;#define USB_BIG_ENDIAN (0U)&lt;BR /&gt;/*! @brief Define little endian */&lt;BR /&gt;#define USB_LITTLE_ENDIAN (1U)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;/*! @brief Define current endian */&lt;BR /&gt;#define ENDIANNESS USB_LITTLE_ENDIAN&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The OS adapter (OSA) is used to wrap the differences between RTOSes and enable a USB stack with the&lt;BR /&gt;same code base and behavior.&lt;/P&gt;&lt;P&gt;Note&lt;BR /&gt;OSA should not be used in the USB application. Therefore, from the USB application viewpoint, OSA is invisible.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If your application doesn't use RTOS, it need to software convert data from little endian to big endian.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;best regards,&lt;/P&gt;&lt;P&gt;Mike&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 30 Oct 2019 06:13:16 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-RT-Crossover-MCUs/USB-DMA-Read-Endian-Select/m-p/970458#M4781</guid>
      <dc:creator>Hui_Ma</dc:creator>
      <dc:date>2019-10-30T06:13:16Z</dc:date>
    </item>
  </channel>
</rss>

