<?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: Counter in KL26Z128 in Kinetis Microcontrollers</title>
    <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/Counter-in-KL26Z128/m-p/505620#M31715</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Rafael &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The TOF and TIF bit are read only, see the RTC_SR field descriptions.&lt;/P&gt;&lt;P&gt;This bit is cleared by writing the TSR register when the time counter is disabled.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="RTC_SR.jpg"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/53321i7CB6052205422961/image-size/large?v=v2&amp;amp;px=999" role="button" title="RTC_SR.jpg" alt="RTC_SR.jpg" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;And make sure the clock source you selected is active.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="RTC clock generation.jpg"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/53354i4E8FD03A6AB1F996/image-size/large?v=v2&amp;amp;px=999" role="button" title="RTC clock generation.jpg" alt="RTC clock generation.jpg" /&gt;&lt;/span&gt;&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;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 15 Feb 2016 10:27:08 GMT</pubDate>
    <dc:creator>Robin_Shen</dc:creator>
    <dc:date>2016-02-15T10:27:08Z</dc:date>
    <item>
      <title>Counter in KL26Z128</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/Counter-in-KL26Z128/m-p/505619#M31714</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi!&lt;/P&gt;&lt;P&gt;I'm trying to read the RTC Time Preacaler Register, but it only returns zeros. I'm setting SR[TOF] and SR[TIF] to zero to avoid this problem, but this have not been effective.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Below, my code:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;void RTC_init (void){&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; SIM_SCGC6 |= (SIM_SCGC6_RTC_MASK);&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; RTC_SR |= (RTC_SR_TCE_MASK|~RTC_SR_TIF_MASK|~RTC_SR_TOF_MASK); &lt;/P&gt;&lt;P&gt;}&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;int RTC_counter(void){&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; return RTC_TPR;&lt;/P&gt;&lt;P&gt;}&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Anyone knows where is the error?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks in advance,&lt;/P&gt;&lt;P&gt;Rafael&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 12 Feb 2016 03:32:11 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/Counter-in-KL26Z128/m-p/505619#M31714</guid>
      <dc:creator>rafaeldalazen</dc:creator>
      <dc:date>2016-02-12T03:32:11Z</dc:date>
    </item>
    <item>
      <title>Re: Counter in KL26Z128</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/Counter-in-KL26Z128/m-p/505620#M31715</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Rafael &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The TOF and TIF bit are read only, see the RTC_SR field descriptions.&lt;/P&gt;&lt;P&gt;This bit is cleared by writing the TSR register when the time counter is disabled.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="RTC_SR.jpg"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/53321i7CB6052205422961/image-size/large?v=v2&amp;amp;px=999" role="button" title="RTC_SR.jpg" alt="RTC_SR.jpg" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;And make sure the clock source you selected is active.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="RTC clock generation.jpg"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/53354i4E8FD03A6AB1F996/image-size/large?v=v2&amp;amp;px=999" role="button" title="RTC clock generation.jpg" alt="RTC clock generation.jpg" /&gt;&lt;/span&gt;&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;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 15 Feb 2016 10:27:08 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/Counter-in-KL26Z128/m-p/505620#M31715</guid>
      <dc:creator>Robin_Shen</dc:creator>
      <dc:date>2016-02-15T10:27:08Z</dc:date>
    </item>
  </channel>
</rss>

