<?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 lpc4370 hard fault in SystemCoreClockUpdate() in LPC Microcontrollers</title>
    <link>https://community.nxp.com/t5/LPC-Microcontrollers/lpc4370-hard-fault-in-SystemCoreClockUpdate/m-p/1669417#M53015</link>
    <description>&lt;P&gt;Hi,&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am trying to use the M0APP with multicore programming on the LPC4370. The M4 project activates the M0APP project as expected but I am now getting a hard fault&amp;nbsp;SystemCoreClockUpdate() function. I debugged and saw the problem specifically happens inside the&amp;nbsp;Chip_Clock_FindBaseClock() function.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="hard fault.PNG" style="width: 561px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/227711i47D52C9D874DE06C/image-size/large?v=v2&amp;amp;px=999" role="button" title="hard fault.PNG" alt="hard fault.PNG" /&gt;&lt;/span&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="hard fault thread.PNG" style="width: 405px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/227712i5B2960D622DF1E77/image-size/large?v=v2&amp;amp;px=999" role="button" title="hard fault thread.PNG" alt="hard fault thread.PNG" /&gt;&lt;/span&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Does anyone have any suggestions to solve this problem?&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Is there a guide to understanding hard faults?&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Wed, 14 Jun 2023 15:10:55 GMT</pubDate>
    <dc:creator>smarty760</dc:creator>
    <dc:date>2023-06-14T15:10:55Z</dc:date>
    <item>
      <title>lpc4370 hard fault in SystemCoreClockUpdate()</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/lpc4370-hard-fault-in-SystemCoreClockUpdate/m-p/1669417#M53015</link>
      <description>&lt;P&gt;Hi,&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am trying to use the M0APP with multicore programming on the LPC4370. The M4 project activates the M0APP project as expected but I am now getting a hard fault&amp;nbsp;SystemCoreClockUpdate() function. I debugged and saw the problem specifically happens inside the&amp;nbsp;Chip_Clock_FindBaseClock() function.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="hard fault.PNG" style="width: 561px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/227711i47D52C9D874DE06C/image-size/large?v=v2&amp;amp;px=999" role="button" title="hard fault.PNG" alt="hard fault.PNG" /&gt;&lt;/span&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="hard fault thread.PNG" style="width: 405px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/227712i5B2960D622DF1E77/image-size/large?v=v2&amp;amp;px=999" role="button" title="hard fault thread.PNG" alt="hard fault thread.PNG" /&gt;&lt;/span&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Does anyone have any suggestions to solve this problem?&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Is there a guide to understanding hard faults?&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 14 Jun 2023 15:10:55 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/lpc4370-hard-fault-in-SystemCoreClockUpdate/m-p/1669417#M53015</guid>
      <dc:creator>smarty760</dc:creator>
      <dc:date>2023-06-14T15:10:55Z</dc:date>
    </item>
    <item>
      <title>Re: lpc4370 hard fault in SystemCoreClockUpdate()</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/lpc4370-hard-fault-in-SystemCoreClockUpdate/m-p/1669860#M53022</link>
      <description>&lt;P&gt;Hello&amp;nbsp;&lt;a href="https://community.nxp.com/t5/user/viewprofilepage/user-id/218278"&gt;@smarty760&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;About "Hard Fault", you can have a look at:&lt;/P&gt;
