<?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: S32K328 – FIRC Clock Divider (DIV16) Not Applied When Multicore Is Enabled in S32K</title>
    <link>https://community.nxp.com/t5/S32K/S32K328-FIRC-Clock-Divider-DIV16-Not-Applied-When-Multicore-Is/m-p/2390015#M59652</link>
    <description>&lt;DIV class=""&gt;&lt;P class=""&gt;&lt;SPAN class=""&gt;Hello,&lt;/SPAN&gt;&lt;/P&gt;&lt;/DIV&gt;&lt;DIV class=""&gt;&lt;P class=""&gt;&lt;SPAN class=""&gt;I have found &lt;/SPAN&gt;&lt;SPAN class=""&gt;the root cause &lt;/SPAN&gt;&lt;SPAN class=""&gt;on my side. &lt;/SPAN&gt;&lt;SPAN class=""&gt;Please see the relevant driver function &lt;/SPAN&gt;&lt;SPAN class=""&gt;below (Clock_Ip_SetFircDivSelHSEb in \Mcu_TS_T40D34M30I0R0\src\Clock_Ip_IntOsc.c&amp;nbsp;&lt;LI-EMOJI id="lia_disappointed-face" title=":disappointed_face:"&gt;&lt;/LI-EMOJI&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/DIV&gt;&lt;DIV class=""&gt;&lt;DIV class=""&gt;&lt;DIV class=""&gt;c&lt;/DIV&gt;&lt;DIV class=""&gt;&lt;PRE&gt;&lt;SPAN&gt;&lt;SPAN class=""&gt;/* Application can write this divider */&lt;/SPAN&gt;
&lt;/SPAN&gt;&lt;SPAN&gt;&lt;SPAN class=""&gt;if&lt;/SPAN&gt; &lt;SPAN class=""&gt;(&lt;/SPAN&gt; &lt;SPAN class=""&gt;(&lt;/SPAN&gt;&lt;SPAN class=""&gt;(&lt;/SPAN&gt;IP_CONFIGURATION_GPR&lt;SPAN class=""&gt;-&amp;gt;&lt;/SPAN&gt;CONFIG_REG_GPR &lt;SPAN class=""&gt;&amp;amp;&lt;/SPAN&gt; CONFIGURATION_GPR_CONFIG_REG_GPR_APP_CORE_ACC_MASK&lt;SPAN class=""&gt;)&lt;/SPAN&gt;
&lt;/SPAN&gt;&lt;SPAN&gt;      &lt;SPAN class=""&gt;&amp;gt;&amp;gt;&lt;/SPAN&gt; CONFIGURATION_GPR_CONFIG_REG_GPR_APP_CORE_ACC_SHIFT&lt;SPAN class=""&gt;)&lt;/SPAN&gt; &lt;SPAN class=""&gt;==&lt;/SPAN&gt; CLOCK_IP_APP_CAN_WRITE&lt;SPAN class=""&gt;)&lt;/SPAN&gt;
&lt;/SPAN&gt;&lt;SPAN&gt;&lt;SPAN class=""&gt;{&lt;/SPAN&gt;
&lt;/SPAN&gt;&lt;SPAN&gt;    &lt;SPAN class=""&gt;.&lt;/SPAN&gt;&lt;SPAN class=""&gt;.&lt;/SPAN&gt;&lt;SPAN class=""&gt;.&lt;/SPAN&gt;
&lt;/SPAN&gt;&lt;SPAN&gt;    &lt;SPAN class=""&gt;/* FIRC_DIV_SEL write happens here */&lt;/SPAN&gt;
&lt;/SPAN&gt;&lt;SPAN&gt;&lt;SPAN class=""&gt;}&lt;/SPAN&gt;
&lt;/SPAN&gt;&lt;SPAN&gt;&lt;SPAN class=""&gt;else&lt;/SPAN&gt;
&lt;/SPAN&gt;&lt;SPAN&gt;&lt;SPAN class=""&gt;{&lt;/SPAN&gt;
&lt;/SPAN&gt;&lt;SPAN&gt;    &lt;SPAN class=""&gt;/* HSE firmware doesn't allow to write FIRC post divider. */&lt;/SPAN&gt;
&lt;/SPAN&gt;&lt;SPAN&gt;    &lt;SPAN class=""&gt;Clock_Ip_ReportClockErrors&lt;/SPAN&gt;&lt;SPAN class=""&gt;(&lt;/SPAN&gt;CLOCK_IP_REPORT_WRITE_PROTECTION_ERROR&lt;SPAN class=""&gt;,&lt;/SPAN&gt; Config&lt;SPAN class=""&gt;-&amp;gt;&lt;/SPAN&gt;Name&lt;SPAN class=""&gt;)&lt;/SPAN&gt;&lt;SPAN class=""&gt;;&lt;/SPAN&gt;
&lt;/SPAN&gt;&lt;SPAN&gt;&lt;SPAN class=""&gt;}&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/PRE&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;DIV class=""&gt;&lt;P class=""&gt;&lt;SPAN class=""&gt;&lt;BR /&gt;The problem is &lt;/SPAN&gt;&lt;SPAN class=""&gt;that in my multicore configuration, &lt;/SPAN&gt;&lt;STRONG&gt;&lt;SPAN class=""&gt;the code never enters this if (APP_CORE_ACC == CLOCK_IP_APP_CAN_WRITE) block when running at full speed.&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;SPAN class=""&gt; I &lt;/SPAN&gt;&lt;SPAN class=""&gt;verified this by placing a while(1) &lt;/SPAN&gt;&lt;SPAN class=""&gt;inside the block — it is never &lt;/SPAN&gt;&lt;SPAN class=""&gt;reached. As a result, the &lt;/SPAN&gt;&lt;SPAN class=""&gt;FIRC_DIV_SEL write is skipped and the &lt;/SPAN&gt;&lt;SPAN class=""&gt;register stays at its reset value 3 &lt;/SPAN&gt;&lt;SPAN class=""&gt;(48MHz) instead of the configured 2 &lt;/SPAN&gt;&lt;SPAN class=""&gt;(3MHz). This makes my STM tick run 16x &lt;/SPAN&gt;&lt;SPAN class=""&gt;faster than intended.&lt;/SPAN&gt;&lt;/P&gt;&lt;/DIV&gt;&lt;DIV class=""&gt;&lt;P class=""&gt;&lt;SPAN class=""&gt;However, &lt;/SPAN&gt;&lt;STRONG&gt;&lt;SPAN class=""&gt;when I run in debug mode (stepping / with breakpoints), the same block executes correctly&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;SPAN class=""&gt; and FIRC_DIV_SEL &lt;/SPAN&gt;&lt;SPAN class=""&gt;is properly set to 2 (3MHz). &lt;/SPAN&gt;&lt;SPAN class=""&gt;This difference between &lt;/SPAN&gt;&lt;SPAN class=""&gt;full-speed and debug execution is the &lt;/SPAN&gt;&lt;SPAN class=""&gt;key symptom.&lt;/SPAN&gt;&lt;/P&gt;&lt;/DIV&gt;&lt;DIV class=""&gt;&lt;P class=""&gt;&lt;SPAN class=""&gt;So the APP_CORE_ACC&lt;/SPAN&gt;&lt;SPAN class=""&gt; bit in CONFIG_REG_GPR &lt;/SPAN&gt;&lt;SPAN class=""&gt;is not set to CLOCK_IP_APP_CAN_WRITE&lt;/SPAN&gt;&lt;SPAN class=""&gt; at the moment Mcu_InitClock&lt;/SPAN&gt;&lt;SPAN class=""&gt; reads it during a &lt;/SPAN&gt;&lt;SPAN class=""&gt;full-speed multicore boot, but it does &lt;/SPAN&gt;&lt;SPAN class=""&gt;become writable when I slow &lt;/SPAN&gt;&lt;SPAN class=""&gt;execution down with the debugger.&lt;/SPAN&gt;&lt;/P&gt;&lt;/DIV&gt;&lt;DIV class=""&gt;&lt;P class=""&gt;&lt;SPAN class=""&gt;A&lt;/SPAN&gt;&lt;SPAN class=""&gt;dditional context on my setup:&lt;/SPAN&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;&lt;SPAN class=""&gt;Mcu_InitClock&lt;/SPAN&gt;&lt;SPAN class=""&gt; and Mcu_SetMode are &lt;/SPAN&gt;&lt;SPAN class=""&gt;called only on Core 0. Core 1 &lt;/SPAN&gt;&lt;SPAN class=""&gt;(CM7_1) does not call any MCU &lt;/SPAN&gt;&lt;SPAN class=""&gt;clock API.&lt;/SPAN&gt;&lt;/LI&gt;&lt;LI&gt;&lt;SPAN class=""&gt;Core 1 is brought &lt;/SPAN&gt;&lt;SPAN class=""&gt;up from Core 0 via MC_ME &lt;/SPAN&gt;&lt;SPAN class=""&gt;(PRTN0_CORE1_*).&lt;/SPAN&gt;&lt;/LI&gt;&lt;LI&gt;&lt;SPAN class=""&gt;I am not loading any &lt;/SPAN&gt;&lt;SPAN class=""&gt;HSE application firmware.&lt;/SPAN&gt;&lt;/LI&gt;&lt;LI&gt;&lt;SPAN class=""&gt;The &lt;/SPAN&gt;&lt;SPAN class=""&gt;same configuration works &lt;/SPAN&gt;&lt;SPAN class=""&gt;correctly in single-core &lt;/SPAN&gt;&lt;SPAN class=""&gt;(FIRC_DIV_SEL = 2 / 3MHz).&lt;/SPAN&gt;&lt;/LI&gt;&lt;LI&gt;&lt;SPAN class=""&gt;Tool &lt;/SPAN&gt;&lt;SPAN class=""&gt;environment: MCAL RTD 3.0.0, EB &lt;/SPAN&gt;&lt;SPAN class=""&gt;Tresos 27.1.0.&lt;/SPAN&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;/DIV&gt;&lt;DIV class=""&gt;&lt;P class=""&gt;&lt;SPAN class=""&gt;Could you &lt;/SPAN&gt;&lt;SPAN class=""&gt;help me understand the following:&lt;/SPAN&gt;&lt;/P&gt;&lt;/DIV&gt;&lt;DIV class=""&gt;&lt;OL&gt;&lt;LI&gt;&lt;SPAN class=""&gt;What controls the APP_CORE_ACC&lt;/SPAN&gt;&lt;SPAN class=""&gt; bit in CONFIG_REG_GPR&lt;/SPAN&gt;&lt;SPAN class=""&gt;? Under what &lt;/SPAN&gt;&lt;SPAN class=""&gt;conditions does the SBAF grant &lt;/SPAN&gt;&lt;SPAN class=""&gt;application-core write access to FIRC_DIV_SEL&lt;/SPAN&gt;&lt;SPAN class=""&gt;?&lt;/SPAN&gt;&lt;/LI&gt;&lt;LI&gt;&lt;SPAN class=""&gt;Why would this &lt;/SPAN&gt;&lt;SPAN class=""&gt;bit be set correctly in &lt;/SPAN&gt;&lt;SPAN class=""&gt;single-core but NOT be set (at &lt;/SPAN&gt;&lt;SPAN class=""&gt;full speed) in a multicore &lt;/SPAN&gt;&lt;SPAN class=""&gt;configuration? Does bringing up CM7_1 &lt;/SPAN&gt;&lt;SPAN class=""&gt;or adding the multicore boot &lt;/SPAN&gt;&lt;SPAN class=""&gt;flow change when/whether the &lt;/SPAN&gt;&lt;SPAN class=""&gt;SBAF grants this access?&lt;/SPAN&gt;&lt;/LI&gt;&lt;LI&gt;&lt;SPAN class=""&gt;Since the block executes &lt;/SPAN&gt;&lt;SPAN class=""&gt;correctly under the debugger &lt;/SPAN&gt;&lt;SPAN class=""&gt;but not at full speed, &lt;/SPAN&gt;&lt;SPAN class=""&gt;this strongly suggests a &lt;/SPAN&gt;&lt;SPAN class=""&gt;timing/ordering issue between the SBAF &lt;/SPAN&gt;&lt;SPAN class=""&gt;granting write access and Core 0 &lt;/SPAN&gt;&lt;SPAN class=""&gt;calling Mcu_InitClock. What is &lt;/SPAN&gt;&lt;SPAN class=""&gt;the recommended way to &lt;/SPAN&gt;&lt;SPAN class=""&gt;ensure the SBAF has granted APP_CORE_ACC = APP_CAN_WRITE&lt;/SPAN&gt;&lt;SPAN class=""&gt; before &lt;/SPAN&gt;&lt;SPAN class=""&gt;Core 0 performs the clock &lt;/SPAN&gt;&lt;SPAN class=""&gt;initialization?&lt;/SPAN&gt;&lt;/LI&gt;&lt;LI&gt;&lt;SPAN class=""&gt;Is there a specific &lt;/SPAN&gt;&lt;SPAN class=""&gt;boot configuration (IVT, &lt;/SPAN&gt;&lt;SPAN class=""&gt;lifecycle, or SBAF-related &lt;/SPAN&gt;&lt;SPAN class=""&gt;setting) that determines whether &lt;/SPAN&gt;&lt;SPAN class=""&gt;the application core is &lt;/SPAN&gt;&lt;SPAN class=""&gt;granted this access in a &lt;/SPAN&gt;&lt;SPAN class=""&gt;multicore setup?&lt;/SPAN&gt;&lt;/LI&gt;&lt;/OL&gt;&lt;/DIV&gt;&lt;DIV class=""&gt;&lt;P class=""&gt;&lt;SPAN class=""&gt;Thank you &lt;/SPAN&gt;&lt;SPAN class=""&gt;for your support. I look &lt;/SPAN&gt;&lt;SPAN class=""&gt;forward to your guidance.&lt;/SPAN&gt;&lt;/P&gt;&lt;/DIV&gt;&lt;DIV class=""&gt;&lt;P class=""&gt;&lt;SPAN class=""&gt;B&lt;/SPAN&gt;&lt;SPAN class=""&gt;est regards,&lt;/SPAN&gt;&lt;/P&gt;&lt;/DIV&gt;</description>
    <pubDate>Fri, 03 Jul 2026 00:13:43 GMT</pubDate>
    <dc:creator>dpsdprtmvl</dc:creator>
    <dc:date>2026-07-03T00:13:43Z</dc:date>
    <item>
      <title>S32K328 – FIRC Clock Divider (DIV16) Not Applied When Multicore Is Enabled</title>
      <link>https://community.nxp.com/t5/S32K/S32K328-FIRC-Clock-Divider-DIV16-Not-Applied-When-Multicore-Is/m-p/2389772#M59641</link>
      <description>&lt;P class=""&gt;Hello NXP Technical Support Team,&lt;/P&gt;&lt;P class=""&gt;I have a question regarding the FIRC clock configuration on the S32K328.&lt;/P&gt;&lt;P class=""&gt;I configured the FIRC clock source for the STM2 module to 3MHz (DIV 16) in a single-core setup. In the single-core configuration, I confirmed that the FIRC clock source is correctly output at 3MHz.&lt;/P&gt;&lt;P class=""&gt;However, once I enable multicore, the FIRC clock source is output at 48MHz instead of 3MHz, even though the divider is still set to 16.&lt;/P&gt;&lt;P class=""&gt;In my current architecture, MCU Init and Set Mode can only be executed on Core 0. My question is whether the MCU clock can also be accessed (or reconfigured) from Core 1, and whether this could be the cause of the issue.&lt;/P&gt;&lt;P class=""&gt;&lt;STRONG&gt;Additional context on my setup:&lt;/STRONG&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;I am working in an AUTOSAR environment and have added the RM (Resource Manager) module for multicore support.&lt;/LI&gt;&lt;LI&gt;Domain0 master: Core 0, Domain1 master: Core 1. All memory and peripheral access permissions have been granted for each domain.&lt;/LI&gt;&lt;/UL&gt;&lt;P class=""&gt;&lt;STRONG&gt;Tool environment:&lt;/STRONG&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;MCAL RTD 3.0.0&lt;/LI&gt;&lt;LI&gt;EB Tresos 27.1.0&lt;/LI&gt;&lt;/UL&gt;&lt;P class=""&gt;&lt;STRONG&gt;Findings from my own analysis:&lt;/STRONG&gt;&lt;BR /&gt;When reading the FIRC_DIV_SEL field in the CONFIG_REG_GPR register at runtime, the value is 3, which corresponds to 48MHz according to the driver code (DividerValue mapping: 48MHz→3, 24MHz→1, 3MHz→2). I also noticed that the divider write path in the clock driver includes an APP_CORE_ACC permission check and a wait for the Secure BAF (CORE2) to enter WFI (by polling PRTN0_CORE2_STAT). I suspect the divider write may be skipped in the multicore configuration.&lt;/P&gt;&lt;P class=""&gt;&lt;STRONG&gt;Could you please advise on the following:&lt;/STRONG&gt;&lt;/P&gt;&lt;OL&gt;&lt;LI&gt;Why the FIRC divider setting (DIV 16) is not applied when multicore is enabled, resulting in 48MHz output instead of 3MHz?&lt;/LI&gt;&lt;LI&gt;Whether accessing or reconfiguring the MCU clock from Core 1 is supported or required in this scenario.&lt;/LI&gt;&lt;LI&gt;Whether the divider write could be skipped due to the APP_CORE_ACC permission check or the Secure BAF WFI timeout in the multicore configuration, and how to ensure the divider is correctly applied.&lt;/LI&gt;&lt;/OL&gt;&lt;P class=""&gt;Thank you for your support. I look forward to your response.&lt;/P&gt;&lt;P class=""&gt;Best regards,&lt;BR /&gt;&lt;BR /&gt;&lt;LI-PRODUCT title="AWS-LIBRARIES-S32K3" id="AWS-LIBRARIES-S32K3"&gt;&lt;/LI-PRODUCT&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 02 Jul 2026 12:36:11 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S32K/S32K328-FIRC-Clock-Divider-DIV16-Not-Applied-When-Multicore-Is/m-p/2389772#M59641</guid>
      <dc:creator>dpsdprtmvl</dc:creator>
      <dc:date>2026-07-02T12:36:11Z</dc:date>
    </item>
    <item>
      <title>Re: S32K328 – FIRC Clock Divider (DIV16) Not Applied When Multicore Is Enabled</title>
      <link>https://community.nxp.com/t5/S32K/S32K328-FIRC-Clock-Divider-DIV16-Not-Applied-When-Multicore-Is/m-p/2389874#M59647</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.nxp.com/t5/user/viewprofilepage/user-id/249123"&gt;@dpsdprtmvl&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;First, the software version being used is several releases behind the current version, so I would recommend migrating to the latest software release.&lt;/P&gt;
&lt;P&gt;Regarding FIRC_DIV_SEL, I performed a simple test using the IPCF_Example_S32K358 from S32K3 IPCF v4.3.0 on an S32K3X8EVB-Q289 board. For this test, I modified the IRCOSC configuration structure (Clock_Ip_IrcoscConfigurations_0), changing the IRCOSC range from CLOCK_IP_SUPPORTS_48MHZ_FREQUENCY to CLOCK_IP_SUPPORTS_3MHZ_FREQUENCY.&lt;/P&gt;
&lt;P&gt;After running the application and allowing the ping-pong communication between the cores to complete, I verified that CONFIG_REG_GPR[FIRC_DIV_SEL] was correctly configured to the expected value (10b), as shown in the image below.&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="VaneB_0-1783015826914.png" style="width: 400px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/391123iF076C799F84EBF12/image-size/medium?v=v2&amp;amp;px=400" role="button" title="VaneB_0-1783015826914.png" alt="VaneB_0-1783015826914.png" /&gt;&lt;span class="lia-inline-image-caption" onclick="event.preventDefault();"&gt;VaneB_0-1783015826914.png&lt;/span&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;Could you provide more details on your implementation? How are you configuring FIRC_DIV_SEL? How are you initializing the second core? Are you calling the clock initialization on the other core as well?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;BR, VaneB&lt;/P&gt;</description>
      <pubDate>Thu, 02 Jul 2026 18:11:49 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S32K/S32K328-FIRC-Clock-Divider-DIV16-Not-Applied-When-Multicore-Is/m-p/2389874#M59647</guid>
      <dc:creator>VaneB</dc:creator>
      <dc:date>2026-07-02T18:11:49Z</dc:date>
    </item>
    <item>
      <title>Re: S32K328 – FIRC Clock Divider (DIV16) Not Applied When Multicore Is Enabled</title>
      <link>https://community.nxp.com/t5/S32K/S32K328-FIRC-Clock-Divider-DIV16-Not-Applied-When-Multicore-Is/m-p/2389988#M59650</link>
      <description>&lt;DIV class=""&gt;&lt;P class=""&gt;&lt;SPAN class=""&gt;Hello,&lt;/SPAN&gt;&lt;/P&gt;&lt;/DIV&gt;&lt;DIV class=""&gt;&lt;P class=""&gt;&lt;SPAN class=""&gt;Thank you &lt;/SPAN&gt;&lt;SPAN class=""&gt;for testing this on your side and for &lt;/SPAN&gt;&lt;SPAN class=""&gt;the detailed response.&lt;/SPAN&gt;&lt;/P&gt;&lt;/DIV&gt;&lt;DIV class=""&gt;&lt;P class=""&gt;&lt;SPAN class=""&gt;To answer your &lt;/SPAN&gt;&lt;SPAN class=""&gt;questions about my implementation:&lt;/SPAN&gt;&lt;/P&gt;&lt;/DIV&gt;&lt;DIV class=""&gt;&lt;P class=""&gt;&lt;STRONG&gt;&lt;SPAN class=""&gt;1. How I configure FIRC_DIV_SEL:&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;BR /&gt;&lt;SPAN class=""&gt;In &lt;/SPAN&gt;&lt;SPAN class=""&gt;my Clock_Ip_IrcoscConfigurations_0 &lt;/SPAN&gt;&lt;SPAN class=""&gt;structure, the FIRC clock is configured &lt;/SPAN&gt;&lt;SPAN class=""&gt;with the IRCOSC range set to CLOCK_IP_SUPPORTS_3MHZ_FREQUENCY&lt;/SPAN&gt;&lt;SPAN class=""&gt;. So &lt;/SPAN&gt;&lt;SPAN class=""&gt;the intended configuration is 3MHz, the &lt;/SPAN&gt;&lt;SPAN class=""&gt;same as in your test.&lt;/SPAN&gt;&lt;/P&gt;&lt;/DIV&gt;&lt;DIV class=""&gt;&lt;P class=""&gt;&lt;STRONG&gt;&lt;SPAN class=""&gt;2. How I initialize the second core / whether I call clock initialization on the other core:&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;BR /&gt;&lt;SPAN class=""&gt;Mcu_InitClock &lt;/SPAN&gt;&lt;SPAN class=""&gt;and Mcu_SetMode are both &lt;/SPAN&gt;&lt;SPAN class=""&gt;called only on Core 0. On &lt;/SPAN&gt;&lt;SPAN class=""&gt;Core 1, I do not call any MCU &lt;/SPAN&gt;&lt;SPAN class=""&gt;clock-related API.&lt;/SPAN&gt;&lt;/P&gt;&lt;/DIV&gt;&lt;DIV class=""&gt;&lt;P class=""&gt;&lt;SPAN class=""&gt;That said, I will &lt;/SPAN&gt;&lt;SPAN class=""&gt;double-check this behavior through &lt;/SPAN&gt;&lt;SPAN class=""&gt;further debugging on my side to confirm &lt;/SPAN&gt;&lt;SPAN class=""&gt;that no clock reconfiguration is &lt;/SPAN&gt;&lt;SPAN class=""&gt;unintentionally happening on Core 1.&lt;/SPAN&gt;&lt;/P&gt;&lt;/DIV&gt;&lt;DIV class=""&gt;&lt;P class=""&gt;&lt;STRONG&gt;&lt;SPAN class=""&gt;Additional observations:&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;&lt;SPAN class=""&gt;In &lt;/SPAN&gt;&lt;SPAN class=""&gt;single-core, FIRC_DIV_SEL reads as 2 &lt;/SPAN&gt;&lt;SPAN class=""&gt;(3MHz) and works correctly.&lt;/SPAN&gt;&lt;/LI&gt;&lt;LI&gt;&lt;SPAN class=""&gt;In &lt;/SPAN&gt;&lt;SPAN class=""&gt;multicore, FIRC_DIV_SEL reads as 3 &lt;/SPAN&gt;&lt;SPAN class=""&gt;(48MHz), which results in an STM tick &lt;/SPAN&gt;&lt;SPAN class=""&gt;that is 16x faster than expected.&lt;/SPAN&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;/DIV&gt;&lt;DIV class=""&gt;&lt;P class=""&gt;&lt;SPAN class=""&gt;I &lt;/SPAN&gt;&lt;SPAN class=""&gt;will also evaluate migrating to the &lt;/SPAN&gt;&lt;SPAN class=""&gt;latest RTD release as you recommended.&lt;/SPAN&gt;&lt;/P&gt;&lt;/DIV&gt;&lt;DIV class=""&gt;&lt;P class=""&gt;&lt;SPAN class=""&gt;I will get back to you with the &lt;/SPAN&gt;&lt;SPAN class=""&gt;debugging results. In the meantime, if &lt;/SPAN&gt;&lt;SPAN class=""&gt;you have any suggestions on what could &lt;/SPAN&gt;&lt;SPAN class=""&gt;cause FIRC_DIV_SEL to end up as 3 &lt;/SPAN&gt;&lt;SPAN class=""&gt;(48MHz) even though clock &lt;/SPAN&gt;&lt;SPAN class=""&gt;initialization is performed only on &lt;/SPAN&gt;&lt;SPAN class=""&gt;Core 0 with the 3MHz configuration, I &lt;/SPAN&gt;&lt;SPAN class=""&gt;would appreciate your input.&lt;/SPAN&gt;&lt;/P&gt;&lt;/DIV&gt;&lt;DIV class=""&gt;&lt;P class=""&gt;&lt;SPAN class=""&gt;Best &lt;/SPAN&gt;&lt;SPAN class=""&gt;regards,&lt;/SPAN&gt;&lt;/P&gt;&lt;/DIV&gt;</description>
      <pubDate>Thu, 02 Jul 2026 23:07:09 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S32K/S32K328-FIRC-Clock-Divider-DIV16-Not-Applied-When-Multicore-Is/m-p/2389988#M59650</guid>
      <dc:creator>dpsdprtmvl</dc:creator>
      <dc:date>2026-07-02T23:07:09Z</dc:date>
    </item>
    <item>
      <title>Re: S32K328 – FIRC Clock Divider (DIV16) Not Applied When Multicore Is Enabled</title>
      <link>https://community.nxp.com/t5/S32K/S32K328-FIRC-Clock-Divider-DIV16-Not-Applied-When-Multicore-Is/m-p/2390015#M59652</link>
      <description>&lt;DIV class=""&gt;&lt;P class=""&gt;&lt;SPAN class=""&gt;Hello,&lt;/SPAN&gt;&lt;/P&gt;&lt;/DIV&gt;&lt;DIV class=""&gt;&lt;P class=""&gt;&lt;SPAN class=""&gt;I have found &lt;/SPAN&gt;&lt;SPAN class=""&gt;the root cause &lt;/SPAN&gt;&lt;SPAN class=""&gt;on my side. &lt;/SPAN&gt;&lt;SPAN class=""&gt;Please see the relevant driver function &lt;/SPAN&gt;&lt;SPAN class=""&gt;below (Clock_Ip_SetFircDivSelHSEb in \Mcu_TS_T40D34M30I0R0\src\Clock_Ip_IntOsc.c&amp;nbsp;&lt;LI-EMOJI id="lia_disappointed-face" title=":disappointed_face:"&gt;&lt;/LI-EMOJI&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/DIV&gt;&lt;DIV class=""&gt;&lt;DIV class=""&gt;&lt;DIV class=""&gt;c&lt;/DIV&gt;&lt;DIV class=""&gt;&lt;PRE&gt;&lt;SPAN&gt;&lt;SPAN class=""&gt;/* Application can write this divider */&lt;/SPAN&gt;
&lt;/SPAN&gt;&lt;SPAN&gt;&lt;SPAN class=""&gt;if&lt;/SPAN&gt; &lt;SPAN class=""&gt;(&lt;/SPAN&gt; &lt;SPAN class=""&gt;(&lt;/SPAN&gt;&lt;SPAN class=""&gt;(&lt;/SPAN&gt;IP_CONFIGURATION_GPR&lt;SPAN class=""&gt;-&amp;gt;&lt;/SPAN&gt;CONFIG_REG_GPR &lt;SPAN class=""&gt;&amp;amp;&lt;/SPAN&gt; CONFIGURATION_GPR_CONFIG_REG_GPR_APP_CORE_ACC_MASK&lt;SPAN class=""&gt;)&lt;/SPAN&gt;
&lt;/SPAN&gt;&lt;SPAN&gt;      &lt;SPAN class=""&gt;&amp;gt;&amp;gt;&lt;/SPAN&gt; CONFIGURATION_GPR_CONFIG_REG_GPR_APP_CORE_ACC_SHIFT&lt;SPAN class=""&gt;)&lt;/SPAN&gt; &lt;SPAN class=""&gt;==&lt;/SPAN&gt; CLOCK_IP_APP_CAN_WRITE&lt;SPAN class=""&gt;)&lt;/SPAN&gt;
&lt;/SPAN&gt;&lt;SPAN&gt;&lt;SPAN class=""&gt;{&lt;/SPAN&gt;
&lt;/SPAN&gt;&lt;SPAN&gt;    &lt;SPAN class=""&gt;.&lt;/SPAN&gt;&lt;SPAN class=""&gt;.&lt;/SPAN&gt;&lt;SPAN class=""&gt;.&lt;/SPAN&gt;
&lt;/SPAN&gt;&lt;SPAN&gt;    &lt;SPAN class=""&gt;/* FIRC_DIV_SEL write happens here */&lt;/SPAN&gt;
&lt;/SPAN&gt;&lt;SPAN&gt;&lt;SPAN class=""&gt;}&lt;/SPAN&gt;
&lt;/SPAN&gt;&lt;SPAN&gt;&lt;SPAN class=""&gt;else&lt;/SPAN&gt;
&lt;/SPAN&gt;&lt;SPAN&gt;&lt;SPAN class=""&gt;{&lt;/SPAN&gt;
&lt;/SPAN&gt;&lt;SPAN&gt;    &lt;SPAN class=""&gt;/* HSE firmware doesn't allow to write FIRC post divider. */&lt;/SPAN&gt;
&lt;/SPAN&gt;&lt;SPAN&gt;    &lt;SPAN class=""&gt;Clock_Ip_ReportClockErrors&lt;/SPAN&gt;&lt;SPAN class=""&gt;(&lt;/SPAN&gt;CLOCK_IP_REPORT_WRITE_PROTECTION_ERROR&lt;SPAN class=""&gt;,&lt;/SPAN&gt; Config&lt;SPAN class=""&gt;-&amp;gt;&lt;/SPAN&gt;Name&lt;SPAN class=""&gt;)&lt;/SPAN&gt;&lt;SPAN class=""&gt;;&lt;/SPAN&gt;
&lt;/SPAN&gt;&lt;SPAN&gt;&lt;SPAN class=""&gt;}&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/PRE&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;DIV class=""&gt;&lt;P class=""&gt;&lt;SPAN class=""&gt;&lt;BR /&gt;The problem is &lt;/SPAN&gt;&lt;SPAN class=""&gt;that in my multicore configuration, &lt;/SPAN&gt;&lt;STRONG&gt;&lt;SPAN class=""&gt;the code never enters this if (APP_CORE_ACC == CLOCK_IP_APP_CAN_WRITE) block when running at full speed.&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;SPAN class=""&gt; I &lt;/SPAN&gt;&lt;SPAN class=""&gt;verified this by placing a while(1) &lt;/SPAN&gt;&lt;SPAN class=""&gt;inside the block — it is never &lt;/SPAN&gt;&lt;SPAN class=""&gt;reached. As a result, the &lt;/SPAN&gt;&lt;SPAN class=""&gt;FIRC_DIV_SEL write is skipped and the &lt;/SPAN&gt;&lt;SPAN class=""&gt;register stays at its reset value 3 &lt;/SPAN&gt;&lt;SPAN class=""&gt;(48MHz) instead of the configured 2 &lt;/SPAN&gt;&lt;SPAN class=""&gt;(3MHz). This makes my STM tick run 16x &lt;/SPAN&gt;&lt;SPAN class=""&gt;faster than intended.&lt;/SPAN&gt;&lt;/P&gt;&lt;/DIV&gt;&lt;DIV class=""&gt;&lt;P class=""&gt;&lt;SPAN class=""&gt;However, &lt;/SPAN&gt;&lt;STRONG&gt;&lt;SPAN class=""&gt;when I run in debug mode (stepping / with breakpoints), the same block executes correctly&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;SPAN class=""&gt; and FIRC_DIV_SEL &lt;/SPAN&gt;&lt;SPAN class=""&gt;is properly set to 2 (3MHz). &lt;/SPAN&gt;&lt;SPAN class=""&gt;This difference between &lt;/SPAN&gt;&lt;SPAN class=""&gt;full-speed and debug execution is the &lt;/SPAN&gt;&lt;SPAN class=""&gt;key symptom.&lt;/SPAN&gt;&lt;/P&gt;&lt;/DIV&gt;&lt;DIV class=""&gt;&lt;P class=""&gt;&lt;SPAN class=""&gt;So the APP_CORE_ACC&lt;/SPAN&gt;&lt;SPAN class=""&gt; bit in CONFIG_REG_GPR &lt;/SPAN&gt;&lt;SPAN class=""&gt;is not set to CLOCK_IP_APP_CAN_WRITE&lt;/SPAN&gt;&lt;SPAN class=""&gt; at the moment Mcu_InitClock&lt;/SPAN&gt;&lt;SPAN class=""&gt; reads it during a &lt;/SPAN&gt;&lt;SPAN class=""&gt;full-speed multicore boot, but it does &lt;/SPAN&gt;&lt;SPAN class=""&gt;become writable when I slow &lt;/SPAN&gt;&lt;SPAN class=""&gt;execution down with the debugger.&lt;/SPAN&gt;&lt;/P&gt;&lt;/DIV&gt;&lt;DIV class=""&gt;&lt;P class=""&gt;&lt;SPAN class=""&gt;A&lt;/SPAN&gt;&lt;SPAN class=""&gt;dditional context on my setup:&lt;/SPAN&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;&lt;SPAN class=""&gt;Mcu_InitClock&lt;/SPAN&gt;&lt;SPAN class=""&gt; and Mcu_SetMode are &lt;/SPAN&gt;&lt;SPAN class=""&gt;called only on Core 0. Core 1 &lt;/SPAN&gt;&lt;SPAN class=""&gt;(CM7_1) does not call any MCU &lt;/SPAN&gt;&lt;SPAN class=""&gt;clock API.&lt;/SPAN&gt;&lt;/LI&gt;&lt;LI&gt;&lt;SPAN class=""&gt;Core 1 is brought &lt;/SPAN&gt;&lt;SPAN class=""&gt;up from Core 0 via MC_ME &lt;/SPAN&gt;&lt;SPAN class=""&gt;(PRTN0_CORE1_*).&lt;/SPAN&gt;&lt;/LI&gt;&lt;LI&gt;&lt;SPAN class=""&gt;I am not loading any &lt;/SPAN&gt;&lt;SPAN class=""&gt;HSE application firmware.&lt;/SPAN&gt;&lt;/LI&gt;&lt;LI&gt;&lt;SPAN class=""&gt;The &lt;/SPAN&gt;&lt;SPAN class=""&gt;same configuration works &lt;/SPAN&gt;&lt;SPAN class=""&gt;correctly in single-core &lt;/SPAN&gt;&lt;SPAN class=""&gt;(FIRC_DIV_SEL = 2 / 3MHz).&lt;/SPAN&gt;&lt;/LI&gt;&lt;LI&gt;&lt;SPAN class=""&gt;Tool &lt;/SPAN&gt;&lt;SPAN class=""&gt;environment: MCAL RTD 3.0.0, EB &lt;/SPAN&gt;&lt;SPAN class=""&gt;Tresos 27.1.0.&lt;/SPAN&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;/DIV&gt;&lt;DIV class=""&gt;&lt;P class=""&gt;&lt;SPAN class=""&gt;Could you &lt;/SPAN&gt;&lt;SPAN class=""&gt;help me understand the following:&lt;/SPAN&gt;&lt;/P&gt;&lt;/DIV&gt;&lt;DIV class=""&gt;&lt;OL&gt;&lt;LI&gt;&lt;SPAN class=""&gt;What controls the APP_CORE_ACC&lt;/SPAN&gt;&lt;SPAN class=""&gt; bit in CONFIG_REG_GPR&lt;/SPAN&gt;&lt;SPAN class=""&gt;? Under what &lt;/SPAN&gt;&lt;SPAN class=""&gt;conditions does the SBAF grant &lt;/SPAN&gt;&lt;SPAN class=""&gt;application-core write access to FIRC_DIV_SEL&lt;/SPAN&gt;&lt;SPAN class=""&gt;?&lt;/SPAN&gt;&lt;/LI&gt;&lt;LI&gt;&lt;SPAN class=""&gt;Why would this &lt;/SPAN&gt;&lt;SPAN class=""&gt;bit be set correctly in &lt;/SPAN&gt;&lt;SPAN class=""&gt;single-core but NOT be set (at &lt;/SPAN&gt;&lt;SPAN class=""&gt;full speed) in a multicore &lt;/SPAN&gt;&lt;SPAN class=""&gt;configuration? Does bringing up CM7_1 &lt;/SPAN&gt;&lt;SPAN class=""&gt;or adding the multicore boot &lt;/SPAN&gt;&lt;SPAN class=""&gt;flow change when/whether the &lt;/SPAN&gt;&lt;SPAN class=""&gt;SBAF grants this access?&lt;/SPAN&gt;&lt;/LI&gt;&lt;LI&gt;&lt;SPAN class=""&gt;Since the block executes &lt;/SPAN&gt;&lt;SPAN class=""&gt;correctly under the debugger &lt;/SPAN&gt;&lt;SPAN class=""&gt;but not at full speed, &lt;/SPAN&gt;&lt;SPAN class=""&gt;this strongly suggests a &lt;/SPAN&gt;&lt;SPAN class=""&gt;timing/ordering issue between the SBAF &lt;/SPAN&gt;&lt;SPAN class=""&gt;granting write access and Core 0 &lt;/SPAN&gt;&lt;SPAN class=""&gt;calling Mcu_InitClock. What is &lt;/SPAN&gt;&lt;SPAN class=""&gt;the recommended way to &lt;/SPAN&gt;&lt;SPAN class=""&gt;ensure the SBAF has granted APP_CORE_ACC = APP_CAN_WRITE&lt;/SPAN&gt;&lt;SPAN class=""&gt; before &lt;/SPAN&gt;&lt;SPAN class=""&gt;Core 0 performs the clock &lt;/SPAN&gt;&lt;SPAN class=""&gt;initialization?&lt;/SPAN&gt;&lt;/LI&gt;&lt;LI&gt;&lt;SPAN class=""&gt;Is there a specific &lt;/SPAN&gt;&lt;SPAN class=""&gt;boot configuration (IVT, &lt;/SPAN&gt;&lt;SPAN class=""&gt;lifecycle, or SBAF-related &lt;/SPAN&gt;&lt;SPAN class=""&gt;setting) that determines whether &lt;/SPAN&gt;&lt;SPAN class=""&gt;the application core is &lt;/SPAN&gt;&lt;SPAN class=""&gt;granted this access in a &lt;/SPAN&gt;&lt;SPAN class=""&gt;multicore setup?&lt;/SPAN&gt;&lt;/LI&gt;&lt;/OL&gt;&lt;/DIV&gt;&lt;DIV class=""&gt;&lt;P class=""&gt;&lt;SPAN class=""&gt;Thank you &lt;/SPAN&gt;&lt;SPAN class=""&gt;for your support. I look &lt;/SPAN&gt;&lt;SPAN class=""&gt;forward to your guidance.&lt;/SPAN&gt;&lt;/P&gt;&lt;/DIV&gt;&lt;DIV class=""&gt;&lt;P class=""&gt;&lt;SPAN class=""&gt;B&lt;/SPAN&gt;&lt;SPAN class=""&gt;est regards,&lt;/SPAN&gt;&lt;/P&gt;&lt;/DIV&gt;</description>
      <pubDate>Fri, 03 Jul 2026 00:13:43 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S32K/S32K328-FIRC-Clock-Divider-DIV16-Not-Applied-When-Multicore-Is/m-p/2390015#M59652</guid>
      <dc:creator>dpsdprtmvl</dc:creator>
      <dc:date>2026-07-03T00:13:43Z</dc:date>
    </item>
  </channel>
</rss>

