<?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>Kinetis MicrocontrollersのトピックSAI interface in both direction simultaneously. (MQX 4.1 / K70)</title>
    <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/SAI-interface-in-both-direction-simultaneously-MQX-4-1-K70/m-p/320040#M14315</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I am using a K70F512 and uses the MQX RTOS version 4.1.&lt;/P&gt;&lt;P&gt;I need to use the SAI interface in both directions simultaneously, and I need to know the exact delay from D/A-converter to A/D-converter &lt;SPAN class="short_text" lang="en"&gt;&lt;SPAN class="hps"&gt;because I need to measure audio phase &lt;SPAN class="short_text" lang="en"&gt;&lt;SPAN class="hps"&gt;difference down to 1 degree at 10KHz.&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="short_text" lang="en"&gt;&lt;SPAN class="hps"&gt;&lt;SPAN class="short_text" lang="en"&gt;&lt;SPAN class="hps"&gt;Do you have a example of initialize both direction in one call ? &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="short_text" lang="en"&gt;&lt;SPAN class="hps"&gt;&lt;SPAN class="short_text" lang="en"&gt;&lt;SPAN class="hps"&gt;How can I make sure that I don't get one audio clock sample &lt;SPAN class="short_text" lang="en"&gt;&lt;SPAN class="hps"&gt;difference in the timing from time to time ?&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="short_text" lang="en"&gt;&lt;SPAN class="hps"&gt;&lt;SPAN class="short_text" lang="en"&gt;&lt;SPAN class="hps"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="short_text" lang="en"&gt;&lt;SPAN class="hps"&gt;&lt;SPAN class="short_text" lang="en"&gt;&lt;SPAN class="hps"&gt;Poul-Erik.&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="short_text" lang="en"&gt;&lt;SPAN class="hps"&gt;&lt;SPAN class="short_text" lang="en"&gt;&lt;SPAN class="hps"&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 14 Jul 2014 14:43:00 GMT</pubDate>
    <dc:creator>poul-erikhansen</dc:creator>
    <dc:date>2014-07-14T14:43:00Z</dc:date>
    <item>
      <title>SAI interface in both direction simultaneously. (MQX 4.1 / K70)</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/SAI-interface-in-both-direction-simultaneously-MQX-4-1-K70/m-p/320040#M14315</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I am using a K70F512 and uses the MQX RTOS version 4.1.&lt;/P&gt;&lt;P&gt;I need to use the SAI interface in both directions simultaneously, and I need to know the exact delay from D/A-converter to A/D-converter &lt;SPAN class="short_text" lang="en"&gt;&lt;SPAN class="hps"&gt;because I need to measure audio phase &lt;SPAN class="short_text" lang="en"&gt;&lt;SPAN class="hps"&gt;difference down to 1 degree at 10KHz.&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="short_text" lang="en"&gt;&lt;SPAN class="hps"&gt;&lt;SPAN class="short_text" lang="en"&gt;&lt;SPAN class="hps"&gt;Do you have a example of initialize both direction in one call ? &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="short_text" lang="en"&gt;&lt;SPAN class="hps"&gt;&lt;SPAN class="short_text" lang="en"&gt;&lt;SPAN class="hps"&gt;How can I make sure that I don't get one audio clock sample &lt;SPAN class="short_text" lang="en"&gt;&lt;SPAN class="hps"&gt;difference in the timing from time to time ?&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="short_text" lang="en"&gt;&lt;SPAN class="hps"&gt;&lt;SPAN class="short_text" lang="en"&gt;&lt;SPAN class="hps"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="short_text" lang="en"&gt;&lt;SPAN class="hps"&gt;&lt;SPAN class="short_text" lang="en"&gt;&lt;SPAN class="hps"&gt;Poul-Erik.&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="short_text" lang="en"&gt;&lt;SPAN class="hps"&gt;&lt;SPAN class="short_text" lang="en"&gt;&lt;SPAN class="hps"&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 14 Jul 2014 14:43:00 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/SAI-interface-in-both-direction-simultaneously-MQX-4-1-K70/m-p/320040#M14315</guid>
      <dc:creator>poul-erikhansen</dc:creator>
      <dc:date>2014-07-14T14:43:00Z</dc:date>
    </item>
    <item>
      <title>Re: SAI interface in both direction simultaneously. (MQX 4.1 / K70)</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/SAI-interface-in-both-direction-simultaneously-MQX-4-1-K70/m-p/320041#M14316</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi, Poul Erik,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;We have example code for I2S module of&amp;nbsp; K70 based on MQX os, I suppose you have installed MQX, pls refer to the directory:&lt;/P&gt;&lt;P&gt;C:\Freescale\Freescale_MQX_4_0\mqx\examples\i2s_demo, there is example called "i2s_demo_twrk70f120m", I think you can run the code. No matter whether the frame clock/bit clock are from K70, ADC or DAC, I think you can use synchronous mode(both receiver/transmitter use the same bit clock and frame clock), even you can use asynchronous mode, but the same bit clock/ frame clock signals drive both the transmitter and receiver, in the above case, the DAC and ADC converters receve/transmit data at the same time, in other words, they sample simultaneously. I do not know what the&amp;nbsp; "&lt;SPAN class="short_text" lang="en"&gt;&lt;SPAN class="hps"&gt;phase &lt;SPAN class="short_text" lang="en"&gt;&lt;SPAN class="hps"&gt;difference" means and how you measure it.&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="short_text" lang="en"&gt;&lt;SPAN class="hps"&gt;&lt;SPAN class="short_text" lang="en"&gt;&lt;SPAN class="hps"&gt;I suppose you get the ADC sample firstly, in the next I2S cycle, you output the ADC sample to DAC, then test the phase difference, in theory, they has one conversion time phase shift, the additional phase shift is the difference of ADC and DAC conversion time.&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="short_text" lang="en"&gt;&lt;SPAN class="hps"&gt;&lt;SPAN class="short_text" lang="en"&gt;&lt;SPAN class="hps"&gt;If you use MQX os, I suspect that the receiver/transmitter data are saved in respective buffer, if you want to test the phase shift, I think it is okay to&amp;nbsp; just use interrupt mode without MQX.&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 16 Jul 2014 06:34:38 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/SAI-interface-in-both-direction-simultaneously-MQX-4-1-K70/m-p/320041#M14316</guid>
      <dc:creator>xiangjun_rong</dc:creator>
      <dc:date>2014-07-16T06:34:38Z</dc:date>
    </item>
    <item>
      <title>Re: SAI interface in both direction simultaneously. (MQX 4.1 / K70)</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/SAI-interface-in-both-direction-simultaneously-MQX-4-1-K70/m-p/320042#M14317</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I have tried the i2s_demo but:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 1) The one supplied with MQX 4.1 is one direction (Play or Record).&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 2) There are no support for TWR-K70F12 only for TWR-K60. I have tried to port the K60 setup but I never got it working.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regarding phase difference: It is the time delay between to signal relative to the &lt;SPAN class="short_text" lang="en"&gt;&lt;SPAN class="hps"&gt;time period. This mean that a 1us difference on a 10kHz signal will give a phase difference of 3.6 &lt;SPAN class="short_text" lang="en"&gt;&lt;SPAN class="hps"&gt;degrees.&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="short_text" lang="en"&gt;&lt;SPAN class="hps"&gt;&lt;SPAN class="short_text" lang="en"&gt;&lt;SPAN class="hps"&gt;Poul-Erik.&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="short_text" lang="en"&gt;&lt;SPAN class="hps"&gt;&lt;SPAN class="short_text" lang="en"&gt;&lt;SPAN class="hps"&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 16 Jul 2014 12:41:50 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/SAI-interface-in-both-direction-simultaneously-MQX-4-1-K70/m-p/320042#M14317</guid>
      <dc:creator>poul-erikhansen</dc:creator>
      <dc:date>2014-07-16T12:41:50Z</dc:date>
    </item>
    <item>
      <title>Re: SAI interface in both direction simultaneously. (MQX 4.1 / K70)</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/SAI-interface-in-both-direction-simultaneously-MQX-4-1-K70/m-p/320043#M14318</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;When dealing with sampled systems, and in particular sigma-delta ADC/DAC, the time-shift is called 'group delay' and will consist of the ADC group delay (the more filtering, the longer...), queue delay, K70 processing to outbound queue, thence DAC filtering delay. For a full multi-channel DMA-driven double-buffered data streaming example, I can only suggest my I2S/DMA example in community.freescale.com/message/82190#82190.&amp;nbsp; It was written for version 1 silicon (SSI), so if you have the 'version 2' SAI block in your chip, I'm afraid there will be differences, but the general concepts remain, especially how to use the DMA 'half interrupts' to do all the double-buffer work, and the minor/major loop-count-factors to interleave/de-interleave isolated linear buffers.&amp;nbsp; Buffer size will be part of your overall 'group delay' (sample times) as you process one 'buffer full' from 'in' to 'out'.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 16 Jul 2014 14:15:15 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/SAI-interface-in-both-direction-simultaneously-MQX-4-1-K70/m-p/320043#M14318</guid>
      <dc:creator>egoodii</dc:creator>
      <dc:date>2014-07-16T14:15:15Z</dc:date>
    </item>
    <item>
      <title>Re: SAI interface in both direction simultaneously. (MQX 4.1 / K70)</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/SAI-interface-in-both-direction-simultaneously-MQX-4-1-K70/m-p/320044#M14319</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thank you for the answer. I know that I have to compensate for the ADC and DAC delays, but it must be equal all the time, or i need to loop back the analog signal after initialization and the measure the difference and compensate.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Poul-Erik.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 16 Jul 2014 14:42:24 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/SAI-interface-in-both-direction-simultaneously-MQX-4-1-K70/m-p/320044#M14319</guid>
      <dc:creator>poul-erikhansen</dc:creator>
      <dc:date>2014-07-16T14:42:24Z</dc:date>
    </item>
    <item>
      <title>Re: SAI interface in both direction simultaneously. (MQX 4.1 / K70)</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/SAI-interface-in-both-direction-simultaneously-MQX-4-1-K70/m-p/320045#M14320</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Certainly the SAI bus &amp;amp; queuing delays will be 'constant', and as long as your K70 computations in processing an 'in' buffer to an 'out' buffer are ALWAYS completed in less than 'one queue full' of time, that delay will also be a constant, based on sample rate &amp;amp; count(queue size).&amp;nbsp; So your overall group-delay from 'analog in' to 'analog out' will be very consistent and easily specified.&amp;nbsp; If you buffer 2ms worth, for instance (64 samples at 32KHz) each sample that comes 'in' will pop back 'out' 4ms later (appropriately modified, of course) or 128 sample-delay.&amp;nbsp; Add a couple for the SSI bus delay, and then a 'nice cheap CoDec' like TI 320AIC3104, which specs a 17 sample ADC group delay, and 21 sample DAC group delay, and you have your total group delay.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 16 Jul 2014 16:42:47 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/SAI-interface-in-both-direction-simultaneously-MQX-4-1-K70/m-p/320045#M14320</guid>
      <dc:creator>egoodii</dc:creator>
      <dc:date>2014-07-16T16:42:47Z</dc:date>
    </item>
  </channel>
</rss>

