<?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: Kinetis K66 Hard Fault Accessing RTC in debug mode in Kinetis Microcontrollers</title>
    <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/Kinetis-K66-Hard-Fault-Accessing-RTC-in-debug-mode/m-p/776394#M47248</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Robin/Mark&lt;/P&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;P&gt;&lt;/P&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;P&gt;I have a similar issue. In my hardware design VBAT(L6 pin) is not connected but the RTC module used to working fine with Kinetis SDK 1.2.0 even in debug mode. However with SDK 2.6.0(MCUXpresso) I have a hard fault handler at &lt;BR /&gt; &lt;BR /&gt; BOARD_BootClockHSRUN(void) &lt;BR /&gt; -&amp;gt; CLOCK_CONFIG_SetRtcClock(RTC_OSC_CAP_LOAD_0PF, RTC_RTC32KCLK_PERIPHERALS_ENABLED)&lt;BR /&gt; -&amp;gt; if ((RTC-&amp;gt;CR &amp;amp; RTC_CR_OSCE_MASK) == 0u) { /* Only if the Rtc oscillator is not already enabled */&lt;BR /&gt; &lt;BR /&gt; &lt;BR /&gt; - I have VBAT activated in my Pin configuration&lt;BR /&gt; - FSL_FEATURE_SOC_RFVBAT_COUNT is set to 1&lt;BR /&gt; - ERCLK32K is enabled&lt;BR /&gt; &lt;BR /&gt; How can I get the RTC working without VBAT Pin wired as it does with Kinetis ?&lt;BR /&gt; &lt;BR /&gt;Best Regards,&lt;/P&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;P&gt;Karim&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 05 Nov 2019 08:44:16 GMT</pubDate>
    <dc:creator>kdembele</dc:creator>
    <dc:date>2019-11-05T08:44:16Z</dc:date>
    <item>
      <title>Kinetis K66 Hard Fault Accessing RTC in debug mode</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/Kinetis-K66-Hard-Fault-Accessing-RTC-in-debug-mode/m-p/776391#M47245</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Dear All,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'm having some problems using internal RTC module on a custom board with MK66FN2M0VMD18 processor.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'm using KDS 3.0 IDE with GCC compiler and Segger Jlink debugger.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I use internal RTC in my program and I poll the device periodically.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If I run the board programmed everything works and the program executes with no issues.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But If I try to run the program in debug mode using jlink debugger I get an hard fault and the program halts when I attempt to access RTC device.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If I comment instructions that uses the RTC internal device the program runs with no issues too.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;I've checked the K66 Sub-Family Reference Manual and I read that a bus error may be issued if the VBAT pin is not connected or if is not provided with the right voltage.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I've measured the voltage on VBAT pin and I always found 3.3V.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;Do You know why the hard fault is caused by RTC device when I run the brogram through emulator? Is there some workaround to correct this issue? Any HW or SW suggestion?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;All Your support is appreciated.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Emanuele&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 09 Jan 2018 16:40:23 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/Kinetis-K66-Hard-Fault-Accessing-RTC-in-debug-mode/m-p/776391#M47245</guid>
      <dc:creator>emanuelemarracc</dc:creator>
      <dc:date>2018-01-09T16:40:23Z</dc:date>
    </item>
    <item>
      <title>Re: Kinetis K66 Hard Fault Accessing RTC in debug mode</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/Kinetis-K66-Hard-Fault-Accessing-RTC-in-debug-mode/m-p/776392#M47246</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Emanuele&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;RTC access will result in a hard fault if either VBAT is not connector or the RTC clock is not enabled in SIM_SCGC6.&lt;BR /&gt;If you have VBAT, check SIM_SCGC6 to see whether it is somehow missing its initialisation when you work in debug mode.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Mark&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Kinetis: &lt;/SPAN&gt;&lt;A class="jive-link-external-small" href="https://community.nxp.com/external-link.jspa?url=http%3A%2F%2Fwww.utasker.com%2Fkinetis.html" rel="nofollow" target="_blank"&gt;http://www.utasker.com/kinetis.html&lt;/A&gt;&lt;BR /&gt;Kinetis K66:&lt;BR /&gt;&lt;SPAN&gt;- &lt;/SPAN&gt;&lt;A class="jive-link-external-small" href="https://community.nxp.com/external-link.jspa?url=http%3A%2F%2Fwww.utasker.com%2Fkinetis%2FTWR-K65F180M.html" rel="nofollow" target="_blank"&gt;http://www.utasker.com/kinetis/TWR-K65F180M.html&lt;/A&gt;&lt;BR /&gt;&lt;SPAN&gt;- &lt;/SPAN&gt;&lt;A class="jive-link-external-small" href="https://community.nxp.com/external-link.jspa?url=http%3A%2F%2Fwww.utasker.com%2Fkinetis%2FFRDM-K66F.html" rel="nofollow" target="_blank"&gt;http://www.utasker.com/kinetis/FRDM-K66F.html&lt;/A&gt;&lt;BR /&gt;&lt;SPAN&gt;- &lt;/SPAN&gt;&lt;A class="jive-link-external-small" href="https://community.nxp.com/external-link.jspa?url=http%3A%2F%2Fwww.utasker.com%2Fkinetis%2FTEENSY_3.6.html" rel="nofollow" target="_blank"&gt;http://www.utasker.com/kinetis/TEENSY_3.6.html&lt;/A&gt;&lt;BR /&gt;&lt;SPAN&gt;RTC and time keeping: &lt;/SPAN&gt;&lt;A class="jive-link-external-small" href="https://community.nxp.com/external-link.jspa?url=http%3A%2F%2Fwww.utasker.com%2Fdocs%2FuTasker%2FuTasker_Time.pdf" rel="nofollow" target="_blank"&gt;http://www.utasker.com/docs/uTasker/uTasker_Time.pdf&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;SPAN&gt;Free Open Source solution: &lt;/SPAN&gt;&lt;A class="jive-link-external-small" href="https://community.nxp.com/external-link.jspa?url=https%3A%2F%2Fgithub.com%2FuTasker%2FuTasker-Kinetis" rel="nofollow" target="_blank"&gt;https://github.com/uTasker/uTasker-Kinetis&lt;/A&gt;&lt;BR /&gt;&lt;SPAN&gt;Working project in 15 minutes video: &lt;/SPAN&gt;&lt;A class="jive-link-external-small" href="https://community.nxp.com/external-link.jspa?url=https%3A%2F%2Fyoutu.be%2FK8ScSgpgQ6M" rel="nofollow" target="_blank"&gt;https://youtu.be/K8ScSgpgQ6M&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Professional Kinetis support, one-on-one training and complete fast-track project solutions: &lt;/SPAN&gt;&lt;A class="jive-link-external-small" href="https://community.nxp.com/external-link.jspa?url=http%3A%2F%2Fwww.utasker.com%2Fsupport.html" rel="nofollow" target="_blank"&gt;http://www.utasker.com/support.html&lt;/A&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 09 Jan 2018 18:32:22 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/Kinetis-K66-Hard-Fault-Accessing-RTC-in-debug-mode/m-p/776392#M47246</guid>
      <dc:creator>mjbcswitzerland</dc:creator>
      <dc:date>2018-01-09T18:32:22Z</dc:date>
    </item>
    <item>
      <title>Re: Kinetis K66 Hard Fault Accessing RTC in debug mode</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/Kinetis-K66-Hard-Fault-Accessing-RTC-in-debug-mode/m-p/776393#M47247</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi&amp;nbsp;Emanuele,&lt;/P&gt;&lt;P&gt;Have you try to test the RTC example in &lt;A href="https://mcuxpresso.nxp.com/en/select"&gt;SDK_2.3.0_FRDM-K66F&lt;/A&gt;(...\SDK_2.3.0_FRDM-K66F\boards\frdmk66f\driver_examples\rtc).&amp;nbsp; I didn't &lt;A href="https://mcuoneclipse.com/2015/07/05/debugging-arm-cortex-m-hard-faults-with-gdb-custom-command/"&gt;find any hardfault&lt;/A&gt; when Step Over these RTC functions using &lt;A href="https://www.nxp.com/products/wireless-connectivity/zigbee/kinetis-design-studio-integrated-development-environment-ide:KDS_IDE"&gt;KDS3.2&lt;/A&gt; and &lt;A href="https://www.nxp.com/support/developer-resources/run-time-software/kinetis-developer-resources/ides-for-kinetis-mcus/opensda-serial-and-debug-adapter:OPENSDA#FRDM-K66F"&gt;JLink firmware application&lt;/A&gt;.&lt;BR /&gt;Maybe you can attached simple rtc test project here, so that I can test it on FRDM-K66F board.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please search "bus error" in Chapter 49 Real Time Clock (RTC) of K66P144M180SF5RMV2 to check whether meet these situation.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Best Regards,&lt;/P&gt;&lt;P&gt;Robin&lt;/P&gt;&lt;P style="min- padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;-----------------------------------------------------------------------------------------------------------------------&lt;BR /&gt;Note: If this post answers your question, please click the Correct Answer button. Thank you!&lt;BR /&gt;-----------------------------------------------------------------------------------------------------------------------&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 17 Jan 2018 02:28:20 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/Kinetis-K66-Hard-Fault-Accessing-RTC-in-debug-mode/m-p/776393#M47247</guid>
      <dc:creator>Robin_Shen</dc:creator>
      <dc:date>2018-01-17T02:28:20Z</dc:date>
    </item>
    <item>
      <title>Re: Kinetis K66 Hard Fault Accessing RTC in debug mode</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/Kinetis-K66-Hard-Fault-Accessing-RTC-in-debug-mode/m-p/776394#M47248</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Robin/Mark&lt;/P&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;P&gt;&lt;/P&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;P&gt;I have a similar issue. In my hardware design VBAT(L6 pin) is not connected but the RTC module used to working fine with Kinetis SDK 1.2.0 even in debug mode. However with SDK 2.6.0(MCUXpresso) I have a hard fault handler at &lt;BR /&gt; &lt;BR /&gt; BOARD_BootClockHSRUN(void) &lt;BR /&gt; -&amp;gt; CLOCK_CONFIG_SetRtcClock(RTC_OSC_CAP_LOAD_0PF, RTC_RTC32KCLK_PERIPHERALS_ENABLED)&lt;BR /&gt; -&amp;gt; if ((RTC-&amp;gt;CR &amp;amp; RTC_CR_OSCE_MASK) == 0u) { /* Only if the Rtc oscillator is not already enabled */&lt;BR /&gt; &lt;BR /&gt; &lt;BR /&gt; - I have VBAT activated in my Pin configuration&lt;BR /&gt; - FSL_FEATURE_SOC_RFVBAT_COUNT is set to 1&lt;BR /&gt; - ERCLK32K is enabled&lt;BR /&gt; &lt;BR /&gt; How can I get the RTC working without VBAT Pin wired as it does with Kinetis ?&lt;BR /&gt; &lt;BR /&gt;Best Regards,&lt;/P&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;P&gt;Karim&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 05 Nov 2019 08:44:16 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/Kinetis-K66-Hard-Fault-Accessing-RTC-in-debug-mode/m-p/776394#M47248</guid>
      <dc:creator>kdembele</dc:creator>
      <dc:date>2019-11-05T08:44:16Z</dc:date>
    </item>
  </channel>
</rss>