&lt;P&gt;&lt;A href="https://www.keil.com/appnotes/files/apnt209.pdf" target="_blank"&gt;https://www.keil.com/appnotes/files/apnt209.pdf&lt;/A&gt;&amp;nbsp;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;A href="https://mcuoneclipse.com/2012/11/24/debugging-hard-faults-on-arm-cortex-m/" target="_blank"&gt;https://mcuoneclipse.com/2012/11/24/debugging-hard-faults-on-arm-cortex-m/&lt;/A&gt;&amp;nbsp;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;It seems the issue on your case is clock, recommend you check clock configuration, and also test demo under LPCopen first.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;BR&lt;/P&gt;
&lt;P&gt;Alice&lt;/P&gt;</description>
      <pubDate>Thu, 15 Jun 2023 03:42:43 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/lpc4370-hard-fault-in-SystemCoreClockUpdate/m-p/1669860#M53022</guid>
      <dc:creator>Alice_Yang</dc:creator>
      <dc:date>2023-06-15T03:42:43Z</dc:date>
    </item>
    <item>
      <title>Re: lpc4370 hard fault in SystemCoreClockUpdate()</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/lpc4370-hard-fault-in-SystemCoreClockUpdate/m-p/1670188#M53037</link>
      <description>&lt;P&gt;Hi,&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am using MCUXpresso IDE and I went to&amp;nbsp;Clocks Tool to try to check the clock configuration. I then got a "The selected project is not based on MCUXpresso SDK" error. I am not sure what this means.&lt;/P&gt;&lt;P&gt;I have tried the "multicore_blinky_m4", "multicore_blinky_m0app" and other similar similar examples posted on the forums and I never got a clock problem. I would insert my code into the example and after I try to debug this, the clock becomes an issue.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 15 Jun 2023 10:13:46 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/lpc4370-hard-fault-in-SystemCoreClockUpdate/m-p/1670188#M53037</guid>
      <dc:creator>smarty760</dc:creator>
      <dc:date>2023-06-15T10:13:46Z</dc:date>
    </item>
    <item>
      <title>Re: lpc4370 hard fault in SystemCoreClockUpdate()</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/lpc4370-hard-fault-in-SystemCoreClockUpdate/m-p/1670310#M53041</link>
      <description>&lt;P&gt;While the interface is AFAIK standardized in CMSIS, the actual implementation is MCU specific, and usually provided by the vendor.&lt;BR /&gt;These are usually the functions&amp;nbsp;&lt;FONT face="courier new,courier"&gt;SystemInit&lt;/FONT&gt;() and&amp;nbsp;&lt;FONT face="courier new,courier"&gt;SystemCoreClockUpdate&lt;/FONT&gt;(), provided in &lt;FONT face="courier new,courier"&gt;system_&amp;lt;MCU name&amp;gt;.c&lt;/FONT&gt;., at least for all Cortex M MCU families I use to work with.&lt;/P&gt;&lt;P&gt;So obviously, the code must match the MCU (or MCU family). Pulling said file from another project for the same MCU should work.&lt;BR /&gt;Though I would check the source code. Often it contains several specific code sections, enabled/disabled by MCU-specific type #defines. I would suggest to single-step through the code, and check that only relevent/proper code is executed.&lt;/P&gt;&lt;P&gt;By the way, when I happen to have such a problem, the code usually already fails in SystemInit(), which is called from the startup code before main().&lt;/P&gt;</description>
      <pubDate>Thu, 15 Jun 2023 13:04:22 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/lpc4370-hard-fault-in-SystemCoreClockUpdate/m-p/1670310#M53041</guid>
      <dc:creator>frank_m</dc:creator>
      <dc:date>2023-06-15T13:04:22Z</dc:date>
    </item>
    <item>
      <title>Re: lpc4370 hard fault in SystemCoreClockUpdate()</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/lpc4370-hard-fault-in-SystemCoreClockUpdate/m-p/1670429#M53043</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;The&amp;nbsp;&lt;FONT face="courier new,courier"&gt;SystemCoreClockUpdate&lt;/FONT&gt;&lt;SPAN&gt;() is in the first line of code in the main. Even if I commented this out the Chip_Clock_GetRate() within the&amp;nbsp;&lt;FONT face="courier new,courier"&gt;SystemCoreClockUpdate&lt;/FONT&gt;() code is called in other parts of the code. Maybe it is worth mentioning that the code im trying to copy worked on the lpc43S67 instead of the lpc4370 I am working on now. However, I am not sure how the first line of code in the main would be affected by the code that is used after it in the debug session.&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;I tried commenting out the code in the Chip_Clock_GetRate() but, when debugging with stepping line by line, the function is still being debugged as if it was not commented out.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-left" image-alt="clockGetRateSS.PNG" style="width: 413px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/227949iD4792D60F45C818F/image-size/large?v=v2&amp;amp;px=999" role="button" title="clockGetRateSS.PNG" alt="clockGetRateSS.PNG" /&gt;&lt;/span&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 15 Jun 2023 15:09:30 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/lpc4370-hard-fault-in-SystemCoreClockUpdate/m-p/1670429#M53043</guid>
      <dc:creator>smarty760</dc:creator>
      <dc:date>2023-06-15T15:09:30Z</dc:date>
    </item>
    <item>
      <title>Re: lpc4370 hard fault in SystemCoreClockUpdate()</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/lpc4370-hard-fault-in-SystemCoreClockUpdate/m-p/1670449#M53044</link>
      <description>&lt;P&gt;First I must say that I have no actual experience with the LPC43S67 nor the LPC4370 MCUs.&lt;/P&gt;&lt;P&gt;&lt;FONT color="#0000FF"&gt;&lt;EM&gt;&amp;gt; I tried commenting out the code in the Chip_Clock_GetRate() but, when debugging with stepping line by line, the function is still being debugged as if it was not commented out.&lt;/EM&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;This is usually a sign that your project setup or debug setup is incorrect or corrupted.&lt;BR /&gt;Perhaps it is just out of sync, and a clean/rebuild helps. Because Eclipse projects tend to be somewhat opaque and messy, I often end up creating a fresh project.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Try a simple test here: insert a line containing "#error &amp;lt;some text&amp;gt;" in the source file, and rebuild.&lt;BR /&gt;If it doesn't throw an error, you probably have multiple copies in your project.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Onother example of a negative experience I made with Eclipse :&lt;BR /&gt;Files (*.c/*.h) are implicitely included in the build and compiled/linked, even if they are only added to a folder a project happens to be located in, and are not explicitely added to the project. This might also happen when you copy a folder from one project to another.&lt;BR /&gt;I consider this a critical bug, and one of the reasons I switched to Segger Embedded Studio for my private projects.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&lt;FONT color="#0000FF"&gt;&lt;EM&gt;&amp;gt; Maybe it is worth mentioning that the code im trying to copy worked on the lpc43S67 instead of the lpc4370 I am working on now.&lt;/EM&gt;&lt;/FONT&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;I don't know if these two MCUs are compatible on that level.&lt;BR /&gt;A simple way to check would be to fetch a SDK example for both of them, and compare the implementations of said functions.&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 15 Jun 2023 15:42:36 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/lpc4370-hard-fault-in-SystemCoreClockUpdate/m-p/1670449#M53044</guid>
      <dc:creator>frank_m</dc:creator>
      <dc:date>2023-06-15T15:42:36Z</dc:date>
    </item>
    <item>
      <title>Re: lpc4370 hard fault in SystemCoreClockUpdate()</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/lpc4370-hard-fault-in-SystemCoreClockUpdate/m-p/1670994#M53053</link>
      <description>&lt;P&gt;Hello&amp;nbsp;&lt;a href="https://community.nxp.com/t5/user/viewprofilepage/user-id/218278"&gt;@smarty760&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;1) Yes,&amp;nbsp;&lt;SPAN&gt;&amp;nbsp;Clocks Tool&amp;nbsp; doesn't support legacy products lpc43xx.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;2) "I tried commenting out the code in the Chip_Clock_GetRate() but, when debugging with stepping line by line, the function is still being debugged as if it was not commented out."&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;-&amp;gt;&amp;gt; There is issue in your project. Delete .metadata folder under MCUXpresso IDE workspace,&amp;nbsp; then re-compile and debug your project again.&amp;nbsp; Also can create a new project or development based on example under LPCopen.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;BR&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Alice&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 16 Jun 2023 09:05:12 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/lpc4370-hard-fault-in-SystemCoreClockUpdate/m-p/1670994#M53053</guid>
      <dc:creator>Alice_Yang</dc:creator>
      <dc:date>2023-06-16T09:05:12Z</dc:date>
    </item>
  </channel>
</rss>

