<?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 void SOSC_init_8MHz(void) in S32K</title>
    <link>https://community.nxp.com/t5/S32K/void-SOSC-init-8MHz-void/m-p/1626934#M21821</link>
    <description>&lt;P&gt;&lt;SPAN&gt;We have used S32 Configuration Tool to configure Osillator module. Here is the generated C code for your ready reference. /* ************************************************************************* * Configuration structure for Clock Configuration 0 * ************************************************************************* */ /*! @brief User Configuration structure clock_managerCfg_0 */ clock_manager_user_config_t clockMan1_InitConfig0 = { .scgConfig = { .sircConfig = { .initialize = true, .enableInStop = true, /* Enable SIRC in stop mode */ .enableInLowPower = true, /* Enable SIRC in low power mode */ .locked = false, /* unlocked */ .range = SCG_SIRC_RANGE_HIGH, /* Slow IRC high range clock (8 MHz) */ .div1 = SCG_ASYNC_CLOCK_DIV_BY_1, /* Slow IRC Clock Divider 1: divided by 1 */ .div2 = SCG_ASYNC_CLOCK_DIV_BY_1, /* Slow IRC Clock Divider 3: divided by 1 */ }, .fircConfig = { .initialize = true, .regulator = true, /* FIRC regulator is enabled */ .locked = false, /* unlocked */ .range = SCG_FIRC_RANGE_48M, /*!&amp;lt; RANGE */ .div1 = SCG_ASYNC_CLOCK_DIV_BY_1, /* Fast IRC Clock Divider 1: divided by 1 */ .div2 = SCG_ASYNC_CLOCK_DIV_BY_1, /* Fast IRC Clock Divider 3: divided by 1 */ }, .rtcConfig = { .initialize = false, }, .soscConfig = { .initialize = true, .freq = 8000000U, /* System Oscillator frequency: 8000000Hz */ .monitorMode = SCG_SOSC_MONITOR_DISABLE,/* Monitor disabled */ .locked = false, /* SOSC disabled */ .extRef = SCG_SOSC_REF_OSC, /* Internal oscillator of OSC requested. */ .gain = SCG_SOSC_GAIN_LOW, /* Configure crystal oscillator for low-gain operation */ .range = SCG_SOSC_RANGE_HIGH, /* High frequency range selected for the crystal oscillator of 8 MHz to 40 MHz. */ .div1 = SCG_ASYNC_CLOCK_DIV_BY_1, /* System OSC Clock Divider 1: divided by 1 */ .div2 = SCG_ASYNC_CLOCK_DIV_BY_1, /* System OSC Clock Divider 3: divided by 1 */ }, .spllConfig = { .initialize = true, .monitorMode = SCG_SPLL_MONITOR_DISABLE,/* Monitor disabled */ .locked = false, /* unlocked */ .prediv = (uint8_t)SCG_SPLL_CLOCK_PREDIV_BY_1,/* Divided by 1 */ .mult = (uint8_t)SCG_SPLL_CLOCK_MULTIPLY_BY_28,/* Multiply Factor is 28 */ .src=0U, .div1 = SCG_ASYNC_CLOCK_DIV_BY_1, /* System PLL Clock Divider 1: divided by 1 */ .div2 = SCG_ASYNC_CLOCK_DIV_BY_1, /* System PLL Clock Divider 3: divided by 1 */ }, .clockOutConfig = { .initialize = true, .source = SCG_CLOCKOUT_SRC_FIRC, /* Fast IRC. */ }, .clockModeConfig = { .initialize = true, .rccrConfig = { .src=SCG_SYSTEM_CLOCK_SRC_FIRC,/* Fast FIRC */ .divCore = SCG_SYSTEM_CLOCK_DIV_BY_1,/* Core Clock Divider: divided by 1 */ .divBus = SCG_SYSTEM_CLOCK_DIV_BY_1,/* Bus Clock Divider: divided by 1 */ .divSlow = SCG_SYSTEM_CLOCK_DIV_BY_2,/* Slow Clock Divider: divided by 2 */ }, .vccrConfig = { .src=SCG_SYSTEM_CLOCK_SRC_SIRC,/* Slow SIRC */ .divCore = SCG_SYSTEM_CLOCK_DIV_BY_2,/* Core Clock Divider: divided by 2 */ .divBus = SCG_SYSTEM_CLOCK_DIV_BY_1,/* Bus Clock Divider: divided by 1 */ .divSlow = SCG_SYSTEM_CLOCK_DIV_BY_4,/* Slow Clock Divider: divided by 4 */ }, .hccrConfig = { .src=SCG_SYSTEM_CLOCK_SRC_SYS_PLL,/* System PLL */ .divCore = SCG_SYSTEM_CLOCK_DIV_BY_1,/* Core Clock Divider: divided by 1 */ .divBus = SCG_SYSTEM_CLOCK_DIV_BY_2,/* Bus Clock Divider: divided by 2 */ .divSlow = SCG_SYSTEM_CLOCK_DIV_BY_4,/* Slow Clock Divider: divided by 4 */ }, }, }, .pccConfig = { .peripheralClocks = peripheralClockConfig0, /*!&amp;lt; Peripheral clock control configurations */ .count = NUM_OF_PERIPHERAL_CLOCKS_0, /*!&amp;lt; Number of the peripheral clock control configurations */ }, .simConfig = { .clockOutConfig = { .initialize = true, /*!&amp;lt; Initialize */ .enable = true, /* enabled */ .source = SIM_CLKOUT_SEL_SYSTEM_SCG_CLKOUT,/* SCG CLKOUT clock select: SCG slow clock */ .divider = SIM_CLKOUT_DIV_BY_1, /* Divided by 1 */ }, .lpoClockConfig = { .initialize = true, /*!&amp;lt; Initialize */ .enableLpo1k = true, /*!&amp;lt; LPO1KCLKEN */ .enableLpo32k = true, /*!&amp;lt; LPO32KCLKEN */ .sourceLpoClk = SIM_LPO_CLK_SEL_LPO_128K,/* 128 kHz LPO clock */ .sourceRtcClk = SIM_RTCCLK_SEL_FIRCDIV1_CLK,/* FIRCDIV1 clock */ }, .platGateConfig = { .initialize = true, /*!&amp;lt; Initialize */ .enableEim = false, /*!&amp;lt; CGCEIM */ .enableErm = true, /*!&amp;lt; CGCERM */ .enableDma = false, /*!&amp;lt; CGCDMA */ .enableMpu = true, /*!&amp;lt; CGCMPU */ .enableMscm = false, /*!&amp;lt; CGCMSCM */ }, .tclkConfig = { .initialize = false, /*!&amp;lt; Initialize */ }, .traceClockConfig = { .initialize = true, /*!&amp;lt; Initialize */ .divEnable = true, /*!&amp;lt; TRACEDIVEN */ .source = CLOCK_TRACE_SRC_CORE_CLK, /*!&amp;lt; TRACECLK_SEL */ .divider = 0U, /*!&amp;lt; TRACEDIV */ .divFraction = false, /*!&amp;lt; TRACEFRAC */ }, }, .pmcConfig = { .lpoClockConfig = { .initialize = true, /*!&amp;lt; Initialize */ .enable = true, /*!&amp;lt; Enable/disable LPO */ .trimValue = 0, /*!&amp;lt; Trimming value for LPO */ }, }, }; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;/*! @brief Array of pointers to User configuration structures */ clock_manager_user_config_t const * g_clockManConfigsArr[] = { &amp;amp;clockMan1_InitConfig0 }; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;/*! @brief Array of pointers to User defined Callbacks configuration structures */ /* The tool do not support generate Callbacks configuration. It's always empty. */ clock_manager_callback_user_config_t * g_clockManCallbacksArr[] = {(void*)0}; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;We would like to use this structure and complete the "SOSC_init_8MHz" function. Could you please help me out to access the individual elements from this structure please? Please help us out to replace the following traditional way using this structure and pointers . &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;SCG-&amp;gt;SOSCDIV=0x00000101; /* SOSCDIV1 &amp;amp; SOSCDIV2 =1: divide by 1 */&lt;/SPAN&gt;&lt;/P&gt;</description>
    <pubDate>Mon, 03 Apr 2023 14:38:52 GMT</pubDate>
    <dc:creator>SivakumarMariappan</dc:creator>
    <dc:date>2023-04-03T14:38:52Z</dc:date>
    <item>
      <title>void SOSC_init_8MHz(void)</title>
      <link>https://community.nxp.com/t5/S32K/void-SOSC-init-8MHz-void/m-p/1626934#M21821</link>
      <description>&lt;P&gt;&lt;SPAN&gt;We have used S32 Configuration Tool to configure Osillator module. Here is the generated C code for your ready reference. /* ************************************************************************* * Configuration structure for Clock Configuration 0 * ************************************************************************* */ /*! @brief User Configuration structure clock_managerCfg_0 */ clock_manager_user_config_t clockMan1_InitConfig0 = { .scgConfig = { .sircConfig = { .initialize = true, .enableInStop = true, /* Enable SIRC in stop mode */ .enableInLowPower = true, /* Enable SIRC in low power mode */ .locked = false, /* unlocked */ .range = SCG_SIRC_RANGE_HIGH, /* Slow IRC high range clock (8 MHz) */ .div1 = SCG_ASYNC_CLOCK_DIV_BY_1, /* Slow IRC Clock Divider 1: divided by 1 */ .div2 = SCG_ASYNC_CLOCK_DIV_BY_1, /* Slow IRC Clock Divider 3: divided by 1 */ }, .fircConfig = { .initialize = true, .regulator = true, /* FIRC regulator is enabled */ .locked = false, /* unlocked */ .range = SCG_FIRC_RANGE_48M, /*!&amp;lt; RANGE */ .div1 = SCG_ASYNC_CLOCK_DIV_BY_1, /* Fast IRC Clock Divider 1: divided by 1 */ .div2 = SCG_ASYNC_CLOCK_DIV_BY_1, /* Fast IRC Clock Divider 3: divided by 1 */ }, .rtcConfig = { .initialize = false, }, .soscConfig = { .initialize = true, .freq = 8000000U, /* System Oscillator frequency: 8000000Hz */ .monitorMode = SCG_SOSC_MONITOR_DISABLE,/* Monitor disabled */ .locked = false, /* SOSC disabled */ .extRef = SCG_SOSC_REF_OSC, /* Internal oscillator of OSC requested. */ .gain = SCG_SOSC_GAIN_LOW, /* Configure crystal oscillator for low-gain operation */ .range = SCG_SOSC_RANGE_HIGH, /* High frequency range selected for the crystal oscillator of 8 MHz to 40 MHz. */ .div1 = SCG_ASYNC_CLOCK_DIV_BY_1, /* System OSC Clock Divider 1: divided by 1 */ .div2 = SCG_ASYNC_CLOCK_DIV_BY_1, /* System OSC Clock Divider 3: divided by 1 */ }, .spllConfig = { .initialize = true, .monitorMode = SCG_SPLL_MONITOR_DISABLE,/* Monitor disabled */ .locked = false, /* unlocked */ .prediv = (uint8_t)SCG_SPLL_CLOCK_PREDIV_BY_1,/* Divided by 1 */ .mult = (uint8_t)SCG_SPLL_CLOCK_MULTIPLY_BY_28,/* Multiply Factor is 28 */ .src=0U, .div1 = SCG_ASYNC_CLOCK_DIV_BY_1, /* System PLL Clock Divider 1: divided by 1 */ .div2 = SCG_ASYNC_CLOCK_DIV_BY_1, /* System PLL Clock Divider 3: divided by 1 */ }, .clockOutConfig = { .initialize = true, .source = SCG_CLOCKOUT_SRC_FIRC, /* Fast IRC. */ }, .clockModeConfig = { .initialize = true, .rccrConfig = { .src=SCG_SYSTEM_CLOCK_SRC_FIRC,/* Fast FIRC */ .divCore = SCG_SYSTEM_CLOCK_DIV_BY_1,/* Core Clock Divider: divided by 1 */ .divBus = SCG_SYSTEM_CLOCK_DIV_BY_1,/* Bus Clock Divider: divided by 1 */ .divSlow = SCG_SYSTEM_CLOCK_DIV_BY_2,/* Slow Clock Divider: divided by 2 */ }, .vccrConfig = { .src=SCG_SYSTEM_CLOCK_SRC_SIRC,/* Slow SIRC */ .divCore = SCG_SYSTEM_CLOCK_DIV_BY_2,/* Core Clock Divider: divided by 2 */ .divBus = SCG_SYSTEM_CLOCK_DIV_BY_1,/* Bus Clock Divider: divided by 1 */ .divSlow = SCG_SYSTEM_CLOCK_DIV_BY_4,/* Slow Clock Divider: divided by 4 */ }, .hccrConfig = { .src=SCG_SYSTEM_CLOCK_SRC_SYS_PLL,/* System PLL */ .divCore = SCG_SYSTEM_CLOCK_DIV_BY_1,/* Core Clock Divider: divided by 1 */ .divBus = SCG_SYSTEM_CLOCK_DIV_BY_2,/* Bus Clock Divider: divided by 2 */ .divSlow = SCG_SYSTEM_CLOCK_DIV_BY_4,/* Slow Clock Divider: divided by 4 */ }, }, }, .pccConfig = { .peripheralClocks = peripheralClockConfig0, /*!&amp;lt; Peripheral clock control configurations */ .count = NUM_OF_PERIPHERAL_CLOCKS_0, /*!&amp;lt; Number of the peripheral clock control configurations */ }, .simConfig = { .clockOutConfig = { .initialize = true, /*!&amp;lt; Initialize */ .enable = true, /* enabled */ .source = SIM_CLKOUT_SEL_SYSTEM_SCG_CLKOUT,/* SCG CLKOUT clock select: SCG slow clock */ .divider = SIM_CLKOUT_DIV_BY_1, /* Divided by 1 */ }, .lpoClockConfig = { .initialize = true, /*!&amp;lt; Initialize */ .enableLpo1k = true, /*!&amp;lt; LPO1KCLKEN */ .enableLpo32k = true, /*!&amp;lt; LPO32KCLKEN */ .sourceLpoClk = SIM_LPO_CLK_SEL_LPO_128K,/* 128 kHz LPO clock */ .sourceRtcClk = SIM_RTCCLK_SEL_FIRCDIV1_CLK,/* FIRCDIV1 clock */ }, .platGateConfig = { .initialize = true, /*!&amp;lt; Initialize */ .enableEim = false, /*!&amp;lt; CGCEIM */ .enableErm = true, /*!&amp;lt; CGCERM */ .enableDma = false, /*!&amp;lt; CGCDMA */ .enableMpu = true, /*!&amp;lt; CGCMPU */ .enableMscm = false, /*!&amp;lt; CGCMSCM */ }, .tclkConfig = { .initialize = false, /*!&amp;lt; Initialize */ }, .traceClockConfig = { .initialize = true, /*!&amp;lt; Initialize */ .divEnable = true, /*!&amp;lt; TRACEDIVEN */ .source = CLOCK_TRACE_SRC_CORE_CLK, /*!&amp;lt; TRACECLK_SEL */ .divider = 0U, /*!&amp;lt; TRACEDIV */ .divFraction = false, /*!&amp;lt; TRACEFRAC */ }, }, .pmcConfig = { .lpoClockConfig = { .initialize = true, /*!&amp;lt; Initialize */ .enable = true, /*!&amp;lt; Enable/disable LPO */ .trimValue = 0, /*!&amp;lt; Trimming value for LPO */ }, }, }; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;/*! @brief Array of pointers to User configuration structures */ clock_manager_user_config_t const * g_clockManConfigsArr[] = { &amp;amp;clockMan1_InitConfig0 }; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;/*! @brief Array of pointers to User defined Callbacks configuration structures */ /* The tool do not support generate Callbacks configuration. It's always empty. */ clock_manager_callback_user_config_t * g_clockManCallbacksArr[] = {(void*)0}; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;We would like to use this structure and complete the "SOSC_init_8MHz" function. Could you please help me out to access the individual elements from this structure please? Please help us out to replace the following traditional way using this structure and pointers . &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;SCG-&amp;gt;SOSCDIV=0x00000101; /* SOSCDIV1 &amp;amp; SOSCDIV2 =1: divide by 1 */&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 03 Apr 2023 14:38:52 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S32K/void-SOSC-init-8MHz-void/m-p/1626934#M21821</guid>
      <dc:creator>SivakumarMariappan</dc:creator>
      <dc:date>2023-04-03T14:38:52Z</dc:date>
    </item>
  </channel>
</rss>

