<?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 Setting up clock rate for I2S with SGTL5000 in Kinetis Microcontrollers</title>
    <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/Setting-up-clock-rate-for-I2S-with-SGTL5000/m-p/750694#M45749</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;G'day! &lt;BR /&gt;I've been reading up on how to use the I2S module in my K70 elevator tower with the SGTL as the TWR-AUDIO extension.&lt;BR /&gt;I am a little confused as to what the right question to as is..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So I have the system oscillator set at 50Mhz as default and have noticed the I2S module is derived from the (Core/System clock)*((I2SFrac+1/I2SDiv+1)). For example, If I wanted 48 Khz as my sampling rate, I would multiply by 256 to get 12.288 Mhz for the I2S clock.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="I2S Clock.PNG"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/855i0375C76CCA0B31C4/image-size/large?v=v2&amp;amp;px=999" role="button" title="I2S Clock.PNG" alt="I2S Clock.PNG" /&gt;&lt;/span&gt; P.3 from AN4520 - I2S&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;And further more, on the next page,&lt;BR /&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="pastedImage_2.png"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/898i87345FD2C7AFBD05/image-size/large?v=v2&amp;amp;px=999" role="button" title="pastedImage_2.png" alt="pastedImage_2.png" /&gt;&lt;/span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; P.4 from AN4520 - I2S&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I could not find the I2Sx_PCCR register in the K70 Sub-Family Reference Manual, so I don't know what PM stands for.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;My question is "should I be changing the K70 OSC0 to 12.288Mhz or 4Mhz"? &lt;BR /&gt;Which I think would be a bad idea due to other clocks prescalar on it...&lt;/P&gt;&lt;P&gt;Another idea I had was that I just keep it at 50Mhz and derive the 12.288Mhz on the Bus Clock but the closest I can get it is 12.5 Mhz which is not good enough.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="pastedImage_1.png"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/1079iE67F44EDC399820A/image-size/large?v=v2&amp;amp;px=999" role="button" title="pastedImage_1.png" alt="pastedImage_1.png" /&gt;&lt;/span&gt; - Component Inspector KDS &lt;/P&gt;&lt;P&gt;Thank you for your time!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 15 May 2018 00:39:30 GMT</pubDate>
    <dc:creator>takmingmarcopan</dc:creator>
    <dc:date>2018-05-15T00:39:30Z</dc:date>
    <item>
      <title>Setting up clock rate for I2S with SGTL5000</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/Setting-up-clock-rate-for-I2S-with-SGTL5000/m-p/750694#M45749</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;G'day! &lt;BR /&gt;I've been reading up on how to use the I2S module in my K70 elevator tower with the SGTL as the TWR-AUDIO extension.&lt;BR /&gt;I am a little confused as to what the right question to as is..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So I have the system oscillator set at 50Mhz as default and have noticed the I2S module is derived from the (Core/System clock)*((I2SFrac+1/I2SDiv+1)). For example, If I wanted 48 Khz as my sampling rate, I would multiply by 256 to get 12.288 Mhz for the I2S clock.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="I2S Clock.PNG"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/855i0375C76CCA0B31C4/image-size/large?v=v2&amp;amp;px=999" role="button" title="I2S Clock.PNG" alt="I2S Clock.PNG" /&gt;&lt;/span&gt; P.3 from AN4520 - I2S&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;And further more, on the next page,&lt;BR /&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="pastedImage_2.png"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/898i87345FD2C7AFBD05/image-size/large?v=v2&amp;amp;px=999" role="button" title="pastedImage_2.png" alt="pastedImage_2.png" /&gt;&lt;/span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; P.4 from AN4520 - I2S&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I could not find the I2Sx_PCCR register in the K70 Sub-Family Reference Manual, so I don't know what PM stands for.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;My question is "should I be changing the K70 OSC0 to 12.288Mhz or 4Mhz"? &lt;BR /&gt;Which I think would be a bad idea due to other clocks prescalar on it...&lt;/P&gt;&lt;P&gt;Another idea I had was that I just keep it at 50Mhz and derive the 12.288Mhz on the Bus Clock but the closest I can get it is 12.5 Mhz which is not good enough.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="pastedImage_1.png"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/1079iE67F44EDC399820A/image-size/large?v=v2&amp;amp;px=999" role="button" title="pastedImage_1.png" alt="pastedImage_1.png" /&gt;&lt;/span&gt; - Component Inspector KDS &lt;/P&gt;&lt;P&gt;Thank you for your time!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 15 May 2018 00:39:30 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/Setting-up-clock-rate-for-I2S-with-SGTL5000/m-p/750694#M45749</guid>
      <dc:creator>takmingmarcopan</dc:creator>
      <dc:date>2018-05-15T00:39:30Z</dc:date>
    </item>
    <item>
      <title>Re: Setting up clock rate for I2S with SGTL5000</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/Setting-up-clock-rate-for-I2S-with-SGTL5000/m-p/750695#M45750</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&amp;nbsp; Pang,&lt;/P&gt;&lt;P&gt;When the I2S is configured as master, the bit clock and frame clock sources are internal or external. This is the I2S clock source diagram for K70, I copy it from reference manual of K70.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="pastedImage_1.png"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/8316i8FEBC2E41EB760F4/image-size/large?v=v2&amp;amp;px=999" role="button" title="pastedImage_1.png" alt="pastedImage_1.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;Assume that the sampling clock is 48KHz, you use 32 bits data for left/right channel, the required bit clock frequecy BCLK is 64*48K=3.072MHz. No matter how you divide the clock source and where the clock source is, it is okay if the bit clock frequency is 3.072MHz.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;There is not I2Sx_RCCR register for K70, probably you refer to wrong processor by mistake.&lt;/P&gt;&lt;P&gt;Assume that the core/system clock is 50MHz for your case, the Bit Clock Divider is 4, the MCLK must be 3.072M*4=12.288MHz, the MCLK frequency is 12.288MHz. 50MHz/12.288MHz=4.069, I suppose that you can set the FRACT=0, DIVIDE=3, it is okay. The actual bit clock will be 50MHz*1/(4*4)=3.125MHz.&lt;/P&gt;&lt;P&gt;as an alternative, assume that the core/system clock is 50MHz for your case, the Bit Clock Divider is 1, the MCLK must be 3.072MHz. The 50MHz/3.072MHz=16.276, I suppose that you can set the FRACT=99, DIVIDE=1626, it is okay, the actual MCLK will be 50MHz*(99+1)/(1626+1)=3.073MHz, it is okay.&lt;/P&gt;&lt;P&gt;This is the register setting, which I copy from RM of K70:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="pastedImage_2.png"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/8486i16B6CB859A5350E7/image-size/large?v=v2&amp;amp;px=999" role="button" title="pastedImage_2.png" alt="pastedImage_2.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;Hope it can help you&lt;/P&gt;&lt;P&gt;BR&lt;/P&gt;&lt;P&gt;Xiangjun Rong&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 16 May 2018 06:48:15 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/Setting-up-clock-rate-for-I2S-with-SGTL5000/m-p/750695#M45750</guid>
      <dc:creator>xiangjun_rong</dc:creator>
      <dc:date>2018-05-16T06:48:15Z</dc:date>
    </item>
  </channel>
</rss>

