<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>S32KのトピックRe: Starting Core2 from Core0 on a S32k358 Multicore project</title>
    <link>https://community.nxp.com/t5/S32K/Starting-Core2-from-Core0-on-a-S32k358-Multicore-project/m-p/1943533#M40306</link>
    <description>&lt;P&gt;Hi Daniel, thank you for that extra example.&lt;/P&gt;&lt;P&gt;Looking at the differences between my Core0 startup and the one you provided, my wake_up_core() now looks like this&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;static void prvSysWakeCore( portUnsignedBaseType uxCoreId, portUInt32Type ulBootAddress )
{
    Power_Ip_Init(&amp;amp;Power_Ip_HwIPsConfigPB);

#if ( defined( S32K358 ) || defined( S32K388 ) )
    if( uxCoreId == 2 )
    {
        IP_MC_ME-&amp;gt;PRTN0_CORE4_ADDR = ulBootAddress;
        IP_MC_ME-&amp;gt;PRTN0_CORE4_PCONF = 1;
        IP_MC_ME-&amp;gt;PRTN0_CORE4_PUPD = 1;

        IP_MC_ME-&amp;gt;CTL_KEY = 0x5AF0;
        IP_MC_ME-&amp;gt;CTL_KEY = 0xA50F;

        while( 1U == IP_MC_ME-&amp;gt;PRTN0_CORE4_PUPD ) { };
        while( 0U == ( IP_MC_ME-&amp;gt;PRTN0_CORE4_STAT &amp;amp; MC_ME_PRTN0_CORE4_STAT_CCS_MASK ) ) { };
    }
#endif /* #if ( defined( S32K358 ) || defined( S32K388 ) ) */
}&lt;/LI-CODE&gt;&lt;P&gt;adding the POWER module and amending the second while loop seemed to do the trick - now both my cores are running nicely.&lt;/P&gt;&lt;P&gt;I also removed the .boot_header section from my Core2 linker script, one or both of these changes got it working.&lt;/P&gt;&lt;P&gt;Many thanks&lt;/P&gt;</description>
    <pubDate>Thu, 29 Aug 2024 14:25:22 GMT</pubDate>
    <dc:creator>jonnyWHIS</dc:creator>
    <dc:date>2024-08-29T14:25:22Z</dc:date>
    <item>
      <title>Starting Core2 from Core0 on a S32k358 Multicore project</title>
      <link>https://community.nxp.com/t5/S32K/Starting-Core2-from-Core0-on-a-S32k358-Multicore-project/m-p/1942328#M40236</link>
      <description>&lt;P&gt;Hi there,&lt;/P&gt;&lt;P&gt;I'm attempting to convert my current S32 DS project (targeting a S32K3x8EVB board) into a multicore project. At the moment, all i need is the two cores running side-by-side without any particular interaction.&amp;nbsp;&lt;/P&gt;&lt;P&gt;A lot of what i've set-up so far is based off a Pi - Monte Carlo multicore project available as a demo on S32 DS. In that demo, Core0 does the standard clock configuration and then attempts to wake up Core2 - via writing to a series of Register Addresses - see below. (It also configures a core-to-core interrupt, but i have omitted that from my project as i don't need it as of now. )&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;void sys_wake_core(uint8_t core, uint32_t boot_add)
{
	if (core == 1)
	{
		MC_ME.PRTN0_CORE1_ADDR.R = boot_add; /* PRTN0_CORE1_ADDR */
		MC_ME.PRTN0_CORE1_PCONF.R = 1; /* PRTN0_CORE1_PCONF */
		MC_ME.PRTN0_CORE1_PUPD.R = 1; /* PRTN0_CORE1_PUPD */

		MC_ME.CTL_KEY.R = 0x5AF0; /* CTL_KEY */
		MC_ME.CTL_KEY.R = 0xA50F; /* CTL_KEY */

		while(MC_ME.PRTN0_CORE1_PUPD.R &amp;amp; 0x1);
		while(MC_ME.PRTN0_CORE1_STAT.R &amp;amp; 0x1);

	}
#if (defined(S32K358) || defined(S32K388))
	else if (core == 2)
	{
		MC_ME.PRTN0_CORE4_ADDR.R = boot_add;
		MC_ME.PRTN0_CORE4_PCONF.R = 1;
		MC_ME.PRTN0_CORE4_PUPD.R = 1;

		MC_ME.CTL_KEY.R = 0x5AF0;
		MC_ME.CTL_KEY.R = 0xA50F;

		while(!(MC_ME.PRTN0_CORE4_PUPD.R &amp;amp; 0x01));
		while(!(MC_ME.PRTN0_CORE4_STAT.R &amp;amp; 0x01));
	}
#endif
...
}&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Here, the address of Core2's vector table (0x00800000) is passed in and the system waits until Core2 is booted (i'm assuming?). Core2's main() doesn't perform any system setup, it just starts running application code. I have built and run this demo no problem, but when i try and replicate it for my own project Core2 isn't booted properly.&lt;/P&gt;&lt;P&gt;If you refer to&amp;nbsp;&lt;EM&gt;sys_wake_core_func.png&lt;/EM&gt;, you can see my own sys_wake_core() func, where i'm passing in the correct VTOR address. (The registers are name IP_MC_ME not MC_ME, but the value is still&amp;nbsp;402D_C000h as specified in the ref. manual) However, as&amp;nbsp;&lt;EM&gt;callstack_on_startup.png&lt;/EM&gt; shows, Core2's Reset_Handler() seems to be taking it to Core0's vector table and gets stuck there. The below is taken from the map file.&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;0x00400800                __ENTRY_VTABLE = __INIT_INTERRUPT_START
0x00400800                __CORE0_VTOR = __INIT_INTERRUPT_START
0x00600000                __CORE1_VTOR = ORIGIN (int_flash_c1)
0x00800000                __CORE2_VTOR = ORIGIN (int_flash_c2)&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Am i right in thinking Core2 should be resetting to 0x0080'0000 as the map file suggests? If so how can i correct it? And are there any other steps to multicore initialisation I'm missing?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Any help is greatly appreciated&lt;/P&gt;</description>
      <pubDate>Wed, 28 Aug 2024 13:48:00 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S32K/Starting-Core2-from-Core0-on-a-S32k358-Multicore-project/m-p/1942328#M40236</guid>
      <dc:creator>jonnyWHIS</dc:creator>
      <dc:date>2024-08-28T13:48:00Z</dc:date>
    </item>
    <item>
      <title>Re: Starting Core2 from Core0 on a S32k358 Multicore project</title>
      <link>https://community.nxp.com/t5/S32K/Starting-Core2-from-Core0-on-a-S32k358-Multicore-project/m-p/1943387#M40295</link>
      <description>&lt;P&gt;Hi &lt;a href="https://community.nxp.com/t5/user/viewprofilepage/user-id/213014"&gt;@jonnyWHIS&lt;/a&gt;,&lt;/P&gt;
