S32K148 Internal RTC

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

S32K148 Internal RTC

3,712件の閲覧回数
ambarish_hundek
Contributor II

Hello NXP Team,

We are  using Internal RTC in our project.

I need to know about the accuracy of the internal  RTC with Internal clock?

can we achieve 1ms accuracy per day with internal RTC (internal clock for RTC)?

suppose if we use external crystal of 32.768K for Internal RTC (External clock to internal RTC via PTA 7), can we achieve 1ms accuracy ?

Please let us know regarding accuracy.

Thank you.

Regards,

Ambarish

ラベル(1)
タグ(1)
0 件の賞賛
返信
8 返答(返信)

3,262件の閲覧回数
freddy_ben-zeev
Contributor IV

First - you have to distinguish two kinds of accuracy (at least...) - frequency accuracy and frequency stability. In any case 1 msec per day comes out to about 11 ppb (parts per billion). I never saw a 32.768k kHz crystal with such stability.

0 件の賞賛
返信

3,262件の閲覧回数
lukaszadrapa
NXP TechSupport
NXP TechSupport

Hi,

to achieve high accuracy, it would be needed to use external oscillator 32.768kHz with CMOS output which can be connected to RTC_CLKIN pin.
But let’s do some calculation:
If oscillator with 10ppm accuracy is used, the frequency can deviate between 32.76767232kHz (32.768kHz * 0.999990) and 32.76832768kHz (32.768kHz * 1.000010).
Because one day has 86400 seconds:
86400 * 0.000010 = 0.864s per day
This is quite far away from your requirement 1ms but it’s worst case if accuracy of oscillator is 10ppm. Even if you find a version with 3ppm, it’s still about 0.26s/day).

So, this is a matter of used oscillator, not of the microcontroller.

Hope this helps.

Regards,
Lukas

0 件の賞賛
返信

3,262件の閲覧回数
AdinathJadhav
Contributor I

Hi Lukas,

Does this apply in all the modes the NXPS32K148 is in?

i.e. is this figure independent of mode in which S32K148 is running?

We want to know if their is any impact on accuracy in very low power mode in fact lowest when no SW is active/running in S32K148.

Regards,

Adinath

0 件の賞賛
返信

3,262件の閲覧回数
lukaszadrapa
NXP TechSupport
NXP TechSupport

Hi,

accuracy is not affected by the microcontroller and it's independent of its modes. The accuracy is given by used oscillator.

Regards,

Lukas

0 件の賞賛
返信

3,262件の閲覧回数
ambarish_hundek
Contributor II

Hi,

I have configured RTC with external clock .

I 've used a crystal oscillator of 32.768KHZ which connected to RTC_CLKIN Pin.

 

My Configuration as below.

 

1.

pastedImage_1.png

2.

pastedImage_2.png

3.

pastedImage_3.png

 

4.In addition, I have configured the PA7's mux mode to PORT_MUX_ALT4 for Enabling RTC CLK_IN.

{
        .base          = PORTA,
        .pinPortIdx    = 7u,
        .pullConfig    = PORT_INTERNAL_PULL_NOT_ENABLED,
        .passiveFilter = false,
        .driveSelect   = PORT_LOW_DRIVE_STRENGTH,
        .mux           = PORT_MUX_ALT4,
        .pinLock       = false,
        .intConfig     = PORT_DMA_INT_DISABLED,
        .clearIntFlag  = false,
        .gpioBase      = PTA,
        .direction     = GPIO_INPUT_DIRECTION,
        .digitalFilter = false,
    },

started the counter and read the RTC timer value , but RTC is not functional and reading the set time only .

Regards,

Ambarish

0 件の賞賛
返信

3,262件の閲覧回数
lukaszadrapa
NXP TechSupport
NXP TechSupport
0 件の賞賛
返信

3,262件の閲覧回数
ambarish_hundek
Contributor II

Hello Lukas, 

configuring the internal clock to internal RTC , I have set the RTC calendar and start the counter.

after power on reset , I am reading the RTC calendar, but it is reading the Year 1970 and different time values, it is not reading the last set values or may be last calendar time (before power on Reset).

Regards,

Ambarish

0 件の賞賛
返信

3,262件の閲覧回数
lukaszadrapa
NXP TechSupport
NXP TechSupport

Hi,

from RM:

pastedImage_1.png

RTC works in all modes (including low power modes) and through reset but not without power.

If you want to keep time&date also when the power is off, you need external real time circuit with battery backup.

Regards,

Lukas

0 件の賞賛
返信