<?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: S32K148 Run to VLPS Problem</title>
    <link>https://community.nxp.com/t5/S32K/S32K148-Run-to-VLPS-Problem/m-p/1179810#M8723</link>
    <description>&lt;P&gt;Hi dianabatrlova：&lt;/P&gt;&lt;P&gt;thank you for your reply,it's my misunderstood,when mcu&amp;nbsp; wake up, the program&amp;nbsp; continue to run,&lt;/P&gt;&lt;P&gt;so &lt;SPAN&gt;I reconfigured Clock after POWER_SYS_SetMode(), &lt;/SPAN&gt;now it can wake up normally.&lt;/P&gt;</description>
    <pubDate>Mon, 09 Nov 2020 03:18:55 GMT</pubDate>
    <dc:creator>shijie_zheng</dc:creator>
    <dc:date>2020-11-09T03:18:55Z</dc:date>
    <item>
      <title>S32K148 Run to VLPS Problem</title>
      <link>https://community.nxp.com/t5/S32K/S32K148-Run-to-VLPS-Problem/m-p/1177786#M8685</link>
      <description>&lt;UL&gt;&lt;LI&gt;&lt;P class="src grammarSection highlight"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Dear TechSupporter:&lt;BR /&gt;I had a problem when I setting VLPS mode with S32K148(run freertos system,and use s32ds debug).&lt;/P&gt;&lt;P&gt;I have read AN5425.pdf, before trans to VLPS mode,set SCG,PMC,SMC register,then set an GPIO Interrput to wakeup from VLPS mode,&lt;BR /&gt;Without debug, I tried to trans to VLPS mode,then I use gpio interrupt to wakeup,but I found that interrupt execution, but the main() is not running again, I saved some screenshots when using PE in the debugging,&lt;/P&gt;&lt;P&gt;Was it something I missed?I'm not sure if actually trans to VLPS mode.&lt;/P&gt;&lt;/LI&gt;&lt;LI&gt;&lt;P&gt;Is there a way to check if mcu have entered VLPS mode?&lt;BR /&gt;If mcu already in VLPS mode ,after wake up,main() function will be call again?&lt;/P&gt;&lt;/LI&gt;&lt;LI&gt;&amp;nbsp;&lt;SPAN&gt;can you help me to analyze this question?&lt;/SPAN&gt;&lt;P class="src grammarSection highlight"&gt;&amp;nbsp;&lt;/P&gt;&lt;P class="src grammarSection highlight"&gt;&lt;FONT face="arial,helvetica,sans-serif" color="#001000"&gt;1:the clock configuration is as follows&lt;/FONT&gt;&lt;/P&gt;&lt;P class="src grammarSection highlight"&gt;&lt;FONT face="arial,helvetica,sans-serif" color="#001000"&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="clock.jpg" style="width: 758px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/129044i75146CD1341B72B8/image-size/large?v=v2&amp;amp;px=999" role="button" title="clock.jpg" alt="clock.jpg" /&gt;&lt;/span&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;/LI&gt;&lt;LI&gt;&lt;FONT face="arial,helvetica,sans-serif" color="#001000"&gt;I have run clock init in main() function:&lt;/FONT&gt;&lt;/LI&gt;&lt;LI&gt;&lt;FONT face="arial,helvetica,sans-serif" color="#001000"&gt;/* Initialize and configure clocks */&lt;BR /&gt;CLOCK_SYS_Init(g_clockManConfigsArr, CLOCK_MANAGER_CONFIG_CNT,g_clockManCallbacksArr, CLOCK_MANAGER_CALLBACK_CNT);&lt;BR /&gt;CLOCK_SYS_UpdateConfiguration(0U, CLOCK_MANAGER_POLICY_AGREEMENT);&lt;/FONT&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;FONT face="arial,helvetica,sans-serif" color="#001000"&gt;2:before transfer to VLPS, I have set &amp;nbsp;&lt;FONT color="#001000"&gt;register&lt;/FONT&gt;&amp;nbsp;&lt;FONT color="#001000"&gt;as follows:&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;uint32_t tempSIRC = SCG-&amp;gt;SIRCCSR;&lt;BR /&gt;uint32_t tempFIRC = SCG-&amp;gt;FIRCCSR;&lt;/P&gt;&lt;P&gt;INT_SYS_DisableIRQGlobal();&lt;BR /&gt;/*set wakeup gpio ptc9 interrupt enable*/&lt;BR /&gt;GPIO_Port_Function_Set(PORTC,PIN_INDEX_9,PIN_FUNCTION_ALT1);&lt;BR /&gt;GPIO_Port_Dir_Set(PTC,PIN_INDEX_9,DIR_INPUT);&lt;BR /&gt;INT_WakeUp_Set(PORTC,PIN_INDEX_9,PORT_INT_FALLING_EDGE);&lt;BR /&gt;INT_SYS_InstallHandler(PORTC_IRQn, &amp;amp;PORTC_IRQHandler, NULL);&lt;BR /&gt;INT_SYS_EnableIRQ(PORTC_IRQn);&lt;/P&gt;&lt;P&gt;INT_SYS_EnableIRQGlobal();&lt;/P&gt;&lt;P&gt;/* Disable Clock monitor for System Oscillator */&lt;BR /&gt;SCG-&amp;gt;SOSCCSR &amp;amp;= ~(SCG_SOSCCSR_SOSCCM_MASK);&lt;BR /&gt;SCG-&amp;gt;SOSCCSR &amp;amp;= ~(SCG_SOSCCSR_SOSCEN_MASK);&lt;BR /&gt;/* Disable Clock monitor for System PLL */&lt;BR /&gt;SCG-&amp;gt;SPLLCSR &amp;amp;= ~(SCG_SPLLCSR_SPLLCM_MASK);&lt;BR /&gt;SCG-&amp;gt;SPLLCSR &amp;amp;= ~(SCG_SPLLCSR_SPLLEN_MASK);&lt;BR /&gt;/* Disable Clock monitor for System FRIC */&lt;BR /&gt;SCG-&amp;gt;FIRCCSR |= SCG_FIRCCSR_FIRCREGOFF_MASK; /* Disable FIRC regulator */&lt;BR /&gt;SCG-&amp;gt;FIRCCSR &amp;amp;= ~SCG_FIRCCSR_FIRCEN_MASK; /* Disable FIRC clock */&lt;BR /&gt;/* Disable SIRC in VLPS */&lt;BR /&gt;tempSIRC &amp;amp;= ~(SCG_SIRCCSR_SIRCLPEN_MASK |SCG_SIRCCSR_SIRCSTEN_MASK);&lt;BR /&gt;/* Enable SIRC in VLPS */&lt;BR /&gt;tempSIRC |= SCG_SIRCCSR_SIRCLPEN_MASK |SCG_SIRCCSR_SIRCSTEN_MASK;&lt;BR /&gt;SCG-&amp;gt;SIRCCSR = tempSIRC;&lt;/P&gt;&lt;P&gt;/* Allow very low power modes*/&lt;BR /&gt;SMC-&amp;gt;PMPROT |= SMC_PMPROT_AVLP_MASK;&lt;BR /&gt;/* Enable Stop Modes in the Core */&lt;BR /&gt;S32_SCB-&amp;gt;SCR |= S32_SCB_SCR_SLEEPDEEP_MASK;&lt;BR /&gt;/* CLKBIASDIS=1: In VLPS mode, the bias currents and reference voltages*/&lt;BR /&gt;PMC-&amp;gt;REGSC |= PMC_REGSC_BIASEN_MASK;&lt;BR /&gt;/* Select VLPS Mode */&lt;BR /&gt;SMC-&amp;gt;PMCTRL = SMC_PMCTRL_STOPM(2);//0b10&lt;BR /&gt;if(1 == SMC-&amp;gt;PMSTAT)&lt;BR /&gt;{&lt;BR /&gt;__asm("DSB");&lt;BR /&gt;__asm("ISB");&lt;BR /&gt;/* Call WFI to enter DeepSleep mode */&lt;BR /&gt;__asm("WFI");&lt;BR /&gt;}&lt;/P&gt;&lt;P&gt;3:GPIO Interrput function as&amp;nbsp;&lt;FONT color="#001000"&gt;follows&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#001000"&gt;void PORTC_IRQHandler(void)&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#001000"&gt;{&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; uint32_t IRQflag = 0;&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; IRQflag = INT_Read_IRQ_Flag(PORTC);&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; /*PTC9:Falling Edge:Trigger*/&lt;BR /&gt;&amp;nbsp; &amp;nbsp; if((IRQflag&amp;amp;(1 &amp;lt;&amp;lt; 9)) != 0)&lt;BR /&gt;&amp;nbsp; &amp;nbsp; {&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; ;&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; }&lt;/P&gt;&lt;P&gt;}&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 04 Nov 2020 08:44:11 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S32K/S32K148-Run-to-VLPS-Problem/m-p/1177786#M8685</guid>
      <dc:creator>shijie_zheng</dc:creator>
      <dc:date>2020-11-04T08:44:11Z</dc:date>
    </item>
    <item>
      <title>Re: S32K148 Run to VLPS Problem</title>
      <link>https://community.nxp.com/t5/S32K/S32K148-Run-to-VLPS-Problem/m-p/1178693#M8705</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;EM&gt;&amp;gt;&amp;gt;Is there a way to check if mcu have entered VLPS mode?&lt;/EM&gt;&lt;/P&gt;
