<?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 Re: Switching from external to internal clock on MC56F82748 in Digital Signal Controllers</title>
    <link>https://community.nxp.com/t5/Digital-Signal-Controllers/Switching-from-external-to-internal-clock-on-MC56F82748/m-p/1800753#M2931</link>
    <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;Pls download SDK package from the link:&lt;/P&gt;
&lt;P&gt;&lt;A href="https://mcuxpresso.nxp.com/en/welcome" target="_blank"&gt;https://mcuxpresso.nxp.com/en/welcome&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;The example code use the internal 8MHz IRC and PLL to get 200MHz for the PLL output.&lt;/P&gt;
&lt;P&gt;I copy the code, pls have a try.&lt;/P&gt;
&lt;P&gt;BR&lt;/P&gt;
&lt;P&gt;XiangJun Rong&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;/*&lt;BR /&gt;* Copyright 2020-2021 NXP&lt;BR /&gt;* All rights reserved.&lt;BR /&gt;*&lt;BR /&gt;* SPDX-License-Identifier: BSD-3-Clause&lt;BR /&gt;*/&lt;/P&gt;
&lt;P&gt;/***********************************************************************************************************************&lt;BR /&gt;* This file was generated by the MCUXpresso Config Tools. Any manual edits made to this file&lt;BR /&gt;* will be overwritten if the respective MCUXpresso Config Tools is used to update this file.&lt;BR /&gt;**********************************************************************************************************************/&lt;BR /&gt;/*&lt;BR /&gt;* Clock initialization functions.&lt;BR /&gt;*/&lt;/P&gt;
&lt;P&gt;/* clang-format off */&lt;BR /&gt;/* TEXT BELOW IS USED AS SETTING FOR TOOLS *************************************&lt;BR /&gt;!!GlobalInfo&lt;BR /&gt;product: Clocks v8.0&lt;BR /&gt;processor: MC56F82748&lt;BR /&gt;package_id: MC56F82748VLH&lt;BR /&gt;mcu_data: ksdk2_0&lt;BR /&gt;processor_version: 0.10.5&lt;BR /&gt;board: TWR-MC56F8200&lt;BR /&gt;* BE CAREFUL MODIFYING THIS COMMENT - IT IS YAML SETTINGS FOR TOOLS **********/&lt;BR /&gt;/* clang-format on */&lt;/P&gt;
&lt;P&gt;#include "fsl_clock.h"&lt;BR /&gt;#include "clock_config.h"&lt;/P&gt;
&lt;P&gt;/*******************************************************************************&lt;BR /&gt;* Definitions&lt;BR /&gt;******************************************************************************/&lt;/P&gt;
&lt;P&gt;/*******************************************************************************&lt;BR /&gt;* Variables&lt;BR /&gt;******************************************************************************/&lt;/P&gt;
&lt;P&gt;/*******************************************************************************&lt;BR /&gt;************************ BOARD_InitBootClocks function ************************&lt;BR /&gt;******************************************************************************/&lt;BR /&gt;void BOARD_InitBootClocks(void)&lt;BR /&gt;{&lt;BR /&gt;BOARD_BootClockRUN();&lt;BR /&gt;}&lt;/P&gt;
&lt;P&gt;/*******************************************************************************&lt;BR /&gt;********************** Configuration BOARD_BootClockRUN ***********************&lt;BR /&gt;******************************************************************************/&lt;BR /&gt;/* clang-format off */&lt;BR /&gt;/* TEXT BELOW IS USED AS SETTING FOR TOOLS *************************************&lt;BR /&gt;!!Configuration&lt;BR /&gt;name: BOARD_BootClockRUN&lt;BR /&gt;called_from_default_init: true&lt;BR /&gt;outputs:&lt;BR /&gt;- {id: BUS_2X_CLK.outFreq, value: 100 MHz}&lt;BR /&gt;- {id: BUS_CLK.outFreq, value: 50 MHz}&lt;BR /&gt;- {id: CPU_CLK.outFreq, value: 50 MHz}&lt;BR /&gt;- {id: IIC0_FLT_CLK.outFreq, value: 50 MHz}&lt;BR /&gt;- {id: MSTR_OSC.outFreq, value: 8 MHz}&lt;BR /&gt;- {id: PWM_2X_CLK.outFreq, value: 200 MHz}&lt;BR /&gt;- {id: PWM_CLK.outFreq, value: 100 MHz}&lt;BR /&gt;- {id: ROSC200kHz_CLK.outFreq, value: 200 kHz}&lt;BR /&gt;- {id: ROSC8MHz_CLK.outFreq, value: 8 MHz}&lt;BR /&gt;- {id: SCI0_CLK.outFreq, value: 50 MHz}&lt;BR /&gt;- {id: SCI1_CLK.outFreq, value: 50 MHz}&lt;BR /&gt;- {id: SYS_2X_CLK.outFreq, value: 100 MHz}&lt;BR /&gt;- {id: SYS_CLK.outFreq, value: 50 MHz}&lt;BR /&gt;- {id: SYS_FTFA.outFreq, value: 25 MHz}&lt;BR /&gt;- {id: TMR_CLK.outFreq, value: 50 MHz}&lt;BR /&gt;settings:&lt;BR /&gt;- {id: OCCS.COD.scale, value: '2', locked: true}&lt;BR /&gt;- {id: OCCS.DIV.scale, value: '1', locked: true}&lt;BR /&gt;- {id: OCCS.EXT_SEL.sel, value: OCCS.OSC}&lt;BR /&gt;- {id: OCCS.PLLDB.scale, value: '50', locked: true}&lt;BR /&gt;- {id: OCCS.PWM_DIV2.sel, value: OCCS.PLL_DIV2}&lt;BR /&gt;- {id: OCCS.ZSRC.sel, value: OCCS.PLL_DIV2}&lt;BR /&gt;- {id: OCCS_CTRL_PLLPD_CFG, value: Enabled}&lt;BR /&gt;- {id: OCCS_OSCTL2_ROPD200K_CFG, value: Enabled}&lt;BR /&gt;sources:&lt;BR /&gt;- {id: OCCS.ROSC200kHz.outFreq, value: 200 kHz}&lt;BR /&gt;* BE CAREFUL MODIFYING THIS COMMENT - IT IS YAML SETTINGS FOR TOOLS **********/&lt;BR /&gt;/* clang-format on */&lt;/P&gt;
&lt;P&gt;/*******************************************************************************&lt;BR /&gt;* Variables for BOARD_BootClockRUN configuration&lt;BR /&gt;******************************************************************************/&lt;BR /&gt;clock_config_t occsConfig_BOARD_BootClockRUN =&lt;BR /&gt;{&lt;BR /&gt;.bCrystalOscEnable = false, /* Crystal oscillator is disabled */&lt;BR /&gt;.bFircEnable = true, /* RC oscillator 8 MHz is enabled */&lt;BR /&gt;.bSircEnable = true, /* RC oscillator 200 kHz is enabled */&lt;BR /&gt;.bPllEnable = true, /* PLL is enabled */&lt;BR /&gt;.bCrystalOscMonitorEnable = false, /* External crystal (XOSC) clock monitor is disabled. */&lt;BR /&gt;.eFircSel = kCLOCK_FircSel_8M, /* FIRC normal mode, output 8M */&lt;BR /&gt;.eCrystalOscMode = kCLOCK_CrystalOscModeFSP,/* High power mode of the external oscillator (crystal oscillator in in Full Swing Pierce (FSP) mode) */&lt;BR /&gt;.eExtClksrc=kCLOCK_ExtClkSrcCrystalOsc, /* External crystal oscillator (OSC) */&lt;BR /&gt;.eClkInSel = kCLOCK_SelClkIn0, /* External reference clock CLKIN0 */&lt;BR /&gt;.eMstrOscClksrc=kCLOCK_MstrOscClkSrcFirc,/* 8 MHz / 400KHz fast internal RC oscillator */&lt;BR /&gt;.eMstr2xClksrc=kCLOCK_Mstr2xClkSrcPllDiv2,/* PLL output clock divided by 2 */&lt;BR /&gt;.eMstr2xClkPostScale = kCLOCK_PostscaleDiv2,/* mast_2x_clk = clkSrc / 2 */&lt;BR /&gt;.u32PllClkFreq = 400000000U, /* PLL output frequency: 400000000Hz */&lt;BR /&gt;};&lt;/P&gt;
&lt;P&gt;/*******************************************************************************&lt;BR /&gt;* Code for BOARD_BootClockRUN configuration&lt;BR /&gt;******************************************************************************/&lt;BR /&gt;void BOARD_BootClockRUN(void)&lt;BR /&gt;{&lt;BR /&gt;/* Check the run mode - switch all power regulators in the normal mode if they are placed in standby or disabled mode. */&lt;BR /&gt;/* If the advanced power mode is enabled in the Flash Options register. */&lt;BR /&gt;if (FTFA-&amp;gt;FOPT &amp;amp; 0x1) {&lt;BR /&gt;/* If the Very Low Power Run mode is active. */&lt;BR /&gt;if (SIM-&amp;gt;PWRMODE &amp;amp; SIM_PWRMODE_VLPMS_MASK) {&lt;BR /&gt;SIM-&amp;gt;PWRMODE &amp;amp;= ~SIM_PWRMODE_VLPMODE_MASK;&lt;BR /&gt;while (SIM-&amp;gt;PWRMODE &amp;amp; SIM_PWRMODE_VLPMS_MASK){} /* Waiting to switch back from the Very Low Power Run mode. */&lt;BR /&gt;}&lt;BR /&gt;/* If the Low Power Run mode is active. */&lt;BR /&gt;if (SIM-&amp;gt;PWRMODE &amp;amp; SIM_PWRMODE_LPMS_MASK) {&lt;BR /&gt;SIM-&amp;gt;PWRMODE &amp;amp;= ~SIM_PWRMODE_LPMODE_MASK;&lt;BR /&gt;while (SIM-&amp;gt;PWRMODE &amp;amp; SIM_PWRMODE_LPMS_MASK) {} /* Waiting to switch back from the Low Power Run mode. */&lt;BR /&gt;}&lt;BR /&gt;while (!(PMC-&amp;gt;STS &amp;amp; PMC_STS_SR27_MASK)) {} /* Waiting for small regulator 2.7V supply is ready to be used. */&lt;BR /&gt;} else {&lt;BR /&gt;/* If a standby or power down state of any regulator is activated. */&lt;BR /&gt;if (SIM-&amp;gt;PWR &amp;amp; (SIM_PWR_SR12STDBY_MASK | SIM_PWR_SR27PDN_MASK | SIM_PWR_SR27STDBY_MASK | SIM_PWR_LRSTDBY_MASK)) {&lt;BR /&gt;SIM-&amp;gt;PWR = 0; /* Enter the run mode - switch all power regulators into the normal mode. */&lt;BR /&gt;while (!(PMC-&amp;gt;STS &amp;amp; PMC_STS_SR27_MASK)) {} /* Waiting for small regulator 2.7V supply is ready to be used. */&lt;BR /&gt;}&lt;BR /&gt;}&lt;BR /&gt;/* Set clock configuration of the OCCS module. */&lt;BR /&gt;CLOCK_SetClkConfig(&amp;amp;occsConfig_BOARD_BootClockRUN);&lt;BR /&gt;}&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Fri, 02 Feb 2024 09:42:41 GMT</pubDate>
    <dc:creator>xiangjun_rong</dc:creator>
    <dc:date>2024-02-02T09:42:41Z</dc:date>
    <item>
      <title>Switching from external to internal clock on MC56F82748</title>
      <link>https://community.nxp.com/t5/Digital-Signal-Controllers/Switching-from-external-to-internal-clock-on-MC56F82748/m-p/1798576#M2927</link>
      <description>&lt;P&gt;Hi there!&lt;/P&gt;&lt;P&gt;We are using an external 8 MHz crystal as the clock source on in of our designs with the MC56F82748 and are now facing some issues where the DSC stops executing its code completely.&lt;BR /&gt;The clock generator then uses the PLL to increase the core frequency to 100 MHz and the "HS frequency" to 200 MHz.&lt;/P&gt;&lt;P&gt;We are suspecting some noise issues on the clock signal and would like to switch over to the "internal relaxation oscillator" as the clock source to figure out, if this removes the issue.&lt;/P&gt;&lt;P&gt;For the switching of the clock source I have tried to follow the instructions in chapter 18 of the "MC56F827xx Reference Manual" by executing the following instructions:&lt;/P&gt;&lt;OL&gt;&lt;LI&gt;Switch "Clock Source" from "PLL output divided by 2" to "MSTR_OSC" by clearing the ZSRC (Clock Source) bit in the OCCS_CTRL register&lt;/LI&gt;&lt;LI&gt;Switch "Prescaler Clock" from "External reference" to "8 MHz relaxation oscillator" by setting both PRECS-bits (Prescaler Clock Select) to 0.&lt;/LI&gt;&lt;LI&gt;Switch back "Clock Source" from "MSTR_OSC" to&amp;nbsp;"PLL output divided by 2" by setting the ZSRC (Clock Source) bit in the OCCS_CTRL register&lt;BR /&gt;In between these instructions I have added some dummy instructions to add some delay.&lt;/LI&gt;&lt;/OL&gt;&lt;P&gt;After this sequence, the timers in the DSC are running at 1/25 of the clock frequency while using the external crystal.&lt;BR /&gt;This is the ratio between the 8 MHz clock source and the 200 MHz "HS" output of the PLL, so one explanation could be, that the clock source is still the "MSTR_OSC" instead of the PLL.&lt;/P&gt;&lt;P&gt;But then of course the question is, what is wrong with my command sequence to switch the clock source from external to internal reference?&lt;/P&gt;</description>
      <pubDate>Wed, 31 Jan 2024 10:04:19 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Digital-Signal-Controllers/Switching-from-external-to-internal-clock-on-MC56F82748/m-p/1798576#M2927</guid>
      <dc:creator>JPE</dc:creator>
      <dc:date>2024-01-31T10:04:19Z</dc:date>
    </item>
    <item>
      <title>Re: Switching from external to internal clock on MC56F82748</title>
      <link>https://community.nxp.com/t5/Digital-Signal-Controllers/Switching-from-external-to-internal-clock-on-MC56F82748/m-p/1799638#M2928</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;Unfortunately, the MC56F827xx does not have a block diagram for the clock.&lt;/P&gt;