&lt;P&gt;Here is a very simple example:&lt;/P&gt;
&lt;P&gt;&lt;A href="https://community.nxp.com/t5/S32K-Knowledge-Base/S32K358-Multicore-Start-CM7-2-from-CM7-0/ta-p/1923889" target="_blank"&gt;https://community.nxp.com/t5/S32K-Knowledge-Base/S32K358-Multicore-Start-CM7-2-from-CM7-0/ta-p/1923889&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;Can you compare it?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Regards,&lt;/P&gt;
&lt;P&gt;Daniel&lt;/P&gt;</description>
      <pubDate>Thu, 29 Aug 2024 10:36:00 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S32K/Starting-Core2-from-Core0-on-a-S32k358-Multicore-project/m-p/1943387#M40295</guid>
      <dc:creator>danielmartynek</dc:creator>
      <dc:date>2024-08-29T10:36:00Z</dc:date>
    </item>
    <item>
      <title>Re: Starting Core2 from Core0 on a S32k358 Multicore project</title>
      <link>https://community.nxp.com/t5/S32K/Starting-Core2-from-Core0-on-a-S32k358-Multicore-project/m-p/1943533#M40306</link>
      <description>&lt;P&gt;Hi Daniel, thank you for that extra example.&lt;/P&gt;&lt;P&gt;Looking at the differences between my Core0 startup and the one you provided, my wake_up_core() now looks like this&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;static void prvSysWakeCore( portUnsignedBaseType uxCoreId, portUInt32Type ulBootAddress )
{
    Power_Ip_Init(&amp;amp;Power_Ip_HwIPsConfigPB);

#if ( defined( S32K358 ) || defined( S32K388 ) )
    if( uxCoreId == 2 )
    {
        IP_MC_ME-&amp;gt;PRTN0_CORE4_ADDR = ulBootAddress;
        IP_MC_ME-&amp;gt;PRTN0_CORE4_PCONF = 1;
        IP_MC_ME-&amp;gt;PRTN0_CORE4_PUPD = 1;

        IP_MC_ME-&amp;gt;CTL_KEY = 0x5AF0;
        IP_MC_ME-&amp;gt;CTL_KEY = 0xA50F;

        while( 1U == IP_MC_ME-&amp;gt;PRTN0_CORE4_PUPD ) { };
        while( 0U == ( IP_MC_ME-&amp;gt;PRTN0_CORE4_STAT &amp;amp; MC_ME_PRTN0_CORE4_STAT_CCS_MASK ) ) { };
    }
#endif /* #if ( defined( S32K358 ) || defined( S32K388 ) ) */
}&lt;/LI-CODE&gt;&lt;P&gt;adding the POWER module and amending the second while loop seemed to do the trick - now both my cores are running nicely.&lt;/P&gt;&lt;P&gt;I also removed the .boot_header section from my Core2 linker script, one or both of these changes got it working.&lt;/P&gt;&lt;P&gt;Many thanks&lt;/P&gt;</description>
      <pubDate>Thu, 29 Aug 2024 14:25:22 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S32K/Starting-Core2-from-Core0-on-a-S32k358-Multicore-project/m-p/1943533#M40306</guid>
      <dc:creator>jonnyWHIS</dc:creator>
      <dc:date>2024-08-29T14:25:22Z</dc:date>
    </item>
  </channel>
</rss>

