<?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>Kinetis Microcontrollersのトピックsrand issue causing Cpu_ivINT_Hard_Fault</title>
    <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/srand-issue-causing-Cpu-ivINT-Hard-Fault/m-p/764473#M46549</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;When debugging, the very first time after compiling the code the debugger faults at&amp;nbsp;Cpu_ivINT_Hard_Fault. If I reset the processor and run again, it doesn't happen.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Any ideas?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am using the MK10DK128VLK7 and the Kinetis IDE.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In the debugger, I step through the code and it always faults at the srand line.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 09 Nov 2017 21:27:21 GMT</pubDate>
    <dc:creator>richardw</dc:creator>
    <dc:date>2017-11-09T21:27:21Z</dc:date>
    <item>
      <title>srand issue causing Cpu_ivINT_Hard_Fault</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/srand-issue-causing-Cpu-ivINT-Hard-Fault/m-p/764473#M46549</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;When debugging, the very first time after compiling the code the debugger faults at&amp;nbsp;Cpu_ivINT_Hard_Fault. If I reset the processor and run again, it doesn't happen.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Any ideas?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am using the MK10DK128VLK7 and the Kinetis IDE.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In the debugger, I step through the code and it always faults at the srand line.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 09 Nov 2017 21:27:21 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/srand-issue-causing-Cpu-ivINT-Hard-Fault/m-p/764473#M46549</guid>
      <dc:creator>richardw</dc:creator>
      <dc:date>2017-11-09T21:27:21Z</dc:date>
    </item>
    <item>
      <title>Re: srand issue causing Cpu_ivINT_Hard_Fault</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/srand-issue-causing-Cpu-ivINT-Hard-Fault/m-p/764474#M46550</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;What debug connection/probe are you using? First I would check that the latest drivers are installed (e.g. P&amp;amp;E and Segger). If using P&amp;amp;E, you can update to the latest P&amp;amp;E software with Help &amp;gt; Install New software and select the P&amp;amp;E update site. For Segger see &lt;A class="link-titled" href="https://mcuoneclipse.com/2015/08/30/updating-segger-tools-in-eclipse-kinetis-design-studio/" title="https://mcuoneclipse.com/2015/08/30/updating-segger-tools-in-eclipse-kinetis-design-studio/"&gt;Updating Segger Tools in Eclipse Kinetis Design Studio | MCU on Eclipse&lt;/A&gt; .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Other than that: it could be some kind of stack overflow: make sure you have enough stack allocated.&lt;/P&gt;&lt;P&gt;Posting an example project of your problem would be helpful too.&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>Fri, 10 Nov 2017 04:54:16 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/srand-issue-causing-Cpu-ivINT-Hard-Fault/m-p/764474#M46550</guid>
      <dc:creator>BlackNight</dc:creator>
      <dc:date>2017-11-10T04:54:16Z</dc:date>
    </item>
    <item>
      <title>Re: srand issue causing Cpu_ivINT_Hard_Fault</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/srand-issue-causing-Cpu-ivINT-Hard-Fault/m-p/764475#M46551</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Took me forever to be able to log back in for some reason. Thank you for your comments.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;There is definitely enough stack space as I have allocated 0x800 and monitoring the stack during usage, it never goes above 0x30E. Oddly enough, after adding that code, the issue never happened and hasn't happened since?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I will monitor this and post anything new in case it pops back up.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Quick question about the stack although I think I know the answer.&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;The stack works backwards, yes?&lt;/LI&gt;&lt;LI&gt;So if the stack goes up to 0x1FFFFFFF, then the maximum stack size should be monitoring the minimum value starting at 0x1FFFFFFF?&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;I used the following code to trace the stack:&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;DIV data-object-id="428355" data-object-type="1"&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;UL&gt;&lt;LI data-object-id="802329" data-object-type="2"&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;&lt;P&gt;&lt;SPAN style="font-family: courier new,courier; font-size: 12pt;"&gt;static inline uint32_t __get_MSP(void)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: courier new,courier; font-size: 12pt;"&gt;{&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: courier new,courier; font-size: 12pt;"&gt;&amp;nbsp; &amp;nbsp; register uint32_t regMainStackPointer __ASM("sp");&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: courier new,courier; font-size: 12pt;"&gt;&amp;nbsp; &amp;nbsp; return(regMainStackPointer);&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: courier new,courier; font-size: 12pt;"&gt;}&lt;/SPAN&gt;&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 15 Nov 2017 15:27:11 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/srand-issue-causing-Cpu-ivINT-Hard-Fault/m-p/764475#M46551</guid>
      <dc:creator>richardwheatley</dc:creator>
      <dc:date>2017-11-15T15:27:11Z</dc:date>
    </item>
  </channel>
</rss>