&lt;P&gt;I copied a block diagram from MC56F825x, but the PLL output clock frequency is not the same.&lt;/P&gt;
&lt;P&gt;When you use PLL, you have to switch the MSTR_OSC clock, then configure PLL so that it can output 200MHz, and check if it is locked. After it is locked, switch to Fpll/2 clock source.&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;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="xiangjun_rong_0-1706774453591.png" style="width: 400px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/261265i66616A70B02C5349/image-size/medium?v=v2&amp;amp;px=400" role="button" title="xiangjun_rong_0-1706774453591.png" alt="xiangjun_rong_0-1706774453591.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 01 Feb 2024 08:03:54 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Digital-Signal-Controllers/Switching-from-external-to-internal-clock-on-MC56F82748/m-p/1799638#M2928</guid>
      <dc:creator>xiangjun_rong</dc:creator>
      <dc:date>2024-02-01T08:03:54Z</dc:date>
    </item>
    <item>
      <title>Re: Switching from external to internal clock on MC56F82748</title>
      <link>https://community.nxp.com/t5/Digital-Signal-Controllers/Switching-from-external-to-internal-clock-on-MC56F82748/m-p/1799697#M2929</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;SPAN&gt;XiangJun,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;thanks for your response.&lt;BR /&gt;However, what you suggest is exactly what I'm doing.&lt;BR /&gt;The PLL is already set up to generate 200 MHz before the switch, as the external crystal also runs on 8 MHz just as the internal relaxation oscillator, so I'm not even changing the postscaler or the divider of the PLL.&lt;BR /&gt;I'm also checking the LCK1-bit in the OCCS_STAT-register before switching from MSTR_OSC to the PLL clock source.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;So what else could be wrong in case the CPU keeps on running on the MSTR_OSC frequency?&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;BR. Jörn&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 01 Feb 2024 08:55:36 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Digital-Signal-Controllers/Switching-from-external-to-internal-clock-on-MC56F82748/m-p/1799697#M2929</guid>
      <dc:creator>JPE</dc:creator>
      <dc:date>2024-02-01T08:55:36Z</dc:date>
    </item>
    <item>
      <title>Re: Switching from external to internal clock on MC56F82748</title>
      <link>https://community.nxp.com/t5/Digital-Signal-Controllers/Switching-from-external-to-internal-clock-on-MC56F82748/m-p/1799767#M2930</link>
      <description>&lt;P&gt;Hello again,&lt;/P&gt;&lt;P&gt;OK, I found the reason for my problem.&lt;/P&gt;&lt;P&gt;I am using the two definitions "OCCS_MSTR_OSC_OUTPUT" and "OCCS_PLL_OSC_OUTPUT" from the "occs.h"-file to select the prescaler clock.&lt;BR /&gt;After checking with the reference manual I realized, that the values for those definitions are switched and therefore I was actually selecting the MSTR_OSC instead of the PLL output in my code.&lt;/P&gt;&lt;P&gt;After fixing this mistake in the header file the switching from external to internal clock works fine.&lt;/P&gt;&lt;P&gt;BR. Jörn&lt;/P&gt;</description>
      <pubDate>Thu, 01 Feb 2024 09:39:16 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Digital-Signal-Controllers/Switching-from-external-to-internal-clock-on-MC56F82748/m-p/1799767#M2930</guid>
      <dc:creator>JPE</dc:creator>
      <dc:date>2024-02-01T09:39:16Z</dc:date>
    </item>
    <item>
      <title>Re: Switching from external to internal clock on MC56F82748</title>
      <link>https://community.nxp.com/t5/Digital-Signal-Controllers/Switching-from-external-to-internal-clock-on-MC56F82748/m-p/1800753#M2931</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;Pls download SDK package from the link:&lt;/P&gt;
