S32k324 Rtc time keep up

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

S32k324 Rtc time keep up

Jump to solution
1,879 Views
Prasad_330
Contributor III

We are working the s32k324 controller RTC.

In our project we are able to put the controller into Standby and wakeup By CAN or UART 

But after wakeup from the Standby mode, if we read the RTC value we are getting the default value. 

Where we are expecting the current time from the RTC after wakeup from standby mode.

Kindly suggest any additional configuration has to done.

0 Kudos
Reply
1 Solution
1,803 Views
Julián_AragónM
NXP TechSupport
NXP TechSupport

Hi @Prasad_330,

Are you storing this value in any variable or directly reading the register? Keep in mind that if you are storing this in a variable the RAM ECC initialization may delete the values upon each wakeup.

Also, I've messaged you privately through this community regarding an example project.

Best regards,
Julián

View solution in original post

0 Kudos
Reply
5 Replies
1,856 Views
Julián_AragónM
NXP TechSupport
NXP TechSupport

Hi @Prasad_330,

Could you confirm if SIRC is selected by CLKSEL in RTCC register (value 0b01). Also please confirm if RTC is enabled by reading CNTEN in RTCC register.

You can also try reading the status register of reset source (MC_RGM.DES and MC_RGM.FES) to discard if any destructive reset is happening instead of functional.

Best regards,
Julián

 

0 Kudos
Reply
1,833 Views
Prasad_330
Contributor III

Yes SIRC is selected by CLKSEL in RTCC register (value 0b01).

Yes RTC is enabled by writing one in CNTEN in RTCC register.

Also SIRC is enabled in the stand y mode

 

0 Kudos
Reply
1,804 Views
Julián_AragónM
NXP TechSupport
NXP TechSupport

Hi @Prasad_330,

Are you storing this value in any variable or directly reading the register? Keep in mind that if you are storing this in a variable the RAM ECC initialization may delete the values upon each wakeup.

Also, I've messaged you privately through this community regarding an example project.

Best regards,
Julián

0 Kudos
Reply
605 Views
dujunqiu
Contributor I
hi, can you give me the example project?
0 Kudos
Reply
1,686 Views
Prasad_330
Contributor III

Thanks Julian,

Your inputs were very useful.

we used "Rtc_Ip_ConfigurePeriodicInterrupt" function which helped us to keep up the time

and generates the interrupt periodically during Standby mode. 

%3CLINGO-SUB%20id%3D%22lingo-sub-2007062%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3ES32k324%20Rtc%20time%20keep%20up%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2007062%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3EWe%20are%20working%20the%20s32k324%20controller%20RTC.%3C%2FP%3E%3CP%3EIn%20our%20project%20we%20are%20able%20to%20put%20the%20controller%20into%20Standby%20and%20wakeup%20By%20CAN%20or%20UART%26nbsp%3B%3C%2FP%3E%3CP%3EBut%20after%20wakeup%20from%20the%20Standby%20mode%2C%20if%20we%20read%20the%20RTC%20value%20we%20are%20getting%20the%20default%20value.%26nbsp%3B%3C%2FP%3E%3CP%3EWhere%20we%20are%20expecting%20the%20current%20time%20from%20the%20RTC%20after%20wakeup%20from%20standby%20mode.%3C%2FP%3E%3CP%3EKindly%20suggest%20any%20additional%20configuration%20has%20to%20done.%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2013299%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3ERe%3A%20S32k324%20Rtc%20time%20keep%20up%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2013299%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3EThanks%20Julian%2C%3C%2FP%3E%3CP%3EYour%20inputs%20were%20very%20useful.%3C%2FP%3E%3CP%3Ewe%20used%20%22Rtc_Ip_ConfigurePeriodicInterrupt%22%20function%20which%20helped%20us%20to%20keep%20up%20the%20time%3C%2FP%3E%3CP%3Eand%20generates%20the%20interrupt%20periodically%20during%20Standby%20mode.%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2008415%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3ERe%3A%20S32k324%20Rtc%20time%20keep%20up%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2008415%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3EHi%26nbsp%3B%3CA%20href%3D%22https%3A%2F%2Fcommunity.nxp.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F229543%22%20target%3D%22_blank%22%3E%40Prasad_330%3C%2FA%3E%2C%3C%2FP%3E%0A%3CP%3EAre%20you%20storing%20this%20value%20in%20any%20variable%20or%20directly%20reading%20the%20register%3F%20Keep%20in%20mind%20that%20if%20you%20are%20storing%20this%20in%20a%20variable%20the%20RAM%20ECC%20initialization%20may%20delete%20the%20values%20upon%20each%20wakeup.%3C%2FP%3E%0A%3CP%3EAlso%2C%20I've%20messaged%20you%20privately%20through%20this%20community%20regarding%20an%20example%20project.%3C%2FP%3E%0A%3CP%3EBest%20regards%2C%3CBR%20%2F%3EJuli%C3%A1n%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2008116%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3ERe%3A%20S32k324%20Rtc%20time%20keep%20up%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2008116%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3E%3CSPAN%3EYes%26nbsp%3B%3C%2FSPAN%3E%3CSPAN%3ESIRC%20is%20selected%20by%20CLKSEL%20in%20RTCC%20register%20(value%200b01).%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3CSPAN%3EYes%20RTC%20is%20enabled%20by%20writing%20one%20in%20CNTEN%20in%20RTCC%20register.%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3CSPAN%3EAlso%20SIRC%20is%20enabled%20in%20the%20stand%20y%20mode%3C%2FSPAN%3E%3C%2FP%3E%3CBR%20%2F%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2007429%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3ERe%3A%20S32k324%20Rtc%20time%20keep%20up%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2007429%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3EHi%26nbsp%3B%3CA%20href%3D%22https%3A%2F%2Fcommunity.nxp.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F229543%22%20target%3D%22_blank%22%3E%40Prasad_330%3C%2FA%3E%2C%3C%2FP%3E%0A%3CP%3ECould%20you%20confirm%20if%26nbsp%3B%3CSPAN%3ESIRC%20is%20selected%20by%20CLKSEL%20in%20RTCC%20register%20(value%200b01).%20Also%20please%20confirm%20if%26nbsp%3BRTC%20is%20enabled%20by%20reading%20CNTEN%20in%20RTCC%20register.%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3E%3CSPAN%3EYou%20can%20also%20try%20reading%26nbsp%3Bthe%20status%20register%20of%20reset%20source%20(MC_RGM.DES%20and%20MC_RGM.FES)%20to%20discard%20if%20any%20destructive%20reset%20is%20happening%20instead%20of%20functional.%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3E%3CSPAN%3EBest%20regards%2C%3CBR%20%2F%3EJuli%C3%A1n%3C%2FSPAN%3E%3C%2FP%3E%0A%3CBR%20%2F%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2156645%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%20translate%3D%22no%22%3ERe%3A%20S32k324%20Rtc%20time%20keep%20up%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2156645%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3Ehi%2C%20can%20you%20give%20me%20the%20example%20project%3F%3C%2FLINGO-BODY%3E