<?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のトピックRe: i2s using LPCXpresso55S69</title>
    <link>https://community.nxp.com/t5/LPC-Microcontrollers/i2s-using-LPCXpresso55S69/m-p/1839767#M55809</link>
    <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;Regarding your question "How should I interpret the buffer?", I suppose you refer to the lpcxpresso55s69_i2s_interrupt_record_playback project in SDK, the audio buffer is&lt;/P&gt;
&lt;DIV style="background-color: #ffffff; padding: 0px 0px 0px 2px;"&gt;
&lt;DIV style="color: #000000; background-color: #ffffff; font-family: 'Consolas'; font-size: 10pt; white-space: pre;"&gt;
&lt;P style="background-color: #e8f2fe; margin: 0;"&gt;&lt;SPAN&gt;uint8_t&lt;/SPAN&gt;&lt;SPAN&gt; g_Music[].&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="background-color: #e8f2fe; margin: 0;"&gt;&lt;SPAN&gt;As the following data, the PCM data bit width is 16, so this is the data&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="background-color: #e8f2fe; margin: 0;"&gt;&lt;SPAN&gt;Left channel:0x0000U,0x0771U,0x0EDC,...&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="background-color: #e8f2fe; margin: 0;"&gt;&lt;SPAN&gt;Right channel:0x0000U,0x0771U,0x0EDC,....&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="background-color: #e8f2fe; margin: 0;"&gt;&lt;SPAN&gt;The left and right data are interleaved.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="background-color: #e8f2fe; margin: 0;"&gt;&lt;SPAN&gt;For the PCM to PWM conversion, you have to convert it yourself with software.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="background-color: #e8f2fe; margin: 0;"&gt;&lt;SPAN&gt;But the i.mxrt10xx for example i.mxrt1064 has MQS module, which can convert the PCM to PWM &lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="background-color: #e8f2fe; margin: 0;"&gt;&lt;SPAN&gt;by hardware MQS module.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="background-color: #e8f2fe; margin: 0;"&gt;&lt;SPAN&gt;On the PWM pin side, you have to connect inductor/capacitor to do analog filter.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="background-color: #e8f2fe; margin: 0;"&gt;&lt;SPAN&gt;This is i.mxrt1064 link:&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="background-color: #e8f2fe; margin: 0;"&gt;&lt;SPAN&gt;&lt;A href="https://www.nxp.com/products/processors-and-microcontrollers/arm-microcontrollers/i-mx-rt-crossover-mcus:IMX-RT-SERIES" target="_blank"&gt;https://www.nxp.com/products/processors-and-microcontrollers/arm-microcontrollers/i-mx-rt-crossover-mcus:IMX-RT-SERIES&lt;/A&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="background-color: #e8f2fe; margin: 0;"&gt;&amp;nbsp;&lt;/P&gt;
&lt;P style="background-color: #e8f2fe; margin: 0;"&gt;&lt;SPAN&gt;Hope it can help you&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="background-color: #e8f2fe; margin: 0;"&gt;&lt;SPAN&gt;BR&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="background-color: #e8f2fe; margin: 0;"&gt;&lt;SPAN&gt;XiangJun Rong&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="background-color: #e8f2fe; margin: 0;"&gt;&amp;nbsp;&lt;/P&gt;
&lt;P style="background-color: #e8f2fe; margin: 0;"&gt;&amp;nbsp;&lt;/P&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;DIV style="background-color: #ffffff; padding: 0px 0px 0px 2px;"&gt;
&lt;DIV style="color: #000000; background-color: #ffffff; font-family: 'Consolas'; font-size: 10pt; white-space: pre;"&gt;
&lt;P style="margin: 0;"&gt;&lt;SPAN&gt;__ALIGN_BEGIN&lt;/SPAN&gt; &lt;SPAN&gt;uint8_t&lt;/SPAN&gt;&lt;SPAN&gt; g_Music[] __ALIGN_END = {&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="margin: 0;"&gt;&lt;SPAN&gt; 0x00U, 0x00U, 0x00U, 0x00U, 0x71U, 0x07U, 0x71U, 0x07U, 0xDCU, 0x0EU, 0xDCU, 0x0EU, 0x39U, 0x16U, 0x39U, 0x16U,&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="margin: 0;"&gt;&lt;SPAN&gt; 0x84U, 0x1DU, 0x84U, 0x1DU, 0xB5U, 0x24U, 0xB5U, 0x24U, 0xC6U, 0x2BU, 0xC6U, 0x2BU, 0xB2U, 0x32U, 0xB2U, 0x32U,&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="margin: 0;"&gt;&lt;SPAN&gt; 0x71U, 0x39U, 0x71U, 0x39U, 0xFFU, 0x3FU, 0xFFU, 0x3FU, 0x55U, 0x46U, 0x55U, 0x46U, 0x6FU, 0x4CU, 0x6FU, 0x4CU,&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="margin: 0;"&gt;&lt;SPAN&gt; 0x46U, 0x52U, 0x46U, 0x52U, 0xD6U, 0x57U, 0xD6U, 0x57U, 0x19U, 0x5DU, 0x19U, 0x5DU, 0x0CU, 0x62U, 0x0CU, 0x62U,&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="margin: 0;"&gt;&lt;SPAN&gt; 0xABU, 0x66U, 0xABU, 0x66U, 0xF0U, 0x6AU, 0xF0U, 0x6AU, 0xD9U, 0x6EU, 0xD9U, 0x6EU, 0x61U, 0x72U, 0x61U, 0x72U,&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="margin: 0;"&gt;&lt;SPAN&gt; 0x87U, 0x75U, 0x87U, 0x75U, 0x46U, 0x78U, 0x46U, 0x78U, 0x9EU, 0x7AU, 0x9EU, 0x7AU, 0x8BU, 0x7CU, 0x8BU, 0x7CU,&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="margin: 0;"&gt;&lt;SPAN&gt; 0x0DU, 0x7EU, 0x0DU, 0x7EU, 0x21U, 0x7FU, 0x21U, 0x7FU, 0xC7U, 0x7FU, 0xC7U, 0x7FU, 0xFEU, 0x7FU, 0xFEU, 0x7FU,&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="margin: 0;"&gt;&lt;SPAN&gt; 0xC7U, 0x7FU, 0xC7U, 0x7FU, 0x21U, 0x7FU, 0x21U, 0x7FU, 0x0DU, 0x7EU, 0x0DU, 0x7EU, 0x8BU, 0x7CU, 0x8BU, 0x7CU,&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="margin: 0;"&gt;&lt;SPAN&gt; 0x9EU, 0x7AU, 0x9EU, 0x7AU, 0x46U, 0x78U, 0x46U, 0x78U, 0x87U, 0x75U, 0x87U, 0x75U, 0x61U, 0x72U, 0x61U, 0x72U,&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="margin: 0;"&gt;&lt;SPAN&gt; 0xD9U, 0x6EU, 0xD9U, 0x6EU, 0xF0U, 0x6AU, 0xF0U, 0x6AU, 0xABU, 0x66U, 0xABU, 0x66U, 0x0CU, 0x62U, 0x0CU, 0x62U,&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="margin: 0;"&gt;&lt;SPAN&gt; 0x19U, 0x5DU, 0x19U, 0x5DU, 0xD6U, 0x57U, 0xD6U&lt;/SPAN&gt;&lt;/P&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;</description>
    <pubDate>Wed, 03 Apr 2024 02:36:11 GMT</pubDate>
    <dc:creator>xiangjun_rong</dc:creator>
    <dc:date>2024-04-03T02:36:11Z</dc:date>
    <item>
      <title>i2s using LPCXpresso55S69</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/i2s-using-LPCXpresso55S69/m-p/1839606#M55805</link>
      <description>&lt;P&gt;&lt;SPAN&gt;Currently I'm trying to remake the example and create a ping-pong buffer using DMA. I am however unsure of how to interpret the data. It is 400 bytes which I would guess is 200 16-bit samples, 100 left and 100 right. so my questions are:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;How should I interpret the buffer? I want to perform DSP operations such as oversampling, and filtering (Before ultimately outputting through PWM) but first, I need to interpret the data correctly, but I am unsure what data type the bytes include. My first thought is to add bytes at index (i&amp;amp;i+1) to left and (i+2&amp;amp;i+3) and fill a new array to get left and right samples, but that doesn't really get me anywhere and I figure there must be an ''easier way''&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Secondly, I do not need to playback the audio, I only need the audio data. Can I simply remove the Tx functions? when I did this myself the program did not enter RXCallback&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;From what I understand from the examples in the SDK, the digital loopback initiates everything, RX callback is called when an operation is finished, so should I perform signal processing in main after filling a buffer with values either from the ping/pong, while the complimentary buffer is filled with a new line of data from i2s?&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;I tried making the i2s myself, but had no luck, and i guess i cannot use the pins directly associated to the codec if i want to use the codec myself&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Hope my question is clear, have a good day.&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 02 Apr 2024 17:43:18 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/i2s-using-LPCXpresso55S69/m-p/1839606#M55805</guid>
      <dc:creator>scoottroop</dc:creator>
      <dc:date>2024-04-02T17:43:18Z</dc:date>
    </item>
    <item>
      <title>Re: i2s using LPCXpresso55S69</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/i2s-using-LPCXpresso55S69/m-p/1839767#M55809</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;Regarding your question "How should I interpret the buffer?", I suppose you refer to the lpcxpresso55s69_i2s_interrupt_record_playback project in SDK, the audio buffer is&lt;/P&gt;
&lt;DIV style="background-color: #ffffff; padding: 0px 0px 0px 2px;"&gt;
&lt;DIV style="color: #000000; background-color: #ffffff; font-family: 'Consolas'; font-size: 10pt; white-space: pre;"&gt;
&lt;P style="background-color: #e8f2fe; margin: 0;"&gt;&lt;SPAN&gt;uint8_t&lt;/SPAN&gt;&lt;SPAN&gt; g_Music[].&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="background-color: #e8f2fe; margin: 0;"&gt;&lt;SPAN&gt;As the following data, the PCM data bit width is 16, so this is the data&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="background-color: #e8f2fe; margin: 0;"&gt;&lt;SPAN&gt;Left channel:0x0000U,0x0771U,0x0EDC,...&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="background-color: #e8f2fe; margin: 0;"&gt;&lt;SPAN&gt;Right channel:0x0000U,0x0771U,0x0EDC,....&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="background-color: #e8f2fe; margin: 0;"&gt;&lt;SPAN&gt;The left and right data are interleaved.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="background-color: #e8f2fe; margin: 0;"&gt;&lt;SPAN&gt;For the PCM to PWM conversion, you have to convert it yourself with software.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="background-color: #e8f2fe; margin: 0;"&gt;&lt;SPAN&gt;But the i.mxrt10xx for example i.mxrt1064 has MQS module, which can convert the PCM to PWM &lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="background-color: #e8f2fe; margin: 0;"&gt;&lt;SPAN&gt;by hardware MQS module.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="background-color: #e8f2fe; margin: 0;"&gt;&lt;SPAN&gt;On the PWM pin side, you have to connect inductor/capacitor to do analog filter.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="background-color: #e8f2fe; margin: 0;"&gt;&lt;SPAN&gt;This is i.mxrt1064 link:&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="background-color: #e8f2fe; margin: 0;"&gt;&lt;SPAN&gt;&lt;A href="https://www.nxp.com/products/processors-and-microcontrollers/arm-microcontrollers/i-mx-rt-crossover-mcus:IMX-RT-SERIES" target="_blank"&gt;https://www.nxp.com/products/processors-and-microcontrollers/arm-microcontrollers/i-mx-rt-crossover-mcus:IMX-RT-SERIES&lt;/A&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="background-color: #e8f2fe; margin: 0;"&gt;&amp;nbsp;&lt;/P&gt;
&lt;P style="background-color: #e8f2fe; margin: 0;"&gt;&lt;SPAN&gt;Hope it can help you&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="background-color: #e8f2fe; margin: 0;"&gt;&lt;SPAN&gt;BR&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="background-color: #e8f2fe; margin: 0;"&gt;&lt;SPAN&gt;XiangJun Rong&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="background-color: #e8f2fe; margin: 0;"&gt;&amp;nbsp;&lt;/P&gt;
&lt;P style="background-color: #e8f2fe; margin: 0;"&gt;&amp;nbsp;&lt;/P&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;DIV style="background-color: #ffffff; padding: 0px 0px 0px 2px;"&gt;
&lt;DIV style="color: #000000; background-color: #ffffff; font-family: 'Consolas'; font-size: 10pt; white-space: pre;"&gt;
&lt;P style="margin: 0;"&gt;&lt;SPAN&gt;__ALIGN_BEGIN&lt;/SPAN&gt; &lt;SPAN&gt;uint8_t&lt;/SPAN&gt;&lt;SPAN&gt; g_Music[] __ALIGN_END = {&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="margin: 0;"&gt;&lt;SPAN&gt; 0x00U, 0x00U, 0x00U, 0x00U, 0x71U, 0x07U, 0x71U, 0x07U, 0xDCU, 0x0EU, 0xDCU, 0x0EU, 0x39U, 0x16U, 0x39U, 0x16U,&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="margin: 0;"&gt;&lt;SPAN&gt; 0x84U, 0x1DU, 0x84U, 0x1DU, 0xB5U, 0x24U, 0xB5U, 0x24U, 0xC6U, 0x2BU, 0xC6U, 0x2BU, 0xB2U, 0x32U, 0xB2U, 0x32U,&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="margin: 0;"&gt;&lt;SPAN&gt; 0x71U, 0x39U, 0x71U, 0x39U, 0xFFU, 0x3FU, 0xFFU, 0x3FU, 0x55U, 0x46U, 0x55U, 0x46U, 0x6FU, 0x4CU, 0x6FU, 0x4CU,&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="margin: 0;"&gt;&lt;SPAN&gt; 0x46U, 0x52U, 0x46U, 0x52U, 0xD6U, 0x57U, 0xD6U, 0x57U, 0x19U, 0x5DU, 0x19U, 0x5DU, 0x0CU, 0x62U, 0x0CU, 0x62U,&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="margin: 0;"&gt;&lt;SPAN&gt; 0xABU, 0x66U, 0xABU, 0x66U, 0xF0U, 0x6AU, 0xF0U, 0x6AU, 0xD9U, 0x6EU, 0xD9U, 0x6EU, 0x61U, 0x72U, 0x61U, 0x72U,&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="margin: 0;"&gt;&lt;SPAN&gt; 0x87U, 0x75U, 0x87U, 0x75U, 0x46U, 0x78U, 0x46U, 0x78U, 0x9EU, 0x7AU, 0x9EU, 0x7AU, 0x8BU, 0x7CU, 0x8BU, 0x7CU,&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="margin: 0;"&gt;&lt;SPAN&gt; 0x0DU, 0x7EU, 0x0DU, 0x7EU, 0x21U, 0x7FU, 0x21U, 0x7FU, 0xC7U, 0x7FU, 0xC7U, 0x7FU, 0xFEU, 0x7FU, 0xFEU, 0x7FU,&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="margin: 0;"&gt;&lt;SPAN&gt; 0xC7U, 0x7FU, 0xC7U, 0x7FU, 0x21U, 0x7FU, 0x21U, 0x7FU, 0x0DU, 0x7EU, 0x0DU, 0x7EU, 0x8BU, 0x7CU, 0x8BU, 0x7CU,&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="margin: 0;"&gt;&lt;SPAN&gt; 0x9EU, 0x7AU, 0x9EU, 0x7AU, 0x46U, 0x78U, 0x46U, 0x78U, 0x87U, 0x75U, 0x87U, 0x75U, 0x61U, 0x72U, 0x61U, 0x72U,&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="margin: 0;"&gt;&lt;SPAN&gt; 0xD9U, 0x6EU, 0xD9U, 0x6EU, 0xF0U, 0x6AU, 0xF0U, 0x6AU, 0xABU, 0x66U, 0xABU, 0x66U, 0x0CU, 0x62U, 0x0CU, 0x62U,&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="margin: 0;"&gt;&lt;SPAN&gt; 0x19U, 0x5DU, 0x19U, 0x5DU, 0xD6U, 0x57U, 0xD6U&lt;/SPAN&gt;&lt;/P&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;</description>
      <pubDate>Wed, 03 Apr 2024 02:36:11 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/i2s-using-LPCXpresso55S69/m-p/1839767#M55809</guid>
      <dc:creator>xiangjun_rong</dc:creator>
      <dc:date>2024-04-03T02:36:11Z</dc:date>
    </item>
    <item>
      <title>Re: i2s using LPCXpresso55S69</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/i2s-using-LPCXpresso55S69/m-p/1842552#M55826</link>
      <description>Hello again, i've changed the DMA_Playback example to use Ping pong buffers. Currently I'm doing the signal processing in main but my first question is:&lt;BR /&gt;1. should I do it in call back or main? i need to interpolate the data etc, and I'm not sure if it would cause a big delay in the callback function. Also, if I use the PWM timers later on, I probably should use main right? i'm not sure of how the callback function actually works/ what flag to use to correctly perform operations in main, since now it switches from ping to pong quite poorly.&lt;BR /&gt;&lt;BR /&gt;2. From what I understand is that I receive 400 bytes of data, where the first two bytes are combined as a left sample, and the two after that are right samples (Since i2s are 16-bit samples). Is my way of thinking correct? i can always share my project if you need to have a look.&lt;BR /&gt;&lt;BR /&gt;Thank you!</description>
      <pubDate>Mon, 08 Apr 2024 16:24:45 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/i2s-using-LPCXpresso55S69/m-p/1842552#M55826</guid>
      <dc:creator>scoottroop</dc:creator>
      <dc:date>2024-04-08T16:24:45Z</dc:date>
    </item>
  </channel>
</rss>

