<?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 KW41:How to print out CFSR and HFSR? in Wireless MCU</title>
    <link>https://community.nxp.com/t5/Wireless-MCU/KW41-How-to-print-out-CFSR-and-HFSR/m-p/1090901#M9945</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;SPAN class=""&gt;&lt;SPAN title=""&gt;We use KW41's "SMAC connectivity test" as the base to develop the program.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN class="" title=""&gt;Because the current self-written program crashes during execution.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN title=""&gt;I want to use HardFault to debug.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN title=""&gt;Just like the following URL that&amp;nbsp; read Register.&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class=""&gt;&lt;A class="link-titled" href="http://blog.feabhas.com/2013/02/developing-a-generic-hard-fault-handler-for-arm-cortex-m3cortex-m4/" title="http://blog.feabhas.com/2013/02/developing-a-generic-hard-fault-handler-for-arm-cortex-m3cortex-m4/"&gt;Developing a Generic Hard Fault handler for ARM Cortex-M3/Cortex-M4 - Sticky Bits - Powered by FeabhasSticky Bits – Powe…&lt;/A&gt;&amp;nbsp;&lt;BR /&gt;&lt;SPAN class="" title=""&gt;How can I add programs to print out the CFSR and HFSR values?&lt;/SPAN&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class=""&gt;&lt;SPAN class="" title=""&gt;Because HardFault_Handler () is an assembly code, I do n’t know where to start?&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class=""&gt;&lt;SPAN class="" title=""&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/106246i6740198A49C692A2/image-size/large?v=v2&amp;amp;px=999" role="button" title="pastedImage_1.png" alt="pastedImage_1.png" /&gt;&lt;/span&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class=""&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class=""&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class=""&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class=""&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="pastedImage_2.png"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/106235iDC1DA9069E3FAA38/image-size/large?v=v2&amp;amp;px=999" role="button" title="pastedImage_2.png" alt="pastedImage_2.png" /&gt;&lt;/span&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class=""&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="pastedImage_3.png"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/106236i57C787217FD020C0/image-size/large?v=v2&amp;amp;px=999" role="button" title="pastedImage_3.png" alt="pastedImage_3.png" /&gt;&lt;/span&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 13 Apr 2020 10:06:38 GMT</pubDate>
    <dc:creator>danieltseng</dc:creator>
    <dc:date>2020-04-13T10:06:38Z</dc:date>
    <item>
      <title>KW41:How to print out CFSR and HFSR?</title>
      <link>https://community.nxp.com/t5/Wireless-MCU/KW41-How-to-print-out-CFSR-and-HFSR/m-p/1090901#M9945</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;SPAN class=""&gt;&lt;SPAN title=""&gt;We use KW41's "SMAC connectivity test" as the base to develop the program.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN class="" title=""&gt;Because the current self-written program crashes during execution.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN title=""&gt;I want to use HardFault to debug.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN title=""&gt;Just like the following URL that&amp;nbsp; read Register.&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class=""&gt;&lt;A class="link-titled" href="http://blog.feabhas.com/2013/02/developing-a-generic-hard-fault-handler-for-arm-cortex-m3cortex-m4/" title="http://blog.feabhas.com/2013/02/developing-a-generic-hard-fault-handler-for-arm-cortex-m3cortex-m4/"&gt;Developing a Generic Hard Fault handler for ARM Cortex-M3/Cortex-M4 - Sticky Bits - Powered by FeabhasSticky Bits – Powe…&lt;/A&gt;&amp;nbsp;&lt;BR /&gt;&lt;SPAN class="" title=""&gt;How can I add programs to print out the CFSR and HFSR values?&lt;/SPAN&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class=""&gt;&lt;SPAN class="" title=""&gt;Because HardFault_Handler () is an assembly code, I do n’t know where to start?&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class=""&gt;&lt;SPAN class="" title=""&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/106246i6740198A49C692A2/image-size/large?v=v2&amp;amp;px=999" role="button" title="pastedImage_1.png" alt="pastedImage_1.png" /&gt;&lt;/span&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class=""&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class=""&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class=""&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class=""&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="pastedImage_2.png"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/106235iDC1DA9069E3FAA38/image-size/large?v=v2&amp;amp;px=999" role="button" title="pastedImage_2.png" alt="pastedImage_2.png" /&gt;&lt;/span&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class=""&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="pastedImage_3.png"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/106236i57C787217FD020C0/image-size/large?v=v2&amp;amp;px=999" role="button" title="pastedImage_3.png" alt="pastedImage_3.png" /&gt;&lt;/span&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 13 Apr 2020 10:06:38 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Wireless-MCU/KW41-How-to-print-out-CFSR-and-HFSR/m-p/1090901#M9945</guid>
      <dc:creator>danieltseng</dc:creator>
      <dc:date>2020-04-13T10:06:38Z</dc:date>
    </item>
    <item>
      <title>Re: KW41:How to print out CFSR and HFSR?</title>
      <link>https://community.nxp.com/t5/Wireless-MCU/KW41-How-to-print-out-CFSR-and-HFSR/m-p/1090902#M9946</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Daniel, I hope you're doing well!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Unfortunately, it is not possible to print the CFSR or HFSR registers on the KW41Z, as they are not present on this MCU.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The KW41Z is based around an ARM Cortex M0+ core, and the available SCB registers for this MCU can be found in Chapter 4, tables 4-1 and 7-6 of the following ARM Technical Reference Document:&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;&lt;A class="link-titled" href="http://infocenter.arm.com/help/topic/com.arm.doc.ddi0484c/DDI0484C_cortex_m0p_r0p1_trm.pdf" title="http://infocenter.arm.com/help/topic/com.arm.doc.ddi0432c/DDI0432C_cortex_m0_r0p0_trm.pdf"&gt;Cortex-M0+ Technical Reference Manual&lt;/A&gt;&amp;nbsp;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;Please let me know if you still need to print the value for a different register other than the CFSR or the HFSR, or if you need any more information.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Best regards,&lt;/P&gt;&lt;P&gt;Sebastian&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 15 Apr 2020 18:57:14 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Wireless-MCU/KW41-How-to-print-out-CFSR-and-HFSR/m-p/1090902#M9946</guid>
      <dc:creator>Sebastian_Del_Rio</dc:creator>
      <dc:date>2020-04-15T18:57:14Z</dc:date>
    </item>
    <item>
      <title>Re: KW41:How to print out CFSR and HFSR?</title>
      <link>https://community.nxp.com/t5/Wireless-MCU/KW41-How-to-print-out-CFSR-and-HFSR/m-p/1090903#M9947</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;SPAN class="" lang="en"&gt;&lt;SPAN class="" title=""&gt;If M0+ cannot print CFSR and HFSR, what register can be checked for debugging in M0+ ？&lt;BR /&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 17 Apr 2020 12:28:51 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Wireless-MCU/KW41-How-to-print-out-CFSR-and-HFSR/m-p/1090903#M9947</guid>
      <dc:creator>danieltseng</dc:creator>
      <dc:date>2020-04-17T12:28:51Z</dc:date>
    </item>
    <item>
      <title>Re: KW41:How to print out CFSR and HFSR?</title>
      <link>https://community.nxp.com/t5/Wireless-MCU/KW41-How-to-print-out-CFSR-and-HFSR/m-p/1090904#M9948</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Daniel,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Fault handling in Cortex M0+ based MCUs is a bit different from Cortex M3/M4 cores. Most of the debug registers are not present on the KW41's core, as it is an ARM Cortex M0+.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The closest available registers could be the &lt;STRONG&gt;DFSR&lt;/STRONG&gt; register, which contains some useful information about interrupts, debugging status and faults, but not as in-depth as the &lt;STRONG&gt;CFSR&lt;/STRONG&gt;&amp;nbsp;and&amp;nbsp;&lt;STRONG&gt;HFSR&lt;/STRONG&gt; registers on the other cores.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;For more information about the bits available in the DFSR register, and to see if it would be useful for your purposes, could you please take a look at section C1.6.2 of the ARMv6 architecture Reference Manual, from ARM, &lt;A href="https://static.docs.arm.com/ddi0419/d/DDI0419D_armv6m_arm.pdf"&gt;here&lt;/A&gt;?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Please let me know if you need any further information.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Best regards,&lt;/P&gt;&lt;P&gt;Sebastian&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 17 Apr 2020 17:35:24 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Wireless-MCU/KW41-How-to-print-out-CFSR-and-HFSR/m-p/1090904#M9948</guid>
      <dc:creator>Sebastian_Del_Rio</dc:creator>
      <dc:date>2020-04-17T17:35:24Z</dc:date>
    </item>
    <item>
      <title>Re: KW41:How to print out CFSR and HFSR?</title>
      <link>https://community.nxp.com/t5/Wireless-MCU/KW41-How-to-print-out-CFSR-and-HFSR/m-p/1090905#M9949</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;SPAN class="" lang="en"&gt;&lt;SPAN class="" title=""&gt;&lt;BR /&gt;Follow the previous link:&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="" lang="en"&gt;&lt;SPAN class="" title=""&gt;&lt;A class="link-titled" href="http://blog.feabhas.com/2013/02/developing-a-generic-hard-fault-handler-for-arm-cortex-m3cortex-m4/" rel="nofollow noopener noreferrer noopener noreferrer" target="_blank" title="http://blog.feabhas.com/2013/02/developing-a-generic-hard-fault-handler-for-arm-cortex-m3cortex-m4/"&gt;Developing a Generic Hard Fault handler for ARM Cortex-M3/Cortex-M4 - Sticky Bits - Powered by FeabhasSticky Bits – Powe…&lt;/A&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="" lang="en"&gt;&lt;SPAN class="" title=""&gt;Since Cortex-M0 will not have CFSR and HFSR registers, I will try Cortex-M33 instead.&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="" lang="en"&gt;&lt;SPAN class="" title=""&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="" lang="en"&gt;&lt;SPAN class="" title=""&gt;I tried to use LPCX55S69-EVK, it is cortex-M33 with "divide by 0" detection.&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="" lang="en"&gt;&lt;SPAN class="" title=""&gt;I use "Led_blinky" example to implement "divide 0"&lt;/SPAN&gt;.&lt;/SPAN&gt;&lt;/P&gt;&lt;PRE&gt;&lt;SPAN class="lia-inline-image-display-wrapper" image-alt="pastedImage_1.png"&gt;&lt;IMG alt="pastedImage_1.png" src="https://community.nxp.com/t5/image/serverpage/image-id/108101i7AA285A501A339A3/image-size/large?v=v2&amp;amp;px=999" title="pastedImage_1.png" /&gt;&lt;/SPAN&gt;
