<?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>S32KのトピックRe: Issue regarding selection of external clock source - NXP S32K144</title>
    <link>https://community.nxp.com/t5/S32K/Issue-regarding-selection-of-external-clock-source-NXP-S32K144/m-p/1204751#M9406</link>
    <description>&lt;P&gt;Hi&amp;nbsp;arajan,&lt;/P&gt;
&lt;P&gt;If crystal is used, then you need you enable(set 1) the SCG_SOSCCFG[EREFS] bit.&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="SCG_SOSCCFG[EREFS].png" style="width: 912px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/133579iEFFECF6A9AE89AE5/image-size/large?v=v2&amp;amp;px=999" role="button" title="SCG_SOSCCFG[EREFS].png" alt="SCG_SOSCCFG[EREFS].png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;Best Regards,&lt;BR /&gt;Robin&lt;BR /&gt;-------------------------------------------------------------------------------&lt;BR /&gt;Note:&lt;BR /&gt;- If this post answers your question, please click the "Mark Correct" button. Thank you!&lt;/P&gt;
&lt;P&gt;- We are following threads for 7 weeks after the last post, later replies are ignored&lt;BR /&gt;Please open a new thread and refer to the closed one, if you have a related question at a later point in time.&lt;BR /&gt;-------------------------------------------------------------------------------&lt;/P&gt;</description>
    <pubDate>Tue, 29 Dec 2020 05:49:17 GMT</pubDate>
    <dc:creator>Robin_Shen</dc:creator>
    <dc:date>2020-12-29T05:49:17Z</dc:date>
    <item>
      <title>Issue regarding selection of external clock source - NXP S32K144</title>
      <link>https://community.nxp.com/t5/S32K/Issue-regarding-selection-of-external-clock-source-NXP-S32K144/m-p/1204129#M9386</link>
      <description>&lt;P&gt;&lt;SPAN&gt;Hello,&lt;/SPAN&gt;&lt;/P&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;I am trying to enable the external crystal&amp;nbsp;oscillator for our S32K144 MCU based in-house board.&lt;BR /&gt;&lt;BR /&gt;I have taken the&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;STRONG&gt;S32K144_Project_FlexCAN&lt;/STRONG&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;example project as a reference for the same.&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;My observations are as follows -&amp;nbsp;&lt;BR /&gt;I have disabled the&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;STRONG&gt;EREFS&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/STRONG&gt;bit as mentioned in the Reference manual to select the external clock as the clock source.&amp;nbsp;&lt;BR /&gt;&lt;DIV class="mceNonEditable lia-copypaste-placeholder"&gt;&amp;nbsp;&lt;/DIV&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;DIV class="mceNonEditable lia-copypaste-placeholder"&gt;&amp;nbsp;&lt;/DIV&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;BR /&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;After doing this configuration, the sys OSC clk valid bit is not setting when we read it, and it is therefore hanging in the while loop. I am attaching the snapshots of the code here as well -&lt;/DIV&gt;&lt;DIV&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;void SOSC_init_16MHz(void)
{
	/*!
	 * SOSC Initialization (8 MHz):
	 * ===================================================
	 */
	SCG-&amp;gt;SOSCDIV = SCG_SOSCDIV_SOSCDIV1(1)|
				   SCG_SOSCDIV_SOSCDIV2(1);  	/* SOSCDIV1 &amp;amp; SOSCDIV2 =1: divide by 1 		*/
	SCG-&amp;gt;SOSCCFG  |=	(0x3 &amp;lt;&amp;lt; 4);				// 11 : High frequency range selected for the crystal oscillator
	SCG-&amp;gt;SOSCCFG  &amp;amp;=   ~(0x1 &amp;lt;&amp;lt; 3);				//  0 : HGO bit for low gain operation
	SCG-&amp;gt;SOSCCFG  &amp;amp;=   ~(0x1 &amp;lt;&amp;lt; 2);				// EREFS : 0 , external clock selected


  while(SCG-&amp;gt;SOSCCSR &amp;amp; SCG_SOSCCSR_LK_MASK); 	/* Ensure SOSCCSR unlocked 							*/

  SCG-&amp;gt;SOSCCSR = SCG_SOSCCSR_SOSCEN_MASK; 		/* LK=0:          SOSCCSR can be written 				*/
												/* SOSCCMRE=0:    OSC CLK monitor IRQ if enabled 		*/
												/* SOSCCM=0:      OSC CLK monitor disabled 			*/
												/* SOSCERCLKEN=0: Sys OSC 3V ERCLK output clk disabled */
												/* SOSCLPEN=0:    Sys OSC disabled in VLP modes 		*/
												/* SOSCSTEN=0:    Sys OSC disabled in Stop modes 		*/
												/* SOSCEN=1:      Enable oscillator 					*/

  while(!(SCG-&amp;gt;SOSCCSR &amp;amp; SCG_SOSCCSR_SOSCVLD_MASK));	/* Wait for sys OSC clk valid */
}&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;DIV&gt;Also, we have the external clock connected on the following pins on the hardware -&lt;/DIV&gt;&lt;DIV&gt;- PTB7 and PTB6&lt;BR /&gt;&lt;DIV class="mceNonEditable lia-copypaste-placeholder"&gt;&amp;nbsp;&lt;/DIV&gt;&lt;/DIV&gt;&lt;DIV&gt;We want to use the external crystal oscillator as our clock source, please let us know if the configurations are correct or need some changes.&lt;/DIV&gt;&lt;DIV&gt;--&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;FONT face="trebuchet ms, sans-serif"&gt;Thanks &amp;amp; Regards&lt;BR /&gt;Ajay Rajan&lt;/FONT&gt;&lt;/DIV&gt;&lt;/DIV&gt;</description>
      <pubDate>Thu, 24 Dec 2020 13:17:14 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S32K/Issue-regarding-selection-of-external-clock-source-NXP-S32K144/m-p/1204129#M9386</guid>
      <dc:creator>arajan</dc:creator>
      <dc:date>2020-12-24T13:17:14Z</dc:date>
    </item>
    <item>
      <title>Re: Issue regarding selection of external clock source - NXP S32K144</title>
      <link>https://community.nxp.com/t5/S32K/Issue-regarding-selection-of-external-clock-source-NXP-S32K144/m-p/1204751#M9406</link>
      <description>&lt;P&gt;Hi&amp;nbsp;arajan,&lt;/P&gt;
