<?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: Problems with optimization -Os</title>
    <link>https://community.nxp.com/t5/S32K/Problems-with-optimization-Os/m-p/2049984#M46192</link>
    <description>&lt;P&gt;No&lt;/P&gt;</description>
    <pubDate>Mon, 24 Feb 2025 14:12:37 GMT</pubDate>
    <dc:creator>David_Estevez</dc:creator>
    <dc:date>2025-02-24T14:12:37Z</dc:date>
    <item>
      <title>Problems with optimization -Os</title>
      <link>https://community.nxp.com/t5/S32K/Problems-with-optimization-Os/m-p/2049886#M46186</link>
      <description>&lt;P&gt;&lt;SPAN&gt;Hello,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;I'm using an S32K116 microcontroller where I run a program that executes a cycle of functions, then it goes into VLPS (Very Low Power Stop) mode, and a 100ms timer wakes it up, and so on consecutively. The problem is that the program works fine if I don't use any compiler optimization. But as soon as I apply -Os optimization, it seems like the cycle speeds up and doesn't respect the 100ms VLPS mode. How can I fix it so that it works with optimization?&lt;BR /&gt;&lt;BR /&gt;Regards,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;David&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 24 Feb 2025 11:53:47 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S32K/Problems-with-optimization-Os/m-p/2049886#M46186</guid>
      <dc:creator>David_Estevez</dc:creator>
      <dc:date>2025-02-24T11:53:47Z</dc:date>
    </item>
    <item>
      <title>Re: Problems with optimization -Os</title>
      <link>https://community.nxp.com/t5/S32K/Problems-with-optimization-Os/m-p/2049916#M46188</link>
      <description>&lt;P&gt;Do you see some warning messages? &lt;/P&gt;</description>
      <pubDate>Mon, 24 Feb 2025 12:35:24 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S32K/Problems-with-optimization-Os/m-p/2049916#M46188</guid>
      <dc:creator>davidtosenovjan</dc:creator>
      <dc:date>2025-02-24T12:35:24Z</dc:date>
    </item>
    <item>
      <title>Re: Problems with optimization -Os</title>
      <link>https://community.nxp.com/t5/S32K/Problems-with-optimization-Os/m-p/2049984#M46192</link>
      <description>&lt;P&gt;No&lt;/P&gt;</description>
      <pubDate>Mon, 24 Feb 2025 14:12:37 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S32K/Problems-with-optimization-Os/m-p/2049984#M46192</guid>
      <dc:creator>David_Estevez</dc:creator>
      <dc:date>2025-02-24T14:12:37Z</dc:date>
    </item>
    <item>
      <title>Re: Problems with optimization -Os</title>
      <link>https://community.nxp.com/t5/S32K/Problems-with-optimization-Os/m-p/2050012#M46193</link>
      <description>&lt;P&gt;I would test other optimization level, &lt;SPAN class="HwtZe"&gt;&lt;SPAN class="jCAhz ChMk0b"&gt;&lt;SPAN class="ryNqvb"&gt;maybe that could give you some clues&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;:&lt;/P&gt;
&lt;P&gt;&lt;A href="https://gcc.gnu.org/onlinedocs/gcc/Optimize-Options.html" target="_blank"&gt;https://gcc.gnu.org/onlinedocs/gcc/Optimize-Options.html&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 24 Feb 2025 14:41:53 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S32K/Problems-with-optimization-Os/m-p/2050012#M46193</guid>
      <dc:creator>davidtosenovjan</dc:creator>
      <dc:date>2025-02-24T14:41:53Z</dc:date>
    </item>
    <item>
      <title>Re: Problems with optimization -Os</title>
      <link>https://community.nxp.com/t5/S32K/Problems-with-optimization-Os/m-p/2050776#M46225</link>
      <description>&lt;P&gt;&lt;SPAN&gt;Hi again,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;As I could see, the problem comes from the FlexCAN. Some CAN interrupt is waking up the microcontroller (uC), but we are neither receiving nor sending any messages. With any optimization, this interrupt that is waking up the uC doesn't appear, but with -Os, it is appearing. I don't know why.&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 25 Feb 2025 11:04:02 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S32K/Problems-with-optimization-Os/m-p/2050776#M46225</guid>
      <dc:creator>David_Estevez</dc:creator>
      <dc:date>2025-02-25T11:04:02Z</dc:date>
    </item>
    <item>
      <title>Re: Problems with optimization -Os</title>
      <link>https://community.nxp.com/t5/S32K/Problems-with-optimization-Os/m-p/2050918#M46228</link>
      <description>&lt;P&gt;&lt;SPAN&gt;Hi again,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;I already saw what's happening. The problem is that I send a message via CAN just before going to sleep, and without optimizing the program, it's slower and there's no issue. But when optimizing, it's the transmission complete interrupt that wakes up the VLPS mode. Is there any way to select which types of interrupts are allowed to wake up the VLPS mode? For example, can only the timer be allowed to wake it up?&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 25 Feb 2025 15:06:12 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S32K/Problems-with-optimization-Os/m-p/2050918#M46228</guid>
      <dc:creator>David_Estevez</dc:creator>
      <dc:date>2025-02-25T15:06:12Z</dc:date>
    </item>
    <item>
      <title>Re: Problems with optimization -Os</title>
      <link>https://community.nxp.com/t5/S32K/Problems-with-optimization-Os/m-p/2050965#M46230</link>
      <description>&lt;P&gt;I just discussed with colleague having knowledge of low power modes on this device giving me some important notes to this topic:&lt;/P&gt;
