<?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 Design StudioのトピックRe: fsl_debug problem change frequency</title>
    <link>https://community.nxp.com/t5/Kinetis-Design-Studio/fsl-debug-problem-change-frequency/m-p/460011#M4776</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Daniele,&lt;/P&gt;&lt;P&gt;After you change the clock of cpu, you need refer to the initialize code to configure the clock of UART,&lt;/P&gt;&lt;P&gt;and i have not see you re-configure the UART clock , and i don't know the "fsl_debug problem" detail,&lt;/P&gt;&lt;P&gt;so you can send your project to me , i can debug it , then check the problem .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;BR&lt;/P&gt;&lt;P&gt;Alice&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 07 Mar 2016 11:16:33 GMT</pubDate>
    <dc:creator>Alice_Yang</dc:creator>
    <dc:date>2016-03-07T11:16:33Z</dc:date>
    <item>
      <title>fsl_debug problem change frequency</title>
      <link>https://community.nxp.com/t5/Kinetis-Design-Studio/fsl-debug-problem-change-frequency/m-p/460002#M4767</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;i'm using a kl46 with kds 3.1 and the sdk 1.3. I have a problem with this function where i change the frequency of my cpu according with some flag:&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE class="c#" name="code"&gt;void CPU_Clock_Setting(void) { &amp;nbsp; int i = 0; &amp;nbsp; byte error = 0;&amp;nbsp;&amp;nbsp; &amp;nbsp; DisableInterrupts; &amp;nbsp; if (flag_lcd || flag_usb) {//se LCD on o USB inserita vado alla max freq &amp;nbsp; error = CLOCK_SYS_UpdateConfiguration(0, kClockManagerPolicyForcible); &amp;nbsp; i = CLOCK_SYS_GetCoreClockFreq(); #ifdef DEBUG &amp;nbsp; LPSCI_HAL_SetBaudRate(UART0_BASE_PTR, i, 115200); #endif &amp;nbsp; I2C0_SetClockConfiguration(); &amp;nbsp; ADC_SetClockConfiguration(); &amp;nbsp; } else{//altrimenti scendo alla configurazione di risparmio &amp;nbsp; error = CLOCK_SYS_UpdateConfiguration(1, kClockManagerPolicyForcible); &amp;nbsp; i = CLOCK_SYS_GetCoreClockFreq(); #ifdef DEBUG &amp;nbsp; LPSCI_HAL_SetBaudRate(UART0_BASE_PTR, i, 115200); #endif &amp;nbsp; I2C0_SetClockConfiguration(); &amp;nbsp; ADC_SetClockConfiguration(); &amp;nbsp; } &amp;nbsp; EnableInterrupts; }&lt;/PRE&gt;&lt;DIV style="display:none;"&gt; &lt;/DIV&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;the problem is when the function CLOCK_SYS_UpdateConfiguration is called, when the fsl_debug enter in the function &lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE class="c#" name="code"&gt;void LPSCI_HAL_SendDataPolling(UART0_Type * base, &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; const uint8_t *txBuff, &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; uint32_t txSize) { &amp;nbsp;&amp;nbsp;&amp;nbsp; while (txSize--) &amp;nbsp;&amp;nbsp;&amp;nbsp; { &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; while (!UART0_BRD_S1_TDRE(base)) &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; {}&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; LPSCI_HAL_Putchar(base, *txBuff++); &amp;nbsp;&amp;nbsp;&amp;nbsp; } }&lt;/PRE&gt;&lt;DIV style="display:none;"&gt; &lt;/DIV&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;it remain in the while loop. why this? i have add the function LPSCI_HAL_SetBaudRate for&amp;nbsp; re-set the clock of the UART but same problem. Thanks&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: rgba(0, 0, 0, 0); font-family: Consolas, 'Courier New', Courier, mono, serif; font-size: 12px;"&gt;&lt;SPAN&gt;Configur&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 15 Feb 2016 07:56:03 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Design-Studio/fsl-debug-problem-change-frequency/m-p/460002#M4767</guid>
      <dc:creator>danielecortella</dc:creator>
      <dc:date>2016-02-15T07:56:03Z</dc:date>
    </item>
    <item>
      <title>Re: fsl_debug problem change frequency</title>
      <link>https://community.nxp.com/t5/Kinetis-Design-Studio/fsl-debug-problem-change-frequency/m-p/460003#M4768</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Daniele,&lt;/P&gt;&lt;P&gt;The clock source of the UART0 not the CPU core clock , so there is some error :&lt;/P&gt;&lt;P&gt;&lt;SPAN class="lia-inline-image-display-wrapper" image-alt="pastedImage_0.png"&gt;&lt;IMG alt="pastedImage_0.png" src="https://community.nxp.com/t5/image/serverpage/image-id/53302iC061084A364DB3A2/image-size/large?v=v2&amp;amp;px=999" title="pastedImage_0.png" /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="lia-inline-image-display-wrapper" image-alt="pastedImage_2.png"&gt;&lt;IMG alt="pastedImage_2.png" src="https://community.nxp.com/t5/image/serverpage/image-id/53415iE0B88020619F97DD/image-size/large?v=v2&amp;amp;px=999" title="pastedImage_2.png" /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;And about configure the clock and the baud rate , i recommend you refer to the demo code under KSDK1.3:&lt;/P&gt;&lt;P&gt;\KSDK_1.3.0\examples\frdmkl46z\driver_examples\lpsci\lpsci_blocking\kds&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;in the initialize function , you can hwo to configure the clock source of UART and the baud rate :&lt;/P&gt;&lt;PRE __default_attr="c++" __jive_macro_name="code" class="jive_macro_code jive_text_macro _jivemacro_uid_14556007434048848" data-renderedposition="719_8_1192_48" jivemacro_uid="_14556007434048848"&gt;&lt;P&gt;// Initialize the lpsci module with base address and config structure&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; LPSCI_DRV_Init(BOARD_DEBUG_UART_INSTANCE, &amp;amp;lpsciState, &amp;amp;lpsciConfig);&lt;/P&gt;&lt;/PRE&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 alt="pastedImage_1.png" src="https://community.nxp.com/t5/image/serverpage/image-id/53371iA255EC973CB97029/image-size/large?v=v2&amp;amp;px=999" title="pastedImage_1.png" /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope it helps&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;Have a great day,&lt;BR /&gt;Alice Yang&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;-----------------------------------------------------------------------------------------------------------------------&lt;BR /&gt;Note: If this post answers your question, please click the Correct Answer button. Thank you!&lt;BR /&gt;-----------------------------------------------------------------------------------------------------------------------&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 02 Nov 2020 13:23:33 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Design-Studio/fsl-debug-problem-change-frequency/m-p/460003#M4768</guid>
      <dc:creator>Alice_Yang</dc:creator>
      <dc:date>2020-11-02T13:23:33Z</dc:date>
    </item>
    <item>
      <title>Re: fsl_debug problem change frequency</title>
      <link>https://community.nxp.com/t5/Kinetis-Design-Studio/fsl-debug-problem-change-frequency/m-p/460004#M4769</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;i have tried to set the clock source of the lpsci to ESC source (i have a 16mhz oscillator)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="lia-inline-image-display-wrapper" image-alt="pastedImage_2.png"&gt;&lt;IMG alt="pastedImage_2.png" src="https://community.nxp.com/t5/image/serverpage/image-id/53659iE6584F3087D6FEA7/image-size/large?v=v2&amp;amp;px=999" title="pastedImage_2.png" /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;when i call the function :&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE __default_attr="c#" __jive_macro_name="code" class="jive_macro_code _jivemacro_uid_14561392216412290 jive_text_macro" data-renderedposition="741_8_1192_384" jivemacro_uid="_14561392216412290"&gt;&lt;P&gt;void CPU_Clock_Setting(void) {&lt;/P&gt;&lt;P&gt;&amp;nbsp; int i = 0;&lt;/P&gt;&lt;P&gt;&amp;nbsp; byte error = 0;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; DisableInterrupts;&lt;/P&gt;&lt;P&gt;&amp;nbsp; if (flag_lcd || flag_usb) {//se LCD on o USB inserita vado alla max freq&lt;/P&gt;&lt;P&gt;&amp;nbsp; error = CLOCK_SYS_UpdateConfiguration(0, kClockManagerPolicyAgreement);&lt;/P&gt;&lt;P&gt;&amp;nbsp; //CLOCK_SYS_SetConfiguration(&amp;amp;clockMan1_InitConfig0);&lt;/P&gt;&lt;P&gt;&amp;nbsp; i = CLOCK_SYS_GetCoreClockFreq();&lt;/P&gt;&lt;P&gt;#ifdef DEBUG&lt;/P&gt;&lt;P&gt;&amp;nbsp; //CLOCK_SYS_SetLpsciSrc(0, kClockLpsciSrcOsc0erClk);&lt;/P&gt;&lt;P&gt;&amp;nbsp; //LPSCI_HAL_SetBaudRate(0, i, 115200);&lt;/P&gt;&lt;P&gt;&amp;nbsp; //i = CLOCK_SYS_GetLpsciFreq(0);&lt;/P&gt;&lt;P&gt;#endif&lt;/P&gt;&lt;P&gt;&amp;nbsp; I2C0_SetClockConfiguration();&lt;/P&gt;&lt;P&gt;&amp;nbsp; ADC_SetClockConfiguration();&lt;/P&gt;&lt;P&gt;&amp;nbsp; } else{//altrimenti scendo alla configurazione di risparmio&lt;/P&gt;&lt;P&gt;&amp;nbsp; error = CLOCK_SYS_UpdateConfiguration(1, kClockManagerPolicyAgreement);&lt;/P&gt;&lt;P&gt;&amp;nbsp; //CLOCK_SYS_SetConfiguration(&amp;amp;clockMan1_InitConfig0);&lt;/P&gt;&lt;P&gt;&amp;nbsp; i = CLOCK_SYS_GetCoreClockFreq();&lt;/P&gt;&lt;P&gt;&amp;nbsp; I2C0_SetClockConfiguration();&lt;/P&gt;&lt;P&gt;&amp;nbsp; ADC_SetClockConfiguration();&lt;/P&gt;&lt;P&gt;&amp;nbsp; }&lt;/P&gt;&lt;P&gt;&amp;nbsp; EnableInterrupts;&lt;/P&gt;&lt;P&gt;}&lt;/P&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;all work fine but after the exit from this function LPSCI_HAL_SendDataPolling is called and the TDRE flag is set to 0 and the code stop in the while loop:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE __default_attr="c#" __jive_macro_name="code" class="jive_macro_code jive_text_macro _jivemacro_uid_14561393021184434" data-renderedposition="1203_8_1192_176" jivemacro_uid="_14561393021184434"&gt;&lt;P&gt;void LPSCI_HAL_SendDataPolling(UART0_Type * base,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; const uint8_t *txBuff,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; uint32_t txSize)&lt;/P&gt;&lt;P&gt;{&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; while (txSize--)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; while (!UART0_BRD_S1_TDRE(base))&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; {}&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; LPSCI_HAL_Putchar(base, *txBuff++);&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/P&gt;&lt;P&gt;}&lt;/P&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;the problem is that i can't see the function that has tried to send data because i have this condition:&lt;/P&gt;&lt;P&gt;&lt;SPAN class="lia-inline-image-display-wrapper" image-alt="pastedImage_2.png"&gt;&lt;IMG alt="pastedImage_2.png" src="https://community.nxp.com/t5/image/serverpage/image-id/53706iC3F8BC8254F1828D/image-size/large?v=v2&amp;amp;px=999" title="pastedImage_2.png" /&gt;&lt;/SPAN&gt; &lt;/P&gt;&lt;P&gt;it is possible increase the number of function so i can &lt;SPAN lang="en"&gt;reconstruct the function that call this?&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 02 Nov 2020 13:23:35 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Design-Studio/fsl-debug-problem-change-frequency/m-p/460004#M4769</guid>
      <dc:creator>danielecortella</dc:creator>
      <dc:date>2020-11-02T13:23:35Z</dc:date>
    </item>
    <item>
      <title>Re: fsl_debug problem change frequency</title>
      <link>https://community.nxp.com/t5/Kinetis-Design-Studio/fsl-debug-problem-change-frequency/m-p/460005#M4770</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Daniele,&lt;/P&gt;&lt;P&gt; - After run here &lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="pastedImage_0.png"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/53569i11FF61DDF592EE41/image-size/large?v=v2&amp;amp;px=999" role="button" title="pastedImage_0.png" alt="pastedImage_0.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;how about continue to run ?&lt;/P&gt;&lt;P&gt;- " it is possible increase the number of function so i can &lt;SPAN lang="en"&gt;reconstruct the function that call this? "&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN lang="en"&gt;Do you meaning you want change the function of "LPSCI_HAL_SendDataPolling", yes , you can .&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN lang="en"&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN lang="en"&gt;BR&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN lang="en"&gt;Alice&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 23 Feb 2016 03:11:28 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Design-Studio/fsl-debug-problem-change-frequency/m-p/460005#M4770</guid>
      <dc:creator>Alice_Yang</dc:creator>
      <dc:date>2016-02-23T03:11:28Z</dc:date>
    </item>
    <item>
      <title>Re: fsl_debug problem change frequency</title>
      <link>https://community.nxp.com/t5/Kinetis-Design-Studio/fsl-debug-problem-change-frequency/m-p/460006#M4771</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;the software remain in the infinite loop and can't exit, so my firmware is locked there. As visible in the image i see that the SendDataPolling is called by the debug_putc() but i can't reconstruct all the way. I can't see where the debug_putc is called so to debug the code, for do this i have to increase the number of nested function visible in kds.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 23 Feb 2016 10:39:52 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Design-Studio/fsl-debug-problem-change-frequency/m-p/460006#M4771</guid>
      <dc:creator>danielecortella</dc:creator>
      <dc:date>2016-02-23T10:39:52Z</dc:date>
    </item>
    <item>
      <title>Re: fsl_debug problem change frequency</title>
      <link>https://community.nxp.com/t5/Kinetis-Design-Studio/fsl-debug-problem-change-frequency/m-p/460007#M4772</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;i have tried some solution in this days but nothing works.&lt;/P&gt;&lt;P&gt;I have define a static callback in the fsl_clock_manager&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;that do this (i have follow this &lt;/P&gt;&lt;P&gt;&lt;A href="https://app-community.freescale.com/docs/DOC-329554):" target="test_blank"&gt;https://app-community.freescale.com/docs/DOC-329554):&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;clock_manager_error_code_t clockMan_uart0_callback(clock_notify_struct_t &lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;notify, void * callbackData)&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;{&lt;/P&gt;&lt;P&gt;     clock_manager_error_code_t result = kClockManagerSuccess;&lt;/P&gt;&lt;P&gt;     switch (notify-&amp;gt;notifyType) {&lt;/P&gt;&lt;P&gt;     case kClockManagerNotifyBefore:&lt;/P&gt;&lt;P&gt;         DbgConsole_DeInit();&lt;/P&gt;&lt;P&gt;         break;&lt;/P&gt;&lt;P&gt;     case kClockManagerNotifyRecover:&lt;/P&gt;&lt;P&gt;         break;&lt;/P&gt;&lt;P&gt;     case kClockManagerNotifyAfter:&lt;/P&gt;&lt;P&gt;         CLOCK_SYS_SetLpsciSrc(0, kClockLpsciSrcOsc0erClk);&lt;/P&gt;&lt;P&gt;         DbgConsole_Init(0, 115200, kDebugConsoleLPSCI);&lt;/P&gt;&lt;P&gt;         break;&lt;/P&gt;&lt;P&gt;     default:&lt;/P&gt;&lt;P&gt;         result = kClockManagerError;&lt;/P&gt;&lt;P&gt;         break;&lt;/P&gt;&lt;P&gt;     }&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;     /* Write user code here */&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;     return result;&lt;/P&gt;&lt;P&gt;}&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;the clock surce of the uart0 is always the oscerclk&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;but the firmware continue to lock at the function&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;with the register setting as is&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;PS: i'm using FREERTOS&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Il 23/02/2016 04:12, Alice_Yang ha scritto:&lt;/P&gt;&lt;BLOCKQUOTE level="1"&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;&amp;gt;&lt;/P&gt;&lt;BLOCKQUOTE level="1"&gt;&lt;P&gt;  NXP Community&lt;/P&gt;&lt;P&gt;  &amp;lt;https://community.freescale.com/?et=watches.email.thread&amp;gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;&amp;gt;&lt;/P&gt;&lt;BLOCKQUOTE level="1"&gt;&lt;P&gt;    fsl_debug problem change frequency&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;risposta da Alice_Yang &lt;/P&gt;&lt;P&gt;&amp;lt;https://community.freescale.com/people/Alice_Yang?et=watches.email.thread&amp;gt; &lt;/P&gt;&lt;P&gt;su /Kinetis Design Studio/ - Visualizza la discussione completa &lt;/P&gt;&lt;P&gt;&amp;lt;https://community.freescale.com/message/617635?et=watches.email.thread#617635&amp;gt;&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;&amp;gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 02 Mar 2016 07:24:46 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Design-Studio/fsl-debug-problem-change-frequency/m-p/460007#M4772</guid>
      <dc:creator>danielecortella</dc:creator>
      <dc:date>2016-03-02T07:24:46Z</dc:date>
    </item>
    <item>
      <title>Re: fsl_debug problem change frequency</title>
      <link>https://community.nxp.com/t5/Kinetis-Design-Studio/fsl-debug-problem-change-frequency/m-p/460008#M4773</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Daniele,&lt;/P&gt;&lt;P&gt;From your screenshot, i see the TDRE bit has set to 1, so i think it can jump to the loop&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN class="keyword"&gt;while (!UART0_BRD_S1_TDRE(&lt;SPAN class="keyword"&gt;base&lt;/SPAN&gt;))&amp;nbsp; &lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="keyword"&gt;Could you please test the demo code under KSDK1.3 on your board :&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="keyword"&gt;KSDK_1.3.0\examples\frdmkl46z\driver_examples\lpsci\lpsci_polling\kds &lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="keyword"&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="keyword"&gt;Alice&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 02 Mar 2016 09:29:37 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Design-Studio/fsl-debug-problem-change-frequency/m-p/460008#M4773</guid>
      <dc:creator>Alice_Yang</dc:creator>
      <dc:date>2016-03-02T09:29:37Z</dc:date>
    </item>
    <item>
      <title>Re: fsl_debug problem change frequency</title>
      <link>https://community.nxp.com/t5/Kinetis-Design-Studio/fsl-debug-problem-change-frequency/m-p/460009#M4774</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;yes with this sample it work. I have tried to disable the debug but same &lt;/P&gt;&lt;P&gt;proble happen with the TPM2 used like pwm. When i press a button the &lt;/P&gt;&lt;P&gt;function TPM_DRV_PwmStop(LCD_PWM_IDX, &amp;amp;LCD_PWM_ChnConfig0, 0); is called &lt;/P&gt;&lt;P&gt;and after that i switch the frequency:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if (CLOCK_SYS_GetCurrentConfiguration() != 1) {&lt;/P&gt;&lt;P&gt;             error = CLOCK_SYS_UpdateConfiguration(1, &lt;/P&gt;&lt;P&gt;kClockManagerPolicyForcible);&lt;/P&gt;&lt;P&gt;//CLOCK_SYS_SetConfiguration(&amp;amp;clockMan1_InitConfig0);&lt;/P&gt;&lt;P&gt;             i = CLOCK_SYS_GetCoreClockFreq();&lt;/P&gt;&lt;P&gt;             //LPSCI_HAL_SetBaudRate(UART0_BASE_PTR, i, 115200);&lt;/P&gt;&lt;P&gt;             I2C0_SetClockConfiguration();&lt;/P&gt;&lt;P&gt;             ADC_SetClockConfiguration();&lt;/P&gt;&lt;P&gt;         }&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;when the button is newely pressed i do&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;         if(CLOCK_SYS_GetCurrentConfiguration() != 0){&lt;/P&gt;&lt;P&gt;             error = CLOCK_SYS_UpdateConfiguration(0, &lt;/P&gt;&lt;P&gt;kClockManagerPolicyForcible);&lt;/P&gt;&lt;P&gt;//CLOCK_SYS_SetConfiguration(&amp;amp;clockMan1_InitConfig0);&lt;/P&gt;&lt;P&gt;             i = CLOCK_SYS_GetCoreClockFreq();&lt;/P&gt;&lt;P&gt;             //LPSCI_HAL_SetBaudRate(UART0_BASE_PTR, i, 115200);&lt;/P&gt;&lt;P&gt;             TPM_DRV_SetClock(LCD_PWM_IDX, kTpmClockSourceModuleClk, &lt;/P&gt;&lt;P&gt;kTpmDividedBy32);&lt;/P&gt;&lt;P&gt;             I2C0_SetClockConfiguration();&lt;/P&gt;&lt;P&gt;             ADC_SetClockConfiguration();&lt;/P&gt;&lt;P&gt;         }&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;to restore the cpu to higher frequency but when i call the function &lt;/P&gt;&lt;P&gt;TPM_DRV_PwmStart(LCD_PWM_IDX, &amp;amp;LCD_PWM_ChnConfig0, 0); it don't run &lt;/P&gt;&lt;P&gt;correctly. The MOD register is set to FFFFF bacause the function &lt;/P&gt;&lt;P&gt;CLOCK_SYS_GetPllFllClockFreq(); (called as in the image) return 0&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Il 02/03/2016 10:30, Alice_Yang ha scritto:&lt;/P&gt;&lt;BLOCKQUOTE level="1"&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;&amp;gt;&lt;/P&gt;&lt;BLOCKQUOTE level="1"&gt;&lt;P&gt;  NXP Community&lt;/P&gt;&lt;P&gt;  &amp;lt;https://community.freescale.com/?et=watches.email.thread&amp;gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;&amp;gt;&lt;/P&gt;&lt;BLOCKQUOTE level="1"&gt;&lt;P&gt;    fsl_debug problem change frequency&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;risposta da Alice_Yang &lt;/P&gt;&lt;P&gt;&amp;lt;https://community.freescale.com/people/Alice_Yang?et=watches.email.thread&amp;gt; &lt;/P&gt;&lt;P&gt;su /Kinetis Design Studio/ - Visualizza la discussione completa &lt;/P&gt;&lt;P&gt;&amp;lt;https://community.freescale.com/message/620493?et=watches.email.thread#620493&amp;gt;&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;&amp;gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 02 Mar 2016 11:15:47 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Design-Studio/fsl-debug-problem-change-frequency/m-p/460009#M4774</guid>
      <dc:creator>danielecortella</dc:creator>
      <dc:date>2016-03-02T11:15:47Z</dc:date>
    </item>
    <item>
      <title>Re: fsl_debug problem change frequency</title>
      <link>https://community.nxp.com/t5/Kinetis-Design-Studio/fsl-debug-problem-change-frequency/m-p/460010#M4775</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Ok, solved the problem with the timer using the function &lt;/P&gt;&lt;P&gt;CLOCK_SYS_SetPllfllSel(kClockPllFllSelPll); but with the fsl_debug the &lt;/P&gt;&lt;P&gt;problem stay on.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Il 02/03/2016 10:30, Alice_Yang ha scritto:&lt;/P&gt;&lt;BLOCKQUOTE level="1"&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;&amp;gt;&lt;/P&gt;&lt;BLOCKQUOTE level="1"&gt;&lt;P&gt;  NXP Community&lt;/P&gt;&lt;P&gt;  &amp;lt;https://community.freescale.com/?et=watches.email.thread&amp;gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;&amp;gt;&lt;/P&gt;&lt;BLOCKQUOTE level="1"&gt;&lt;P&gt;    fsl_debug problem change frequency&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;risposta da Alice_Yang &lt;/P&gt;&lt;P&gt;&amp;lt;https://community.freescale.com/people/Alice_Yang?et=watches.email.thread&amp;gt; &lt;/P&gt;&lt;P&gt;su /Kinetis Design Studio/ - Visualizza la discussione completa &lt;/P&gt;&lt;P&gt;&amp;lt;https://community.freescale.com/message/620493?et=watches.email.thread#620493&amp;gt;&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;&amp;gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 02 Mar 2016 12:57:11 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Design-Studio/fsl-debug-problem-change-frequency/m-p/460010#M4775</guid>
      <dc:creator>danielecortella</dc:creator>
      <dc:date>2016-03-02T12:57:11Z</dc:date>
    </item>
    <item>
      <title>Re: fsl_debug problem change frequency</title>
      <link>https://community.nxp.com/t5/Kinetis-Design-Studio/fsl-debug-problem-change-frequency/m-p/460011#M4776</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Daniele,&lt;/P&gt;&lt;P&gt;After you change the clock of cpu, you need refer to the initialize code to configure the clock of UART,&lt;/P&gt;&lt;P&gt;and i have not see you re-configure the UART clock , and i don't know the "fsl_debug problem" detail,&lt;/P&gt;&lt;P&gt;so you can send your project to me , i can debug it , then check the problem .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;BR&lt;/P&gt;&lt;P&gt;Alice&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 07 Mar 2016 11:16:33 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Design-Studio/fsl-debug-problem-change-frequency/m-p/460011#M4776</guid>
      <dc:creator>Alice_Yang</dc:creator>
      <dc:date>2016-03-07T11:16:33Z</dc:date>
    </item>
    <item>
      <title>Re: fsl_debug problem change frequency</title>
      <link>https://community.nxp.com/t5/Kinetis-Design-Studio/fsl-debug-problem-change-frequency/m-p/460012#M4777</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;attached there is the firmware. I'm using a kl46 with 16mhz crystal and &lt;/P&gt;&lt;P&gt;freertos. The function used are in:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;         - rtos_main_task.cwhere the init.c function is called and a&lt;/P&gt;&lt;P&gt;    infinite loop print an "Hello"&lt;/P&gt;&lt;P&gt;         - event.c where an interrupt PORTC_PORTD_IRQHandler call the&lt;/P&gt;&lt;P&gt;    CPU_Clock_Setting function that change the frequency&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    Thanks&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  *&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Il 07/03/2016 12:17, Alice_Yang ha scritto:&lt;/P&gt;&lt;BLOCKQUOTE level="1"&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;&amp;gt;&lt;/P&gt;&lt;BLOCKQUOTE level="1"&gt;&lt;P&gt;  NXP Community&lt;/P&gt;&lt;P&gt;  &amp;lt;https://community.freescale.com/?et=watches.email.thread&amp;gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;&amp;gt;&lt;/P&gt;&lt;BLOCKQUOTE level="1"&gt;&lt;P&gt;    fsl_debug problem change frequency&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;risposta da Alice_Yang &lt;/P&gt;&lt;P&gt;&amp;lt;https://community.freescale.com/people/Alice_Yang?et=watches.email.thread&amp;gt; &lt;/P&gt;&lt;P&gt;su /Kinetis Design Studio/ - Visualizza la discussione completa &lt;/P&gt;&lt;P&gt;&amp;lt;https://community.freescale.com/message/622056?et=watches.email.thread#comment-622056&amp;gt;&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;&amp;gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 09 Mar 2016 09:56:42 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Design-Studio/fsl-debug-problem-change-frequency/m-p/460012#M4777</guid>
      <dc:creator>danielecortella</dc:creator>
      <dc:date>2016-03-09T09:56:42Z</dc:date>
    </item>
    <item>
      <title>Re: fsl_debug problem change frequency</title>
      <link>https://community.nxp.com/t5/Kinetis-Design-Studio/fsl-debug-problem-change-frequency/m-p/460013#M4778</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;any news?&lt;/P&gt;&lt;P&gt;-- &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*OPTOI GROUP *&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Technical Dept.&lt;/P&gt;&lt;P&gt;Daniele Cortellazzi&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;***************************************************&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;OPTOELETTRONICA ITALIA S.r.l.&lt;/P&gt;&lt;P&gt;Via Vienna, 8&lt;/P&gt;&lt;P&gt;I-38121 Gardolo (TN) ITALY&lt;/P&gt;&lt;P&gt;Phone 0039 0461 991121&lt;/P&gt;&lt;P&gt;Fax 0039 0461 990164&lt;/P&gt;&lt;P&gt;daniele.cortellazzi@optoi.com&lt;/P&gt;&lt;P&gt;&lt;A href="https://community.nxp.com/www.optoi.com" target="test_blank"&gt;www.optoi.com&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;UL&gt;&lt;UL&gt;&lt;UL&gt;&lt;UL&gt;&lt;UL&gt;&lt;UL&gt;&lt;UL&gt;&lt;UL&gt;&lt;UL&gt;&lt;UL&gt;&lt;UL&gt;&lt;UL&gt;&lt;UL&gt;&lt;UL&gt;&lt;UL&gt;&lt;UL&gt;&lt;UL&gt;&lt;UL&gt;&lt;UL&gt;&lt;UL&gt;&lt;UL&gt;&lt;UL&gt;&lt;UL&gt;&lt;UL&gt;&lt;UL&gt;&lt;UL&gt;&lt;UL&gt;&lt;UL&gt;&lt;UL&gt;&lt;UL&gt;&lt;UL&gt;&lt;UL&gt;&lt;UL&gt;&lt;UL&gt;&lt;UL&gt;&lt;UL&gt;&lt;UL&gt;&lt;UL&gt;&lt;UL&gt;&lt;UL&gt;&lt;UL&gt;&lt;UL&gt;&lt;UL&gt;&lt;UL&gt;&lt;UL&gt;&lt;UL&gt;&lt;UL&gt;&lt;UL&gt;&lt;UL&gt;&lt;LI level="50" type="ul"&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;/UL&gt;&lt;/UL&gt;&lt;/UL&gt;&lt;/UL&gt;&lt;/UL&gt;&lt;/UL&gt;&lt;/UL&gt;&lt;/UL&gt;&lt;/UL&gt;&lt;/UL&gt;&lt;/UL&gt;&lt;/UL&gt;&lt;/UL&gt;&lt;/UL&gt;&lt;/UL&gt;&lt;/UL&gt;&lt;/UL&gt;&lt;/UL&gt;&lt;/UL&gt;&lt;/UL&gt;&lt;/UL&gt;&lt;/UL&gt;&lt;/UL&gt;&lt;/UL&gt;&lt;/UL&gt;&lt;/UL&gt;&lt;/UL&gt;&lt;/UL&gt;&lt;/UL&gt;&lt;/UL&gt;&lt;/UL&gt;&lt;/UL&gt;&lt;/UL&gt;&lt;/UL&gt;&lt;/UL&gt;&lt;/UL&gt;&lt;/UL&gt;&lt;/UL&gt;&lt;/UL&gt;&lt;/UL&gt;&lt;/UL&gt;&lt;/UL&gt;&lt;/UL&gt;&lt;/UL&gt;&lt;/UL&gt;&lt;/UL&gt;&lt;/UL&gt;&lt;/UL&gt;&lt;/UL&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 14 Mar 2016 13:35:55 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Design-Studio/fsl-debug-problem-change-frequency/m-p/460013#M4778</guid>
      <dc:creator>danielecortella</dc:creator>
      <dc:date>2016-03-14T13:35:55Z</dc:date>
    </item>
    <item>
      <title>Re: fsl_debug problem change frequency</title>
      <link>https://community.nxp.com/t5/Kinetis-Design-Studio/fsl-debug-problem-change-frequency/m-p/460014#M4779</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Danniele,&lt;/P&gt;&lt;P&gt;I had intended to change the project correct then send o you , but&lt;/P&gt;&lt;P&gt;the project on my side sometimes can not run into the "main_task()",&lt;/P&gt;&lt;P&gt;for i know little about the RTOS,&amp;nbsp; so i&amp;nbsp; can only check the code without debug.&lt;/P&gt;&lt;P&gt;First , in the function&amp;nbsp; of &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/23182iDA31AAE95F004D09/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;the callback function will initialize the peripherals clock, for example the UART, and this needs to be&lt;/P&gt;&lt;P&gt;implemented manually , while in your project , it is null , so it have not update the uart clock .&lt;/P&gt;&lt;P&gt;And about the change clock configuration,&amp;nbsp; i highly recommend you one demo , it use KSDK1.2 , while&lt;/P&gt;&lt;P&gt;the method is the same , you can refer to : &lt;A _jive_internal="true" href="https://community.nxp.com/thread/357115#524685" title="https://community.freescale.com/thread/357115#524685"&gt;https://community.freescale.com/thread/357115#524685&lt;/A&gt;&amp;nbsp; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope it helps&lt;/P&gt;&lt;P&gt;Alice&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 16 Mar 2016 04:25:28 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Design-Studio/fsl-debug-problem-change-frequency/m-p/460014#M4779</guid>
      <dc:creator>Alice_Yang</dc:creator>
      <dc:date>2016-03-16T04:25:28Z</dc:date>
    </item>
    <item>
      <title>Re: fsl_debug problem change frequency</title>
      <link>https://community.nxp.com/t5/Kinetis-Design-Studio/fsl-debug-problem-change-frequency/m-p/460015#M4780</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;i have just tried with the use of the callback function but same &lt;/P&gt;&lt;P&gt;problem. I have change some part in the code:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;         - remove the WAIT component in pex because i not use it&lt;/P&gt;&lt;P&gt;         - i use the callback function for deinit e init the UART &lt;/P&gt;&lt;P&gt;(clockMan_uart0_callback)&lt;/P&gt;&lt;P&gt;         to do the same things in the sample, the device still to not work.&lt;/P&gt;&lt;P&gt;         In my project i use a 16mhz crystal but the frdm mount a 8mhz, &lt;/P&gt;&lt;P&gt;could be this to give you problem?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The firmware is very simple, it print "HELLO" and when the pin PTD6 is &lt;/P&gt;&lt;P&gt;pulled down the interrupt PORTC_PORTD_IRQHandler is called, the &lt;/P&gt;&lt;P&gt;CPU_Clock_Setting() function is executed and a change in frequency is &lt;/P&gt;&lt;P&gt;required.&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  *&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Il 16/03/2016 05:25, Alice_Yang ha scritto:&lt;/P&gt;&lt;BLOCKQUOTE level="1"&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;&amp;gt;&lt;/P&gt;&lt;BLOCKQUOTE level="1"&gt;&lt;P&gt;  NXP Community&lt;/P&gt;&lt;P&gt;  &amp;lt;https://community.freescale.com/?et=watches.email.thread&amp;gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;&amp;gt;&lt;/P&gt;&lt;BLOCKQUOTE level="1"&gt;&lt;P&gt;    fsl_debug problem change frequency&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;risposta da Alice_Yang &lt;/P&gt;&lt;P&gt;&amp;lt;https://community.freescale.com/people/Alice_Yang?et=watches.email.thread&amp;gt; &lt;/P&gt;&lt;P&gt;su /Kinetis Design Studio/ - Visualizza la discussione completa &lt;/P&gt;&lt;P&gt;&amp;lt;https://community.freescale.com/message/625200?et=watches.email.thread#comment-625200&amp;gt;&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;&amp;gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 16 Mar 2016 09:41:24 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Design-Studio/fsl-debug-problem-change-frequency/m-p/460015#M4780</guid>
      <dc:creator>danielecortella</dc:creator>
      <dc:date>2016-03-16T09:41:24Z</dc:date>
    </item>
    <item>
      <title>Re: fsl_debug problem change frequency</title>
      <link>https://community.nxp.com/t5/Kinetis-Design-Studio/fsl-debug-problem-change-frequency/m-p/460016#M4781</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Daniele,&lt;/P&gt;&lt;P&gt;For the component of "fsl_debug_console" use the UART, so , in order to&lt;/P&gt;&lt;P&gt;analysis easily , i create one new project on ksdk1.3 about the frdm-kl46(kl46z256),&lt;/P&gt;&lt;P&gt;add the fsl_lpsci component , also configure it to UART0 , pay attention , i configure&lt;/P&gt;&lt;P&gt;the PTA1 PTA2 as the&amp;nbsp; UART0 pins.Set two clock mode , FEI and PEE,&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="pastedImage_0.png"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/23657i25539C37D859F978/image-size/large?v=v2&amp;amp;px=999" role="button" title="pastedImage_0.png" alt="pastedImage_0.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;use the "clock configuration1"(PEE) mode as the&lt;/P&gt;&lt;P&gt;initialize mode , then change it to FEI.&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/23751i6D85A82AE56F37F7/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;In the main function , first send "abc", after change the clock mode , send "def", also can check the&lt;/P&gt;&lt;P&gt;current core clock :&amp;nbsp;&amp;nbsp; syt_test = CLOCK_SYS_GetCoreClockFreq();&lt;/P&gt;&lt;P&gt;Please test it on your side , maybe you need change the Pins of UART .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope it helps&lt;/P&gt;&lt;P&gt;Alice&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 23 Mar 2016 09:07:52 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Design-Studio/fsl-debug-problem-change-frequency/m-p/460016#M4781</guid>
      <dc:creator>Alice_Yang</dc:creator>
      <dc:date>2016-03-23T09:07:52Z</dc:date>
    </item>
    <item>
      <title>Re: fsl_debug problem change frequency</title>
      <link>https://community.nxp.com/t5/Kinetis-Design-Studio/fsl-debug-problem-change-frequency/m-p/460017#M4782</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Alice,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;sorry for the delay in the response but i had work on other project. Yes &lt;/P&gt;&lt;P&gt;you sample is working fine, i have change the clock crystal to 16Mhz and &lt;/P&gt;&lt;P&gt;use the fsl_debug instead the uart library. The problem born when you &lt;/P&gt;&lt;P&gt;select the clock source of the fsl_debug. If i select the autoselect&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;all work , but if i select&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;it crush. There is a bag ....&lt;/P&gt;&lt;P&gt;I use the ERCLK because i have a system that can go in low power &lt;/P&gt;&lt;P&gt;reducing the frequency, using the external clock (16Mhz) directly for &lt;/P&gt;&lt;P&gt;clock the system i can turn off the PLL and FLL.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Attached the sample with external cystal set to 16Mhz and the fsl_debug, &lt;/P&gt;&lt;P&gt;if you try the two setting in one case work, in the other not.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;BLOCKQUOTE level="1"&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;-- &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*OPTOI GROUP *&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Technical Dept.&lt;/P&gt;&lt;P&gt;Daniele Cortellazzi&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;***************************************************&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;OPTOELETTRONICA ITALIA S.r.l.&lt;/P&gt;&lt;P&gt;Via Vienna, 8&lt;/P&gt;&lt;P&gt;I-38121 Gardolo (TN) ITALY&lt;/P&gt;&lt;P&gt;Phone 0039 0461 991121&lt;/P&gt;&lt;P&gt;Fax 0039 0461 990164&lt;/P&gt;&lt;P&gt;daniele.cortellazzi@optoi.com&lt;/P&gt;&lt;P&gt;&lt;A href="https://community.nxp.com/www.optoi.com" target="test_blank"&gt;www.optoi.com&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;UL&gt;&lt;UL&gt;&lt;UL&gt;&lt;UL&gt;&lt;UL&gt;&lt;UL&gt;&lt;UL&gt;&lt;UL&gt;&lt;UL&gt;&lt;UL&gt;&lt;UL&gt;&lt;UL&gt;&lt;UL&gt;&lt;UL&gt;&lt;UL&gt;&lt;UL&gt;&lt;UL&gt;&lt;UL&gt;&lt;UL&gt;&lt;UL&gt;&lt;UL&gt;&lt;UL&gt;&lt;UL&gt;&lt;UL&gt;&lt;UL&gt;&lt;UL&gt;&lt;UL&gt;&lt;UL&gt;&lt;UL&gt;&lt;UL&gt;&lt;UL&gt;&lt;UL&gt;&lt;UL&gt;&lt;UL&gt;&lt;UL&gt;&lt;UL&gt;&lt;UL&gt;&lt;UL&gt;&lt;UL&gt;&lt;UL&gt;&lt;UL&gt;&lt;UL&gt;&lt;UL&gt;&lt;UL&gt;&lt;UL&gt;&lt;UL&gt;&lt;UL&gt;&lt;UL&gt;&lt;UL&gt;&lt;LI level="50" type="ul"&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;/UL&gt;&lt;/UL&gt;&lt;/UL&gt;&lt;/UL&gt;&lt;/UL&gt;&lt;/UL&gt;&lt;/UL&gt;&lt;/UL&gt;&lt;/UL&gt;&lt;/UL&gt;&lt;/UL&gt;&lt;/UL&gt;&lt;/UL&gt;&lt;/UL&gt;&lt;/UL&gt;&lt;/UL&gt;&lt;/UL&gt;&lt;/UL&gt;&lt;/UL&gt;&lt;/UL&gt;&lt;/UL&gt;&lt;/UL&gt;&lt;/UL&gt;&lt;/UL&gt;&lt;/UL&gt;&lt;/UL&gt;&lt;/UL&gt;&lt;/UL&gt;&lt;/UL&gt;&lt;/UL&gt;&lt;/UL&gt;&lt;/UL&gt;&lt;/UL&gt;&lt;/UL&gt;&lt;/UL&gt;&lt;/UL&gt;&lt;/UL&gt;&lt;/UL&gt;&lt;/UL&gt;&lt;/UL&gt;&lt;/UL&gt;&lt;/UL&gt;&lt;/UL&gt;&lt;/UL&gt;&lt;/UL&gt;&lt;/UL&gt;&lt;/UL&gt;&lt;/UL&gt;&lt;/UL&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 31 Mar 2016 12:15:40 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Design-Studio/fsl-debug-problem-change-frequency/m-p/460017#M4782</guid>
      <dc:creator>danielecortella</dc:creator>
      <dc:date>2016-03-31T12:15:40Z</dc:date>
    </item>
    <item>
      <title>Re: fsl_debug problem change frequency</title>
      <link>https://community.nxp.com/t5/Kinetis-Design-Studio/fsl-debug-problem-change-frequency/m-p/460018#M4783</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Daniele,&lt;/P&gt;&lt;P&gt;The Clock cfg0 is FEI, so we can not use the ERCLK as the clock source&lt;/P&gt;&lt;P&gt;of UART0. In the CFG1 PEE mode , we can use it , so you can configure the&lt;/P&gt;&lt;P&gt;fsl_debug_console component as this :&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="pastedImage_0.png"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/27282i6664EA5A2C9187B6/image-size/large?v=v2&amp;amp;px=999" role="button" title="pastedImage_0.png" alt="pastedImage_0.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;And in the code , please add&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/27428i17DF7E5AF977AAF0/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;Pay attention that , my project is from PEE mode to FEI mode , so when it change to FEI mode,&lt;/P&gt;&lt;P&gt;configure the UART clock source as "kClockLpsciSrcPllFllSel ".&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope it helps&lt;/P&gt;&lt;P&gt;Alice&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 01 Apr 2016 07:33:12 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Design-Studio/fsl-debug-problem-change-frequency/m-p/460018#M4783</guid>
      <dc:creator>Alice_Yang</dc:creator>
      <dc:date>2016-04-01T07:33:12Z</dc:date>
    </item>
    <item>
      <title>Re: fsl_debug problem change frequency</title>
      <link>https://community.nxp.com/t5/Kinetis-Design-Studio/fsl-debug-problem-change-frequency/m-p/460019#M4784</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Alice,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;yes but my problem is to pass from PLL to BLPE mode. In this mode the UART crash and there is no reason. Now i'm bored to try to find a solution (if there is....), i will use the PLL in all two configuration. The micro will consume more power ....&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 01 Apr 2016 09:34:37 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Design-Studio/fsl-debug-problem-change-frequency/m-p/460019#M4784</guid>
      <dc:creator>danielecortella</dc:creator>
      <dc:date>2016-04-01T09:34:37Z</dc:date>
    </item>
  </channel>
</rss>

