<?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>MCUXpresso SDK中的主题 PIT Interrupt only work on Main for C++ code?</title>
    <link>https://community.nxp.com/t5/MCUXpresso-SDK/PIT-Interrupt-only-work-on-Main-for-C-code/m-p/942289#M1664</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am trying to implement a PIT interrupt on a C++ program.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have already inserted the extern "C" guards on the interrupt and positioned it outside a Class, but on a different .cpp file than Main function, on the same file that triggers it.&lt;/P&gt;&lt;P&gt;In such scenario the interrupt does not work; however if I just move the interrupt to the main.cpp file it works like a charm. As further information, I am instantiating the class (a singleton) on the main function for PIT testing.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I searched the forums but did not find any explanation about it, is this the expected behavior? Or is there anything else I&amp;nbsp;am missing so I can move it to another .cpp file?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am using SDK version 2.6.0 (2019-06-14) for the K22FN microcontroller running at 96MHz.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks for your support,&lt;/P&gt;&lt;P&gt;Thiago&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 19 Sep 2019 01:13:58 GMT</pubDate>
    <dc:creator>thiagopalmieri</dc:creator>
    <dc:date>2019-09-19T01:13:58Z</dc:date>
    <item>
      <title>PIT Interrupt only work on Main for C++ code?</title>
      <link>https://community.nxp.com/t5/MCUXpresso-SDK/PIT-Interrupt-only-work-on-Main-for-C-code/m-p/942289#M1664</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am trying to implement a PIT interrupt on a C++ program.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have already inserted the extern "C" guards on the interrupt and positioned it outside a Class, but on a different .cpp file than Main function, on the same file that triggers it.&lt;/P&gt;&lt;P&gt;In such scenario the interrupt does not work; however if I just move the interrupt to the main.cpp file it works like a charm. As further information, I am instantiating the class (a singleton) on the main function for PIT testing.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I searched the forums but did not find any explanation about it, is this the expected behavior? Or is there anything else I&amp;nbsp;am missing so I can move it to another .cpp file?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am using SDK version 2.6.0 (2019-06-14) for the K22FN microcontroller running at 96MHz.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks for your support,&lt;/P&gt;&lt;P&gt;Thiago&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 19 Sep 2019 01:13:58 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MCUXpresso-SDK/PIT-Interrupt-only-work-on-Main-for-C-code/m-p/942289#M1664</guid>
      <dc:creator>thiagopalmieri</dc:creator>
      <dc:date>2019-09-19T01:13:58Z</dc:date>
    </item>
    <item>
      <title>Re: PIT Interrupt only work on Main for C++ code?</title>
      <link>https://community.nxp.com/t5/MCUXpresso-SDK/PIT-Interrupt-only-work-on-Main-for-C-code/m-p/942290#M1665</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I would check the linker .map file if it really is there with the unmangled name?&lt;/P&gt;&lt;P&gt;There must be something you have missed with placing it in a different file.&lt;/P&gt;&lt;P&gt;If in the different file it uses the unmangled name too, there should be no difference.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I hope this helps,&lt;/P&gt;&lt;P&gt;Erich&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 19 Sep 2019 07:24:59 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MCUXpresso-SDK/PIT-Interrupt-only-work-on-Main-for-C-code/m-p/942290#M1665</guid>
      <dc:creator>ErichStyger</dc:creator>
      <dc:date>2019-09-19T07:24:59Z</dc:date>
    </item>
    <item>
      <title>Re: PIT Interrupt only work on Main for C++ code?</title>
      <link>https://community.nxp.com/t5/MCUXpresso-SDK/PIT-Interrupt-only-work-on-Main-for-C-code/m-p/942291#M1666</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Erich,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks for the tip on the map file.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Now it is working. For some reason it was not before, probably I did something wrong when "C" guarding the function that it was not being recognized as a C function.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Anyhow, to look into the map file is a good way to detect such C/C++ interaction problems.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks !&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 21 Sep 2019 01:09:12 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MCUXpresso-SDK/PIT-Interrupt-only-work-on-Main-for-C-code/m-p/942291#M1666</guid>
      <dc:creator>thiagopalmieri</dc:creator>
      <dc:date>2019-09-21T01:09:12Z</dc:date>
    </item>
  </channel>
</rss>

