<?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: SPI Slave fails when code is built with -O1 optimized flag in Kinetis Software Development Kit</title>
    <link>https://community.nxp.com/t5/Kinetis-Software-Development-Kit/SPI-Slave-fails-when-code-is-built-with-O1-optimized-flag/m-p/697800#M7495</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Seems like my code works better if I choose to disable loop invariant move.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="pastedImage_1.png"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/12993i6B5074D56664A814/image-size/large?v=v2&amp;amp;px=999" role="button" title="pastedImage_1.png" alt="pastedImage_1.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 04 Oct 2017 20:30:12 GMT</pubDate>
    <dc:creator>cwati</dc:creator>
    <dc:date>2017-10-04T20:30:12Z</dc:date>
    <item>
      <title>SPI Slave fails when code is built with -O1 optimized flag</title>
      <link>https://community.nxp.com/t5/Kinetis-Software-Development-Kit/SPI-Slave-fails-when-code-is-built-with-O1-optimized-flag/m-p/697799#M7494</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi there,&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;We're using&amp;nbsp;MK22FN256xxx12, running bare metal KSDK 1.0.0 (I know it's old, but we don't have the resource to update it yet).&amp;nbsp; The SPI on this board is running as a slave to a master (Nordic NRF51822 chip).&amp;nbsp; When the Kinetis code is built regularly, everything runs ok.&amp;nbsp; But recently we're short on space so I tried to build with optimized (I tried specifically with "-O1").&amp;nbsp; When I do that, then SPI slave starts failing.&amp;nbsp; The data coming into K22F is okay generally, but the data going to Nordic is so messed up it's unusable.&lt;BR /&gt;&lt;BR /&gt;Has anyone ever experienced this?&amp;nbsp; Is this caused by something trivial, perhaps some Compiler settings that I can modify?&lt;BR /&gt;&lt;BR /&gt;In general I do see when building with Optimized (C/C++ Build-&amp;gt;Settings-&amp;gt;Optimization Level-&amp;gt;Optimize...) then the system degenerates.&amp;nbsp; But I've never tried to pinpoint exactly where it's happening.&amp;nbsp; This time, it's very reproducible and obvious.&lt;BR /&gt;&lt;BR /&gt;Thanks,&lt;BR /&gt;Cecylia&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 04 Oct 2017 01:23:26 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Software-Development-Kit/SPI-Slave-fails-when-code-is-built-with-O1-optimized-flag/m-p/697799#M7494</guid>
      <dc:creator>cwati</dc:creator>
      <dc:date>2017-10-04T01:23:26Z</dc:date>
    </item>
    <item>
      <title>Re: SPI Slave fails when code is built with -O1 optimized flag</title>
      <link>https://community.nxp.com/t5/Kinetis-Software-Development-Kit/SPI-Slave-fails-when-code-is-built-with-O1-optimized-flag/m-p/697800#M7495</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Seems like my code works better if I choose to disable loop invariant move.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="pastedImage_1.png"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/12993i6B5074D56664A814/image-size/large?v=v2&amp;amp;px=999" role="button" title="pastedImage_1.png" alt="pastedImage_1.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 04 Oct 2017 20:30:12 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Software-Development-Kit/SPI-Slave-fails-when-code-is-built-with-O1-optimized-flag/m-p/697800#M7495</guid>
      <dc:creator>cwati</dc:creator>
      <dc:date>2017-10-04T20:30:12Z</dc:date>
    </item>
    <item>
      <title>Re: SPI Slave fails when code is built with -O1 optimized flag</title>
      <link>https://community.nxp.com/t5/Kinetis-Software-Development-Kit/SPI-Slave-fails-when-code-is-built-with-O1-optimized-flag/m-p/697801#M7496</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Cecylia,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;It is good to hear you found a workaround. Since KSDK 1.0.0 is an old version, it is no longer available for download so I can't reproduce what you mention. I would recommend that you use the new MCUXpresso SDK 2.x, there have been some bug fixes and improvements since version 1.0.0.&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;Hope it helps!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Best Regards,&lt;BR /&gt;Carlos Mendoza&lt;BR /&gt;Technical Support Engineer&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 06 Oct 2017 14:15:31 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Software-Development-Kit/SPI-Slave-fails-when-code-is-built-with-O1-optimized-flag/m-p/697801#M7496</guid>
      <dc:creator>Carlos_Mendoza</dc:creator>
      <dc:date>2017-10-06T14:15:31Z</dc:date>
    </item>
  </channel>
</rss>

