<?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 fsl_rtc... Why do not save time? in Processor Expert Software</title>
    <link>https://community.nxp.com/t5/Processor-Expert-Software/fsl-rtc-Why-do-not-save-time/m-p/369191#M2838</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi to all.&lt;/P&gt;&lt;P&gt;I'm developing on K20; I use KDS 2.0.0&lt;/P&gt;&lt;P&gt;I use the RTC_LDD component for Real-Time-Clock without using KSDK (for K20 KSDK is not ready yet...).&lt;/P&gt;&lt;P&gt;I set via the time via my Firmware and I turn off my device for two days.... and turn on... It give me the correct date and time! &lt;/P&gt;&lt;P&gt;Now I try to use KSDK 1.1.0 setting K60 uP instead K20; all seems work correctly but fsl_rtc component don't work well...&lt;/P&gt;&lt;P&gt;For the first thing I see that If i do not explicit do this instruction:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; uint32_t rtcBaseAddr = g_rtcBaseAddr[FSL_RTCTIMER1];&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; RTC_HAL_EnableCounter(rtcBaseAddr, true);&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;the automatic init procedure do not enable it automatically.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The second (and very big problem....) is that if I turn off and turn on my device it will lost my time!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I suppose that this component do not work right... what I can do for preserve my time during turn off?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Many thanks,&lt;/P&gt;&lt;P&gt;Massimiliano&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 09 Mar 2015 10:53:09 GMT</pubDate>
    <dc:creator>holyhope</dc:creator>
    <dc:date>2015-03-09T10:53:09Z</dc:date>
    <item>
      <title>fsl_rtc... Why do not save time?</title>
      <link>https://community.nxp.com/t5/Processor-Expert-Software/fsl-rtc-Why-do-not-save-time/m-p/369191#M2838</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi to all.&lt;/P&gt;&lt;P&gt;I'm developing on K20; I use KDS 2.0.0&lt;/P&gt;&lt;P&gt;I use the RTC_LDD component for Real-Time-Clock without using KSDK (for K20 KSDK is not ready yet...).&lt;/P&gt;&lt;P&gt;I set via the time via my Firmware and I turn off my device for two days.... and turn on... It give me the correct date and time! &lt;/P&gt;&lt;P&gt;Now I try to use KSDK 1.1.0 setting K60 uP instead K20; all seems work correctly but fsl_rtc component don't work well...&lt;/P&gt;&lt;P&gt;For the first thing I see that If i do not explicit do this instruction:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; uint32_t rtcBaseAddr = g_rtcBaseAddr[FSL_RTCTIMER1];&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; RTC_HAL_EnableCounter(rtcBaseAddr, true);&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;the automatic init procedure do not enable it automatically.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The second (and very big problem....) is that if I turn off and turn on my device it will lost my time!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I suppose that this component do not work right... what I can do for preserve my time during turn off?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Many thanks,&lt;/P&gt;&lt;P&gt;Massimiliano&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 09 Mar 2015 10:53:09 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Processor-Expert-Software/fsl-rtc-Why-do-not-save-time/m-p/369191#M2838</guid>
      <dc:creator>holyhope</dc:creator>
      <dc:date>2015-03-09T10:53:09Z</dc:date>
    </item>
    <item>
      <title>Re: fsl_rtc... Why do not save time?</title>
      <link>https://community.nxp.com/t5/Processor-Expert-Software/fsl-rtc-Why-do-not-save-time/m-p/369192#M2839</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;The issue of RTC not retaining its time is fixed in the upcoming KSDK 1.2 release, the problem was identified to a reset call issued in the HAL_Init function. Below is a patch that could be applied to the KSDK 1.1 RTC driver to fix this issue.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;diff --git a/platform/hal/src/rtc/fsl_rtc_hal.c b/platform/hal/src/rtc/fsl_rtc_hal.c&lt;/P&gt;&lt;P&gt;index 905b59d..8fc188c 100644&lt;/P&gt;&lt;P&gt;--- a/platform/hal/src/rtc/fsl_rtc_hal.c&lt;/P&gt;&lt;P&gt;+++ b/platform/hal/src/rtc/fsl_rtc_hal.c&lt;/P&gt;&lt;P&gt;@@ -263,15 +263,15 @@ void RTC_HAL_Disable(uint32_t rtcBaseAddr)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; void RTC_HAL_Init(uint32_t rtcBaseAddr)&lt;/P&gt;&lt;P&gt; {&lt;/P&gt;&lt;P&gt;-&amp;nbsp;&amp;nbsp;&amp;nbsp; uint32_t seconds = 0x1;&lt;/P&gt;&lt;P&gt;-&lt;/P&gt;&lt;P&gt;-&amp;nbsp;&amp;nbsp;&amp;nbsp; /* Resets the RTC registers except for the SWR bit */&lt;/P&gt;&lt;P&gt;-&amp;nbsp;&amp;nbsp;&amp;nbsp; RTC_HAL_SoftwareReset(rtcBaseAddr);&lt;/P&gt;&lt;P&gt;-&amp;nbsp;&amp;nbsp;&amp;nbsp; RTC_HAL_SoftwareResetFlagClear(rtcBaseAddr);&lt;/P&gt;&lt;P&gt;-&lt;/P&gt;&lt;P&gt;-&amp;nbsp;&amp;nbsp;&amp;nbsp; /* Set TSR register to 0x1 to avoid the TIF bit being set in the SR register */&lt;/P&gt;&lt;P&gt;-&amp;nbsp;&amp;nbsp;&amp;nbsp; RTC_HAL_SetSecsReg(rtcBaseAddr, seconds);&lt;/P&gt;&lt;P&gt;+&amp;nbsp;&amp;nbsp;&amp;nbsp; if(BR_RTC_SR_TIF(rtcBaseAddr))&lt;/P&gt;&lt;P&gt;+&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;/P&gt;&lt;P&gt;+&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; /* Resets the RTC registers except for the SWR bit */&lt;/P&gt;&lt;P&gt;+&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; RTC_HAL_SoftwareReset(rtcBaseAddr);&lt;/P&gt;&lt;P&gt;+&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; RTC_HAL_SoftwareResetFlagClear(rtcBaseAddr);&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;+&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; /* Set TSR register to 0x1 to avoid the TIF bit being set in the SR register */&lt;/P&gt;&lt;P&gt;+&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; RTC_HAL_SetSecsReg(rtcBaseAddr, 1U);&lt;/P&gt;&lt;P&gt;+&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; /* Clear the interrupt enable register */&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; RTC_HAL_SetSecsIntCmd(rtcBaseAddr, false);&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; RTC_HAL_SetAlarmIntCmd(rtcBaseAddr, false);&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 10 Mar 2015 19:37:39 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Processor-Expert-Software/fsl-rtc-Why-do-not-save-time/m-p/369192#M2839</guid>
      <dc:creator>maheshmahadeva1</dc:creator>
      <dc:date>2015-03-10T19:37:39Z</dc:date>
    </item>
    <item>
      <title>Re: fsl_rtc... Why do not save time?</title>
      <link>https://community.nxp.com/t5/Processor-Expert-Software/fsl-rtc-Why-do-not-save-time/m-p/369193#M2840</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Ok many thanks! &lt;/P&gt;&lt;P&gt;Massimiliano&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 11 Mar 2015 08:37:34 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Processor-Expert-Software/fsl-rtc-Why-do-not-save-time/m-p/369193#M2840</guid>
      <dc:creator>holyhope</dc:creator>
      <dc:date>2015-03-11T08:37:34Z</dc:date>
    </item>
  </channel>
</rss>