&lt;P&gt;You can verify VLPS entry by measuring current, please, refer to the DS rev 13. "Table 13. Power consumption"&lt;/P&gt;
&lt;P&gt;&lt;EM&gt;&amp;gt;&amp;gt;If mcu already in VLPS mode ,after wake up,main() function will be call again?&lt;/EM&gt;&lt;/P&gt;
&lt;P&gt;No, the program continues.&lt;/P&gt;
&lt;P&gt;1. Your clock configuration is correct.&lt;/P&gt;
&lt;P&gt;2. When you are using SDK, I would like to suggest looking at an example from the S32DS (File -&amp;gt; New -&amp;gt; S32DS Project from Example)&amp;nbsp;&lt;STRONG&gt;power_mode_switch_s32k148&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;You can easily&amp;nbsp;set VLPS mode using "POWER_SYS_SetMode()" function located in the "power_manager.c" file.&lt;/P&gt;
&lt;P&gt;So, this example can be used for your testing purpose to verify the behavior in VPLS mode.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I hope it helps,&lt;/P&gt;
&lt;P&gt;Best regards,&lt;/P&gt;
&lt;P&gt;Diana&lt;/P&gt;</description>
      <pubDate>Thu, 05 Nov 2020 10:04:02 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S32K/S32K148-Run-to-VLPS-Problem/m-p/1178693#M8705</guid>
      <dc:creator>dianabatrlova</dc:creator>
      <dc:date>2020-11-05T10:04:02Z</dc:date>
    </item>
    <item>
      <title>Re: S32K148 Run to VLPS Problem</title>
      <link>https://community.nxp.com/t5/S32K/S32K148-Run-to-VLPS-Problem/m-p/1179810#M8723</link>
      <description>&lt;P&gt;Hi dianabatrlova：&lt;/P&gt;&lt;P&gt;thank you for your reply,it's my misunderstood,when mcu&amp;nbsp; wake up, the program&amp;nbsp; continue to run,&lt;/P&gt;&lt;P&gt;so &lt;SPAN&gt;I reconfigured Clock after POWER_SYS_SetMode(), &lt;/SPAN&gt;now it can wake up normally.&lt;/P&gt;</description>
      <pubDate>Mon, 09 Nov 2020 03:18:55 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S32K/S32K148-Run-to-VLPS-Problem/m-p/1179810#M8723</guid>
      <dc:creator>shijie_zheng</dc:creator>
      <dc:date>2020-11-09T03:18:55Z</dc:date>
    </item>
  </channel>
</rss>

