iMX6 RTC late after waking from sleep

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

iMX6 RTC late after waking from sleep

1,082 Views
mixa
Contributor III

We have discovered on our custom board using iMX6DualLite that RTC is getting late for a few seconds after waking up from sleep. For the reference we have used SabreSD platform which also has this problem. If the device is awake constantly than RTC is doing fine so I do not think it is a calibration/capacitance problem.

I have not figured out from the documentation which RTC is working when iMX is wake/sleep. I understand there is HP and LP RTC.

On the other hand the RTC SVNS driver in kernel (3.0.53 and newer) does not comply with the reference manual. For example following is not mentioned in ref manual:

#define    SNVS_LPSRTCMR    0x50    /* LP Secure Real Time Counter MSB Register */

#define    SNVS_LPSRTCLR    0x54    /* LP Secure Real Time Counter LSB Register */

#define    SNVS_LPCR_SRTC_ENV    (1 << 0)

#define    SNVS_LPCR_LPTA_EN        (1 << 1)

#define    SNVS_LPCR_LPWUI_EN    (1 << 3)

Can someone explain what happens when iMX goes to sleep and how RTC counts the time in sleep?

Labels (4)
0 Kudos
Reply
3 Replies

780 Views
mixa
Contributor III

Hi,

The RTC is late approximately 4-6 seconds after 12 hours of sleep. I have let the device to sleep for ~30minutes and it showed 1-2 seconds late to real time.

We are using 32kHz external crystal, and we have 18pf capacitors (same as on SabreSD board).

I do not need the registers specifically, but how can I calibrate the RTC and why it is going late?

Regards,

Mihailo

0 Kudos
Reply

780 Views
gusarambula
NXP TechSupport
NXP TechSupport

Hello Mihailo Milenkovic,

It seems odd that you’re having RTC delays and that they are proportionally bigger in shorter sleep intervals. Would you please tell us how you enter sleep mode? Which OS are you using?

Also, have you checked that the 32K oscillator and SNVS voltages are present while putting the processor to sleep and while it’s sleeping? Maybe the SNVS may be not sufficient if using a battery or supper cap and this is causing the delay.

There is a calibration value on the RTC registers but it’s unlikely that it would help as this delay does not occur during normal operation.

Regards,

0 Kudos
Reply

780 Views
gusarambula
NXP TechSupport
NXP TechSupport

Hello Mihailo Milenkovic,

Would you please provide more details on how much is the RTC delayed and after how much time of sleep?  Are you using an external 32kHz crystal, a 32kHz external oscillator or the on-chip internal oscillator?

The registers can be found on the i.MX6 Security Reference Manual, which is regulated but you may obtain access if you sign an NDA.

Regards,

0 Kudos
Reply