<?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: How to make edma read 16-bits MSB as pdm data width is 32-bits in i.MX Processors</title>
    <link>https://community.nxp.com/t5/i-MX-Processors/How-to-make-edma-read-16-bits-MSB-as-pdm-data-width-is-32-bits/m-p/1492960#M192796</link>
    <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;I review the code about the s_buffer and I suggest changing the size of the buffer in macro [BUFFER_SIZE] to 2 bytes.&lt;/P&gt;&lt;LI-CODE lang="c"&gt;if (s_bufferValidBlock &amp;gt; 0)
{
    pdmXfer.data         = (uint8_t *)((uint32_t)s_buffer + s_readIndex * BUFFER_SIZE);
    pdmXfer.dataSize     = BUFFER_SIZE;
    pdmXfer.linkTransfer = NULL;
    if (kStatus_Success == PDM_TransferReceiveEDMA(DEMO_PDM, &amp;amp;s_pdmRxHandle, &amp;amp;pdmXfer))
    {
        s_readIndex++;
    }
    if (s_readIndex == BUFFER_NUMBER)
    {
        s_readIndex = 0U;
    }
}&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;I hope this works for your application if you need more information please let me know.&lt;/P&gt;&lt;P&gt;Best regards,&lt;BR /&gt;Pavel&lt;/P&gt;</description>
    <pubDate>Thu, 21 Jul 2022 02:57:45 GMT</pubDate>
    <dc:creator>Pavel_Hernandez</dc:creator>
    <dc:date>2022-07-21T02:57:45Z</dc:date>
    <item>
      <title>How to make edma read 16-bits MSB as pdm data width is 32-bits</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/How-to-make-edma-read-16-bits-MSB-as-pdm-data-width-is-32-bits/m-p/1490803#M192643</link>
      <description>&lt;P&gt;Dear support,&lt;/P&gt;&lt;P&gt;As I use RT1170, the PDM data width is 32-bits, but I just need a 16-bits audio data. And I'd like to use the pdm_sai_edma SDK for&amp;nbsp;faster data transfer, how can I make&amp;nbsp;edma read just 16-bits MSB of pdm data and then send it to s_buffer? (I can get 16-bits audio data by taking 16-bits MSB when 32-bits data get to s_buffer, but I perfer to do it as edma reading and then I just need to transfer half the amount of data)&lt;/P&gt;&lt;P&gt;Thanks.&lt;/P&gt;</description>
      <pubDate>Mon, 18 Jul 2022 06:34:19 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/How-to-make-edma-read-16-bits-MSB-as-pdm-data-width-is-32-bits/m-p/1490803#M192643</guid>
      <dc:creator>yalin</dc:creator>
      <dc:date>2022-07-18T06:34:19Z</dc:date>
    </item>
    <item>
      <title>Re: How to make edma read 16-bits MSB as pdm data width is 32-bits</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/How-to-make-edma-read-16-bits-MSB-as-pdm-data-width-is-32-bits/m-p/1492960#M192796</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;I review the code about the s_buffer and I suggest changing the size of the buffer in macro [BUFFER_SIZE] to 2 bytes.&lt;/P&gt;&lt;LI-CODE lang="c"&gt;if (s_bufferValidBlock &amp;gt; 0)
{
    pdmXfer.data         = (uint8_t *)((uint32_t)s_buffer + s_readIndex * BUFFER_SIZE);
    pdmXfer.dataSize     = BUFFER_SIZE;
    pdmXfer.linkTransfer = NULL;
    if (kStatus_Success == PDM_TransferReceiveEDMA(DEMO_PDM, &amp;amp;s_pdmRxHandle, &amp;amp;pdmXfer))
    {
        s_readIndex++;
    }
    if (s_readIndex == BUFFER_NUMBER)
    {
        s_readIndex = 0U;
    }
}&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;I hope this works for your application if you need more information please let me know.&lt;/P&gt;&lt;P&gt;Best regards,&lt;BR /&gt;Pavel&lt;/P&gt;</description>
      <pubDate>Thu, 21 Jul 2022 02:57:45 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/How-to-make-edma-read-16-bits-MSB-as-pdm-data-width-is-32-bits/m-p/1492960#M192796</guid>
      <dc:creator>Pavel_Hernandez</dc:creator>
      <dc:date>2022-07-21T02:57:45Z</dc:date>
    </item>
    <item>
      <title>Re: How to make edma read 16-bits MSB as pdm data width is 32-bits</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/How-to-make-edma-read-16-bits-MSB-as-pdm-data-width-is-32-bits/m-p/1493673#M192848</link>
      <description>&lt;P&gt;Hello Pavel_Hernandez,&lt;/P&gt;&lt;P&gt;Do you mean to modify code like the following in pdm_sai_edma.c?&lt;/P&gt;&lt;P&gt;#define BUFFER_SIZE (16)&lt;/P&gt;&lt;P&gt;When I do it, the demo will be blocked, and the log is like the following.&lt;/P&gt;&lt;P&gt;PDM SAI Edma example started!&lt;BR /&gt;ASSERT ERROR " fsl_edma.c:1013 : (transferBytes % bytesEachRequest) == 0U&lt;/P&gt;</description>
      <pubDate>Fri, 22 Jul 2022 01:50:05 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/How-to-make-edma-read-16-bits-MSB-as-pdm-data-width-is-32-bits/m-p/1493673#M192848</guid>
      <dc:creator>yalin</dc:creator>
      <dc:date>2022-07-22T01:50:05Z</dc:date>
    </item>
    <item>
      <title>Re: How to make edma read 16-bits MSB as pdm data width is 32-bits</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/How-to-make-edma-read-16-bits-MSB-as-pdm-data-width-is-32-bits/m-p/1494220#M192884</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;The number indicated in the macro&amp;nbsp;&lt;SPAN&gt;BUFFER_SIZE is in bytes, 2 bytes for 16 bits, but recently the IDE [11.6] and the SDK [2.12] were updated, could you try to use the new version, I saw this change for this.&lt;/SPAN&gt;&lt;/P&gt;&lt;LI-SPOILER&gt;xfer.dataSize = BUFFER_SIZE * 2U;&lt;/LI-SPOILER&gt;&lt;P&gt;&lt;SPAN&gt;Best regards,&lt;BR /&gt;Pavel&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 22 Jul 2022 20:14:37 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/How-to-make-edma-read-16-bits-MSB-as-pdm-data-width-is-32-bits/m-p/1494220#M192884</guid>
      <dc:creator>Pavel_Hernandez</dc:creator>
      <dc:date>2022-07-22T20:14:37Z</dc:date>
    </item>
  </channel>
</rss>