&lt;P&gt;If crystal is used, then you need you enable(set 1) the SCG_SOSCCFG[EREFS] bit.&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="SCG_SOSCCFG[EREFS].png" style="width: 912px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/133579iEFFECF6A9AE89AE5/image-size/large?v=v2&amp;amp;px=999" role="button" title="SCG_SOSCCFG[EREFS].png" alt="SCG_SOSCCFG[EREFS].png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;Best Regards,&lt;BR /&gt;Robin&lt;BR /&gt;-------------------------------------------------------------------------------&lt;BR /&gt;Note:&lt;BR /&gt;- If this post answers your question, please click the "Mark Correct" button. Thank you!&lt;/P&gt;
&lt;P&gt;- We are following threads for 7 weeks after the last post, later replies are ignored&lt;BR /&gt;Please open a new thread and refer to the closed one, if you have a related question at a later point in time.&lt;BR /&gt;-------------------------------------------------------------------------------&lt;/P&gt;</description>
      <pubDate>Tue, 29 Dec 2020 05:49:17 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S32K/Issue-regarding-selection-of-external-clock-source-NXP-S32K144/m-p/1204751#M9406</guid>
      <dc:creator>Robin_Shen</dc:creator>
      <dc:date>2020-12-29T05:49:17Z</dc:date>
    </item>
  </channel>
</rss>

