<?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 K10 RTC problem in Kinetis Microcontrollers</title>
    <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/Kinetis-K10-RTC-problem/m-p/218326#M3883</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;BR /&gt;&amp;nbsp; this can be caused by low or no voltage on VBAT pin.&lt;/P&gt;&lt;P&gt;&lt;SPAN lang="JA" style="font-family: TimesLTStd-Roman; font-size: 14pt;"&gt;&lt;SPAN lang="JA" style="font-family: TimesLTStd-Roman; font-size: 14pt;"&gt;&lt;SPAN lang="JA" style="font-family: TimesLTStd-Roman; font-size: 14pt;"&gt;&amp;nbsp; &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P align="left"&gt;From reference manual:&lt;/P&gt;&lt;P align="left"&gt;Any attempt to access an RTC register (except the access control registers) when VBAT&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P align="left"&gt;is powered down, when the RTC is electrically isolated, or when VBAT POR is asserted,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;will result in a bus error.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="mce_paste_marker"&gt;MVa&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 28 Dec 2012 21:03:51 GMT</pubDate>
    <dc:creator>MVa</dc:creator>
    <dc:date>2012-12-28T21:03:51Z</dc:date>
    <item>
      <title>Kinetis K10 RTC problem</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/Kinetis-K10-RTC-problem/m-p/218321#M3878</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;I have my custom board with MK10DN512Z. I use CW 10.2 on Ubuntu Linux and Kwikstik's J-Link to debug.&lt;/P&gt;&lt;P&gt;On XTAL32 and EXTAL32 pins is 32.768kHz,6pF crystal. I Enabled RTC oscilator in Processor Expert with the same frequency and 12pF Capacitor load. Now MCU goes into unhandled interrupt immediately after reset.&lt;/P&gt;&lt;P&gt;Debug is stuck here:&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;PE_ISR(Cpu_Interrupt)&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;{&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&amp;nbsp; /* This code can be changed using the CPU component property "Build Options / Unhandled int code" */&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&amp;nbsp; PE_DEBUGHALT();&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;}&lt;/P&gt;&lt;P&gt;with Cpu_Interrupt = 0x00001DF4. I think interrupt vector table ends at 0x000001DC, right? When main crystal didn't work, processor waited in an infinite loop, so I think this problem is not electrical.&lt;/P&gt;&lt;P&gt;What that could mean? I'm newbie with Freescale nad Processor Expert, so I might be missing something simple. Has anyone any idea, how to fix it and run RTC oscillator?&lt;/P&gt;&lt;P&gt;&lt;SPAN class="mce_paste_marker"&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 28 Dec 2012 10:51:31 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/Kinetis-K10-RTC-problem/m-p/218321#M3878</guid>
      <dc:creator>tomasjakubik</dc:creator>
      <dc:date>2012-12-28T10:51:31Z</dc:date>
    </item>
    <item>
      <title>Re: Kinetis K10 RTC problem</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/Kinetis-K10-RTC-problem/m-p/218322#M3879</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;the first thing to find out is: which exception has caused this?&lt;/P&gt;&lt;P&gt;Have a look at &lt;A href="http://mcuoneclipse.com/2012/02/20/oh-my-an-interrupt/" title="http://mcuoneclipse.com/2012/02/20/oh-my-an-interrupt/"&gt;Oh my! An Interrupt | MCU on Eclipse&lt;/A&gt;&amp;nbsp; how to create a handler for every interrupt vector ('own hander for every interrupt').&lt;/P&gt;&lt;P&gt;This will hopefully tell you what is causing the exception.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 28 Dec 2012 10:56:52 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/Kinetis-K10-RTC-problem/m-p/218322#M3879</guid>
      <dc:creator>BlackNight</dc:creator>
      <dc:date>2012-12-28T10:56:52Z</dc:date>
    </item>
    <item>
      <title>Re: Kinetis K10 RTC problem</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/Kinetis-K10-RTC-problem/m-p/218323#M3880</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks, that was helpful. Now I know it was Cpu_ivINT_Hard_Fault interrupt. After reset I unchecked "Run out of reset" and found that it happens in __init_hardware(). On line:&lt;/P&gt;&lt;P&gt;if ((RTC_CR &amp;amp; RTC_CR_OSCE_MASK) == 0u) { /* Only if the OSCILLATOR is not already enabled */&lt;/P&gt;&lt;P&gt;Dissasembly shows:&lt;/P&gt;&lt;P&gt;&amp;nbsp; movw r0,#0xd010&lt;/P&gt;&lt;P&gt;&amp;nbsp; movt r0,#0x4003&lt;/P&gt;&lt;P&gt;&amp;nbsp; ldr r0,[r0,#0]&lt;/P&gt;&lt;P&gt;&amp;nbsp; and r0,r0,#0x100&lt;/P&gt;&lt;P&gt;&amp;nbsp; cmp r0,#0&lt;/P&gt;&lt;P&gt;&amp;nbsp; bne __init_hardware+0x70 (0x2030); 0x00002030&lt;/P&gt;&lt;P&gt;Arrow points last to ldr r0,[r0,#0] and next it is in hardfault handler. I don't know much about Cortex assembly, but it should work. Same thing happens whnever I want to read RTC_CR. RTC_CR is at 0x4003d010 by datasheet, but is it possible this adress is wrong?&lt;/P&gt;&lt;P&gt;&lt;SPAN class="mce_paste_marker"&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="mce_paste_marker"&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 28 Dec 2012 13:55:01 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/Kinetis-K10-RTC-problem/m-p/218323#M3880</guid>
      <dc:creator>tomasjakubik</dc:creator>
      <dc:date>2012-12-28T13:55:01Z</dc:date>
    </item>
    <item>
      <title>Re: Kinetis K10 RTC problem</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/Kinetis-K10-RTC-problem/m-p/218324#M3881</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;maybe this thread might be helpful:&lt;/P&gt;&lt;P&gt;&lt;A _jive_internal="true" href="https://community.nxp.com/message/308944#308944" title="https://community.freescale.com/message/308944#308944"&gt;https://community.freescale.com/message/308944#308944&lt;/A&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 28 Dec 2012 14:07:52 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/Kinetis-K10-RTC-problem/m-p/218324#M3881</guid>
      <dc:creator>BlackNight</dc:creator>
      <dc:date>2012-12-28T14:07:52Z</dc:date>
    </item>
    <item>
      <title>Re: Kinetis K10 RTC problem</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/Kinetis-K10-RTC-problem/m-p/218325#M3882</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I know processor exits on ldr instruction with right address in r register. I have even tried calling ldr in supervisor mode with the same result. Is there any reason why simple ldr instruction should interrupt with hardfault? Looks like RTC_CR doesn't exist in this processor.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;RTC on multiple processors seems to be little quirky. There is errata for mask 4N30D:&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;e2576: RTC: When the RTC is configured to allow supervisor access only, the write and read access registers can be modified in user mode&lt;/LI&gt;&lt;LI&gt;Errata type: Errata&lt;/LI&gt;&lt;LI&gt;Description: When the RTC is configured to allow supervisor access only, the write and read access registers can be modified in user mode. A bus error is still generated.&lt;/LI&gt;&lt;LI&gt;Workaround: RTC supervisor mode access only option is not supported.&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;Perhaps that is why PE doesn't bother with setting SUP bit even though reset state is supervisor mode write access only. Either way, reading should work in both modes. Unless there is some other error yet undocumented in errata.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 28 Dec 2012 15:40:07 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/Kinetis-K10-RTC-problem/m-p/218325#M3882</guid>
      <dc:creator>tomasjakubik</dc:creator>
      <dc:date>2012-12-28T15:40:07Z</dc:date>
    </item>
    <item>
      <title>Re: Kinetis K10 RTC problem</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/Kinetis-K10-RTC-problem/m-p/218326#M3883</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;BR /&gt;&amp;nbsp; this can be caused by low or no voltage on VBAT pin.&lt;/P&gt;&lt;P&gt;&lt;SPAN lang="JA" style="font-family: TimesLTStd-Roman; font-size: 14pt;"&gt;&lt;SPAN lang="JA" style="font-family: TimesLTStd-Roman; font-size: 14pt;"&gt;&lt;SPAN lang="JA" style="font-family: TimesLTStd-Roman; font-size: 14pt;"&gt;&amp;nbsp; &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P align="left"&gt;From reference manual:&lt;/P&gt;&lt;P align="left"&gt;Any attempt to access an RTC register (except the access control registers) when VBAT&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P align="left"&gt;is powered down, when the RTC is electrically isolated, or when VBAT POR is asserted,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;will result in a bus error.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="mce_paste_marker"&gt;MVa&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 28 Dec 2012 21:03:51 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/Kinetis-K10-RTC-problem/m-p/218326#M3883</guid>
      <dc:creator>MVa</dc:creator>
      <dc:date>2012-12-28T21:03:51Z</dc:date>
    </item>
    <item>
      <title>Re: Kinetis K10 RTC problem</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/Kinetis-K10-RTC-problem/m-p/218327#M3884</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thank you,&lt;/P&gt;&lt;P&gt;I have connected Vcc and Vbat and RTC is running.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I should have read more carefuly. You must hear that a lot here :smileyhappy:.&lt;/P&gt;&lt;P&gt;Thanks a lot, Tomas&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 28 Dec 2012 21:17:14 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/Kinetis-K10-RTC-problem/m-p/218327#M3884</guid>
      <dc:creator>tomasjakubik</dc:creator>
      <dc:date>2012-12-28T21:17:14Z</dc:date>
    </item>
  </channel>
</rss>