&lt;P&gt;- FlexCAN can perform wake-up only in Pretended mode that is not available in VLPS&lt;/P&gt;
&lt;P&gt;-Alternatively you can use GPIO interrupt on RX pins&lt;/P&gt;
&lt;P&gt;- Before entering VLPS, FlexCAN is supposed to be turned off completely.&lt;/P&gt;
&lt;P&gt;So the conclusion is that possibly your application is not in VLPS mode because in such case FlexCAN would not work. To prove it, you could measure current consumption or use CLKOUT and measure BUS_CLK frequency.&lt;/P&gt;</description>
      <pubDate>Thu, 27 Feb 2025 08:35:46 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S32K/Problems-with-optimization-Os/m-p/2050965#M46230</guid>
      <dc:creator>davidtosenovjan</dc:creator>
      <dc:date>2025-02-27T08:35:46Z</dc:date>
    </item>
    <item>
      <title>Re: Problems with optimization -Os</title>
      <link>https://community.nxp.com/t5/S32K/Problems-with-optimization-Os/m-p/2051997#M46273</link>
      <description>&lt;DIV class=""&gt;&amp;nbsp;&lt;/DIV&gt;&lt;P&gt;I think I am entering VLPS mode because:&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;-The consumption drops from 0.74mA to 0.60mA.&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;-Without enabling the SIRC clock to function in sleep mode, it does not wake up again:&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Captura de pantalla 2025-02-26 181230.png" style="width: 400px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/325867i6A90A54583E94C0E/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Captura de pantalla 2025-02-26 181230.png" alt="Captura de pantalla 2025-02-26 181230.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;However, it is the CAN interruption that wakes it up. Could it be related to the fact that I am using an external CAN transceiver? My function to enter VLPS mode is as follows:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Captura de pantalla 2025-02-26 181033.png" style="width: 400px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/325865iBBD5F83977131593/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Captura de pantalla 2025-02-26 181033.png" alt="Captura de pantalla 2025-02-26 181033.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 26 Feb 2025 17:20:09 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S32K/Problems-with-optimization-Os/m-p/2051997#M46273</guid>
      <dc:creator>David_Estevez</dc:creator>
      <dc:date>2025-02-26T17:20:09Z</dc:date>
    </item>
    <item>
      <title>Re: Problems with optimization -Os</title>
      <link>https://community.nxp.com/t5/S32K/Problems-with-optimization-Os/m-p/2052794#M46294</link>
      <description>&lt;P&gt;that's not a big current drop indeed. If you see DS values, VLPS current are specified in uAmps&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="image.png" style="width: 620px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/326025i3C5CE62477B9FB48/image-dimensions/620x306?v=v2" width="620" height="306" role="button" title="image.png" alt="image.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;How I have already answered, FlexCAN needs to be turned off completely.&lt;/P&gt;</description>
      <pubDate>Thu, 27 Feb 2025 08:35:24 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S32K/Problems-with-optimization-Os/m-p/2052794#M46294</guid>
      <dc:creator>davidtosenovjan</dc:creator>
      <dc:date>2025-02-27T08:35:24Z</dc:date>
    </item>
    <item>
      <title>Re: Problems with optimization -Os</title>
      <link>https://community.nxp.com/t5/S32K/Problems-with-optimization-Os/m-p/2052847#M46297</link>
      <description>&lt;P&gt;Hi again,&lt;/P&gt;&lt;P&gt;I have a few questions more.&amp;nbsp;&lt;/P&gt;&lt;P&gt;That is, does the FlexCAN have to be turned off by code? Doesn't it automatically turn off when entering VLPS? Do any other resources need to be disabled before entering VLPS, such as a clock or another peripheral, or does the VLPS mode handle it automatically?&lt;/P&gt;&lt;P&gt;And regarding the function I sent you, is it correct? I wrote it exactly as stated in the RM manual, but I’m not sure if I’m missing anything else.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 27 Feb 2025 09:13:48 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S32K/Problems-with-optimization-Os/m-p/2052847#M46297</guid>
      <dc:creator>David_Estevez</dc:creator>
      <dc:date>2025-02-27T09:13:48Z</dc:date>
    </item>
    <item>
      <title>Re: Problems with optimization -Os</title>
      <link>https://community.nxp.com/t5/S32K/Problems-with-optimization-Os/m-p/2054807#M46387</link>
      <description>&lt;DIV id="tinyMceEditordavidtosenovjan_0" class="mceNonEditable lia-copypaste-placeholder"&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;P&gt;It is described in RM, section 55.1.9. &lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="image.png" style="width: 999px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/326503iE51BDB75A5DF5F20/image-size/large?v=v2&amp;amp;px=999" role="button" title="image.png" alt="image.png" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 03 Mar 2025 15:11:40 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S32K/Problems-with-optimization-Os/m-p/2054807#M46387</guid>
      <dc:creator>davidtosenovjan</dc:creator>
      <dc:date>2025-03-03T15:11:40Z</dc:date>
    </item>
  </channel>
</rss>

