S32K344 resets every three days or RTC system clock returns to initial value every three days

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

S32K344 resets every three days or RTC system clock returns to initial value every three days

Jump to solution
1,817 Views
SCoder41
Contributor III

(S32K344) I implemented a function where the RTC system clock was set to an initial value (2025-3-11 15:25:0), and then the current system time was obtained every 0.5 seconds and stored on the SD card. I tested continuously for 7 days, but after 7 days, I found that the logs in the SD card would return to the initial value of 2025-3-11 15:25:0 every time it reached [2025-3-13, 4:41:57]. Is it because the system reset or is it just an issue with RTC?

8.png

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

Hi @SCoder41,

Just from the log, I am unable to pinpoint if the issue is mainly the RTC or the MCU. Could you share the code (either here, or by a private message). If not, could you share exactly what the code does? 

Also, if the reset source is not a SW reset, (i.e. hardware reset), the counter value will be reset. You must configure either SIRC or SXOSC, and perform SW reset to avoid resetting the counter: Solved: Does the S32K312 RTC support system time keeping at reset? - NXP Community

Best regards,
Julián

View solution in original post

0 Kudos
Reply
3 Replies
1,792 Views
Julián_AragónM
NXP TechSupport
NXP TechSupport

Hi @SCoder41,

Just from the log, I am unable to pinpoint if the issue is mainly the RTC or the MCU. Could you share the code (either here, or by a private message). If not, could you share exactly what the code does? 

Also, if the reset source is not a SW reset, (i.e. hardware reset), the counter value will be reset. You must configure either SIRC or SXOSC, and perform SW reset to avoid resetting the counter: Solved: Does the S32K312 RTC support system time keeping at reset? - NXP Community

Best regards,
Julián

0 Kudos
Reply
1,771 Views
SCoder41
Contributor III
I have sent you the code via private message.
0 Kudos
Reply
1,776 Views
SCoder41
Contributor III
My code size exceeds 25MB, is there any other way to send it to you?
0 Kudos
Reply
%3CLINGO-SUB%20id%3D%22lingo-sub-2063580%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3ES32K344%20resets%20every%20three%20days%20or%20RTC%20system%20clock%20returns%20to%20initial%20value%20every%20three%20days%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2063580%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3E(S32K344)%20I%20implemented%20a%20function%20where%20the%20RTC%20system%20clock%20was%20set%20to%20an%20initial%20value%20(2025-3-11%2015%3A25%3A0)%2C%20and%20then%20the%20current%20system%20time%20was%20obtained%20every%200.5%20seconds%20and%20stored%20on%20the%20SD%20card.%20I%20tested%20continuously%20for%207%20days%2C%20but%20after%207%20days%2C%20I%20found%20that%20the%20logs%20in%20the%20SD%20card%20would%20return%20to%20the%20initial%20value%20of%202025-3-11%2015%3A25%3A0%20every%20time%20it%20reached%20%5B2025-3-13%2C%204%3A41%3A57%5D.%20Is%20it%20because%20the%20system%20reset%20or%20is%20it%20just%20an%20issue%20with%20RTC%3F%3C%2FP%3E%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%228.png%22%20style%3D%22width%3A%20358px%3B%22%3E%3Cspan%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%228.png%22%20style%3D%22width%3A%20358px%3B%22%3E%3Cimg%20src%3D%22https%3A%2F%2Fcommunity.nxp.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F328576i75413CD48A3FDAA3%2Fimage-size%2Flarge%3Fv%3Dv2%26amp%3Bpx%3D999%22%20role%3D%22button%22%20title%3D%228.png%22%20alt%3D%228.png%22%20%2F%3E%3C%2Fspan%3E%3C%2FSPAN%3E%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2064239%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3ERe%3A%20S32K344%20resets%20every%20three%20days%20or%20RTC%20system%20clock%20returns%20to%20initial%20value%20every%20three%20days%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2064239%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3EI%20have%20sent%20you%20the%20code%20via%20private%20message.%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2064194%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3ERe%3A%20S32K344%20resets%20every%20three%20days%20or%20RTC%20system%20clock%20returns%20to%20initial%20value%20every%20three%20days%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2064194%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3EMy%20code%20size%20exceeds%2025MB%2C%20is%20there%20any%20other%20way%20to%20send%20it%20to%20you%3F%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2064138%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3ERe%3A%20S32K344%20resets%20every%20three%20days%20or%20RTC%20system%20clock%20returns%20to%20initial%20value%20every%20three%20days%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2064138%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%2F230508%22%20target%3D%22_blank%22%3E%40SCoder41%3C%2FA%3E%2C%3C%2FP%3E%0A%3CP%3EJust%20from%20the%20log%2C%20I%20am%20unable%20to%20pinpoint%20if%20the%20issue%20is%20mainly%20the%20RTC%20or%20the%20MCU.%20Could%20you%20share%20the%20code%20(either%20here%2C%20or%20by%20a%20private%20message).%20If%20not%2C%20could%20you%20share%20exactly%20what%20the%20code%20does%3F%26nbsp%3B%3C%2FP%3E%0A%3CP%3EAlso%2C%20if%20the%20reset%20source%20is%26nbsp%3B%3CSTRONG%3Enot%3C%2FSTRONG%3E%20a%20SW%20reset%2C%20(i.e.%20hardware%20reset)%2C%20the%20counter%20value%20will%20be%20reset.%20You%20must%20configure%20either%20SIRC%20or%20SXOSC%2C%20and%20perform%20SW%20reset%20to%20avoid%20resetting%20the%20counter%3A%26nbsp%3B%3CA%20href%3D%22https%3A%2F%2Fcommunity.nxp.com%2Ft5%2FS32K%2FDoes-the-S32K312-RTC-support-system-time-keeping-at-reset%2Ftd-p%2F1650987%3Flightbox-message-images-1651330%3D223411i2393920E7738C70B%22%20target%3D%22_blank%22%3ESolved%3A%20Does%20the%20S32K312%20RTC%20support%20system%20time%20keeping%20at%20reset%3F%20-%20NXP%20Community%3C%2FA%3E%3C%2FP%3E%0A%3CP%3EBest%20regards%2C%3CBR%20%2F%3EJuli%C3%A1n%3C%2FP%3E%3C%2FLINGO-BODY%3E