S32K324 RTC value not preserved after sleep

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

S32K324 RTC value not preserved after sleep

Jump to solution
1,196 Views
the_chuck77
Contributor II

Hi,

I am attempting to use the RTC with to keep the approximate current time. I need this time to be preserved through sleep after being set once.

With my current set up the current time in not preserved during sleep. I ensured the SIRC is selected as the clock source for the RTC, as well as it being enable during standby mode.

However, after a wake the current time resets back to 1/1/1970. How do I go about preserving the current time value? I can see within the documentation it says, "seamless RTC operation across functional reset with the clock sources SIRC and SXOSC" but it does not go into detail on how to achieve this functionality.

Could someone please elaborate on how to configure the RTC to achieve this, and/or if what I am attempting to do is not supported with this hardware. Thanks.

0 Kudos
Reply
1 Solution
1,175 Views
the_chuck77
Contributor II

I found the option hidden as "GPT Standby Wakeup Support", I am not using it as a wakeup source so it did not seem relevant.

Activating this has preserved the counter through sleep/wake cycles. However, additional code (as well as writable non-volatile memory) was needed to preserve and reload the current time on a wake.

View solution in original post

0 Kudos
Reply
1 Reply
1,176 Views
the_chuck77
Contributor II

I found the option hidden as "GPT Standby Wakeup Support", I am not using it as a wakeup source so it did not seem relevant.

Activating this has preserved the counter through sleep/wake cycles. However, additional code (as well as writable non-volatile memory) was needed to preserve and reload the current time on a wake.

0 Kudos
Reply
%3CLINGO-SUB%20id%3D%22lingo-sub-1965805%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3ES32K324%20RTC%20value%20not%20preserved%20after%20sleep%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1965805%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3EHi%2C%3C%2FP%3E%3CP%3EI%20am%20attempting%20to%20use%20the%20RTC%20with%20to%20keep%20the%20approximate%20current%20time.%20I%20need%20this%20time%20to%20be%20preserved%20through%20sleep%20after%20being%20set%20once.%3C%2FP%3E%3CP%3EWith%20my%20current%20set%20up%20the%20current%20time%20in%20not%20preserved%20during%20sleep.%20I%20ensured%20the%20SIRC%20is%20selected%20as%20the%20clock%20source%20for%20the%20RTC%2C%20as%20well%20as%20it%20being%20enable%20during%20standby%20mode.%3C%2FP%3E%3CP%3EHowever%2C%20after%20a%20wake%20the%20current%20time%20resets%20back%20to%201%2F1%2F1970.%20How%20do%20I%20go%20about%20preserving%20the%20current%20time%20value%3F%20I%20can%20see%20within%20the%20documentation%20it%20says%2C%20%22seamless%20RTC%20operation%20across%20functional%20reset%20with%20the%20clock%20sources%20SIRC%20and%20SXOSC%22%20but%20it%20does%20not%20go%20into%20detail%20on%20how%20to%20achieve%20this%20functionality.%3C%2FP%3E%3CP%3ECould%20someone%20please%20elaborate%20on%20how%20to%20configure%20the%20RTC%20to%20achieve%20this%2C%20and%2For%20if%20what%20I%20am%20attempting%20to%20do%20is%20not%20supported%20with%20this%20hardware.%20Thanks.%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1966431%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3ERe%3A%20S32K324%20RTC%20value%20not%20preserved%20after%20sleep%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1966431%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3EI%20found%20the%20option%20hidden%20as%20%22GPT%20Standby%20Wakeup%20Support%22%2C%20I%20am%20not%20using%20it%20as%20a%20wakeup%20source%20so%20it%20did%20not%20seem%20relevant.%3C%2FP%3E%3CP%3EActivating%20this%20has%20preserved%20the%20counter%20through%20sleep%2Fwake%20cycles.%20However%2C%20additional%20code%20(as%20well%20as%20writable%20non-volatile%20memory)%20was%20needed%20to%20preserve%20and%20reload%20the%20current%20time%20on%20a%20wake.%3C%2FP%3E%3C%2FLINGO-BODY%3E