&lt;P&gt;&lt;A href="https://mcuxpresso.nxp.com/en/welcome" target="_blank"&gt;https://mcuxpresso.nxp.com/en/welcome&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;The example code use the internal 8MHz IRC and PLL to get 200MHz for the PLL output.&lt;/P&gt;
&lt;P&gt;I copy the code, pls have a try.&lt;/P&gt;
&lt;P&gt;BR&lt;/P&gt;
&lt;P&gt;XiangJun Rong&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;/*&lt;BR /&gt;* Copyright 2020-2021 NXP&lt;BR /&gt;* All rights reserved.&lt;BR /&gt;*&lt;BR /&gt;* SPDX-License-Identifier: BSD-3-Clause&lt;BR /&gt;*/&lt;/P&gt;
&lt;P&gt;/***********************************************************************************************************************&lt;BR /&gt;* This file was generated by the MCUXpresso Config Tools. Any manual edits made to this file&lt;BR /&gt;* will be overwritten if the respective MCUXpresso Config Tools is used to update this file.&lt;BR /&gt;**********************************************************************************************************************/&lt;BR /&gt;/*&lt;BR /&gt;* Clock initialization functions.&lt;BR /&gt;*/&lt;/P&gt;
&lt;P&gt;/* clang-format off */&lt;BR /&gt;/* TEXT BELOW IS USED AS SETTING FOR TOOLS *************************************&lt;BR /&gt;!!GlobalInfo&lt;BR /&gt;product: Clocks v8.0&lt;BR /&gt;processor: MC56F82748&lt;BR /&gt;package_id: MC56F82748VLH&lt;BR /&gt;mcu_data: ksdk2_0&lt;BR /&gt;processor_version: 0.10.5&lt;BR /&gt;board: TWR-MC56F8200&lt;BR /&gt;* BE CAREFUL MODIFYING THIS COMMENT - IT IS YAML SETTINGS FOR TOOLS **********/&lt;BR /&gt;/* clang-format on */&lt;/P&gt;
&lt;P&gt;#include "fsl_clock.h"&lt;BR /&gt;#include "clock_config.h"&lt;/P&gt;
&lt;P&gt;/*******************************************************************************&lt;BR /&gt;* Definitions&lt;BR /&gt;******************************************************************************/&lt;/P&gt;
&lt;P&gt;/*******************************************************************************&lt;BR /&gt;* Variables&lt;BR /&gt;******************************************************************************/&lt;/P&gt;
&lt;P&gt;/*******************************************************************************&lt;BR /&gt;************************ BOARD_InitBootClocks function ************************&lt;BR /&gt;******************************************************************************/&lt;BR /&gt;void BOARD_InitBootClocks(void)&lt;BR /&gt;{&lt;BR /&gt;BOARD_BootClockRUN();&lt;BR /&gt;}&lt;/P&gt;
&lt;P&gt;/*******************************************************************************&lt;BR /&gt;********************** Configuration BOARD_BootClockRUN ***********************&lt;BR /&gt;******************************************************************************/&lt;BR /&gt;/* clang-format off */&lt;BR /&gt;/* TEXT BELOW IS USED AS SETTING FOR TOOLS *************************************&lt;BR /&gt;!!Configuration&lt;BR /&gt;name: BOARD_BootClockRUN&lt;BR /&gt;called_from_default_init: true&lt;BR /&gt;outputs:&lt;BR /&gt;- {id: BUS_2X_CLK.outFreq, value: 100 MHz}&lt;BR /&gt;- {id: BUS_CLK.outFreq, value: 50 MHz}&lt;BR /&gt;- {id: CPU_CLK.outFreq, value: 50 MHz}&lt;BR /&gt;- {id: IIC0_FLT_CLK.outFreq, value: 50 MHz}&lt;BR /&gt;- {id: MSTR_OSC.outFreq, value: 8 MHz}&lt;BR /&gt;- {id: PWM_2X_CLK.outFreq, value: 200 MHz}&lt;BR /&gt;- {id: PWM_CLK.outFreq, value: 100 MHz}&lt;BR /&gt;- {id: ROSC200kHz_CLK.outFreq, value: 200 kHz}&lt;BR /&gt;- {id: ROSC8MHz_CLK.outFreq, value: 8 MHz}&lt;BR /&gt;- {id: SCI0_CLK.outFreq, value: 50 MHz}&lt;BR /&gt;- {id: SCI1_CLK.outFreq, value: 50 MHz}&lt;BR /&gt;- {id: SYS_2X_CLK.outFreq, value: 100 MHz}&lt;BR /&gt;- {id: SYS_CLK.outFreq, value: 50 MHz}&lt;BR /&gt;- {id: SYS_FTFA.outFreq, value: 25 MHz}&lt;BR /&gt;- {id: TMR_CLK.outFreq, value: 50 MHz}&lt;BR /&gt;settings:&lt;BR /&gt;- {id: OCCS.COD.scale, value: '2', locked: true}&lt;BR /&gt;- {id: OCCS.DIV.scale, value: '1', locked: true}&lt;BR /&gt;- {id: OCCS.EXT_SEL.sel, value: OCCS.OSC}&lt;BR /&gt;- {id: OCCS.PLLDB.scale, value: '50', locked: true}&lt;BR /&gt;- {id: OCCS.PWM_DIV2.sel, value: OCCS.PLL_DIV2}&lt;BR /&gt;- {id: OCCS.ZSRC.sel, value: OCCS.PLL_DIV2}&lt;BR /&gt;- {id: OCCS_CTRL_PLLPD_CFG, value: Enabled}&lt;BR /&gt;- {id: OCCS_OSCTL2_ROPD200K_CFG, value: Enabled}&lt;BR /&gt;sources:&lt;BR /&gt;- {id: OCCS.ROSC200kHz.outFreq, value: 200 kHz}&lt;BR /&gt;* BE CAREFUL MODIFYING THIS COMMENT - IT IS YAML SETTINGS FOR TOOLS **********/&lt;BR /&gt;/* clang-format on */&lt;/P&gt;
&lt;P&gt;/*******************************************************************************&lt;BR /&gt;* Variables for BOARD_BootClockRUN configuration&lt;BR /&gt;******************************************************************************/&lt;BR /&gt;clock_config_t occsConfig_BOARD_BootClockRUN =&lt;BR /&gt;{&lt;BR /&gt;.bCrystalOscEnable = false, /* Crystal oscillator is disabled */&lt;BR /&gt;.bFircEnable = true, /* RC oscillator 8 MHz is enabled */&lt;BR /&gt;.bSircEnable = true, /* RC oscillator 200 kHz is enabled */&lt;BR /&gt;.bPllEnable = true, /* PLL is enabled */&lt;BR /&gt;.bCrystalOscMonitorEnable = false, /* External crystal (XOSC) clock monitor is disabled. */&lt;BR /&gt;.eFircSel = kCLOCK_FircSel_8M, /* FIRC normal mode, output 8M */&lt;BR /&gt;.eCrystalOscMode = kCLOCK_CrystalOscModeFSP,/* High power mode of the external oscillator (crystal oscillator in in Full Swing Pierce (FSP) mode) */&lt;BR /&gt;.eExtClksrc=kCLOCK_ExtClkSrcCrystalOsc, /* External crystal oscillator (OSC) */&lt;BR /&gt;.eClkInSel = kCLOCK_SelClkIn0, /* External reference clock CLKIN0 */&lt;BR /&gt;.eMstrOscClksrc=kCLOCK_MstrOscClkSrcFirc,/* 8 MHz / 400KHz fast internal RC oscillator */&lt;BR /&gt;.eMstr2xClksrc=kCLOCK_Mstr2xClkSrcPllDiv2,/* PLL output clock divided by 2 */&lt;BR /&gt;.eMstr2xClkPostScale = kCLOCK_PostscaleDiv2,/* mast_2x_clk = clkSrc / 2 */&lt;BR /&gt;.u32PllClkFreq = 400000000U, /* PLL output frequency: 400000000Hz */&lt;BR /&gt;};&lt;/P&gt;
&lt;P&gt;/*******************************************************************************&lt;BR /&gt;* Code for BOARD_BootClockRUN configuration&lt;BR /&gt;******************************************************************************/&lt;BR /&gt;void BOARD_BootClockRUN(void)&lt;BR /&gt;{&lt;BR /&gt;/* Check the run mode - switch all power regulators in the normal mode if they are placed in standby or disabled mode. */&lt;BR /&gt;/* If the advanced power mode is enabled in the Flash Options register. */&lt;BR /&gt;if (FTFA-&amp;gt;FOPT &amp;amp; 0x1) {&lt;BR /&gt;/* If the Very Low Power Run mode is active. */&lt;BR /&gt;if (SIM-&amp;gt;PWRMODE &amp;amp; SIM_PWRMODE_VLPMS_MASK) {&lt;BR /&gt;SIM-&amp;gt;PWRMODE &amp;amp;= ~SIM_PWRMODE_VLPMODE_MASK;&lt;BR /&gt;while (SIM-&amp;gt;PWRMODE &amp;amp; SIM_PWRMODE_VLPMS_MASK){} /* Waiting to switch back from the Very Low Power Run mode. */&lt;BR /&gt;}&lt;BR /&gt;/* If the Low Power Run mode is active. */&lt;BR /&gt;if (SIM-&amp;gt;PWRMODE &amp;amp; SIM_PWRMODE_LPMS_MASK) {&lt;BR /&gt;SIM-&amp;gt;PWRMODE &amp;amp;= ~SIM_PWRMODE_LPMODE_MASK;&lt;BR /&gt;while (SIM-&amp;gt;PWRMODE &amp;amp; SIM_PWRMODE_LPMS_MASK) {} /* Waiting to switch back from the Low Power Run mode. */&lt;BR /&gt;}&lt;BR /&gt;while (!(PMC-&amp;gt;STS &amp;amp; PMC_STS_SR27_MASK)) {} /* Waiting for small regulator 2.7V supply is ready to be used. */&lt;BR /&gt;} else {&lt;BR /&gt;/* If a standby or power down state of any regulator is activated. */&lt;BR /&gt;if (SIM-&amp;gt;PWR &amp;amp; (SIM_PWR_SR12STDBY_MASK | SIM_PWR_SR27PDN_MASK | SIM_PWR_SR27STDBY_MASK | SIM_PWR_LRSTDBY_MASK)) {&lt;BR /&gt;SIM-&amp;gt;PWR = 0; /* Enter the run mode - switch all power regulators into the normal mode. */&lt;BR /&gt;while (!(PMC-&amp;gt;STS &amp;amp; PMC_STS_SR27_MASK)) {} /* Waiting for small regulator 2.7V supply is ready to be used. */&lt;BR /&gt;}&lt;BR /&gt;}&lt;BR /&gt;/* Set clock configuration of the OCCS module. */&lt;BR /&gt;CLOCK_SetClkConfig(&amp;amp;occsConfig_BOARD_BootClockRUN);&lt;BR /&gt;}&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 02 Feb 2024 09:42:41 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Digital-Signal-Controllers/Switching-from-external-to-internal-clock-on-MC56F82748/m-p/1800753#M2931</guid>
      <dc:creator>xiangjun_rong</dc:creator>
      <dc:date>2024-02-02T09:42:41Z</dc:date>
    </item>
  </channel>
</rss>