&lt;SPAN class="lia-inline-image-display-wrapper" image-alt="pastedImage_1.png"&gt;&lt;IMG alt="pastedImage_1.png" src="https://community.nxp.com/t5/image/serverpage/image-id/108204iC27FEB836FDB8590/image-size/large?v=v2&amp;amp;px=999" title="pastedImage_1.png" /&gt;&lt;/SPAN&gt;

&lt;SPAN class="" lang="en"&gt;&lt;SPAN class="" title=""&gt;Set the breakpoint below, but never go in Hardfault_Handler(),always enter main's while (1)&lt;/SPAN&gt;&lt;/SPAN&gt;
&lt;SPAN class="lia-inline-image-display-wrapper" image-alt="pastedImage_2.png"&gt;&lt;IMG alt="pastedImage_2.png" src="https://community.nxp.com/t5/image/serverpage/image-id/105068iF0D281FC29F7AF9D/image-size/large?v=v2&amp;amp;px=999" title="pastedImage_2.png" /&gt;&lt;/SPAN&gt;
&lt;SPAN class="" lang="en"&gt;&lt;SPAN class="" title=""&gt;I would like to ask how to enter Hardfault&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 02 Nov 2020 14:43:17 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Wireless-MCU/KW41-How-to-print-out-CFSR-and-HFSR/m-p/1090905#M9949</guid>
      <dc:creator>danieltseng</dc:creator>
      <dc:date>2020-11-02T14:43:17Z</dc:date>
    </item>
  </channel>
</rss>

