LPC55S69: how to check if RTC is initialized ?

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

LPC55S69: how to check if RTC is initialized ?

658 Views
EugeneHiihtaja
Senior Contributor I

Hello !

Looks like RTC dosn't have so much status flags.

But what is proper way to check if it initialized already ?

Just  enable clock and check year value for example:

CLOCK_EnableClock(kCLOCK_Rtc);
RTC_GetDatetime(RTC, &date);

if ((date.year < 2019)

{

 // Not initialized ?

}

0 Kudos
4 Replies

539 Views
ZhangJennie
NXP TechSupport
NXP TechSupport

HI Eugene Hiihtaja

If RTC is successfully enabled, the RTC and its oscillator continue running in all reduced power modes as long as power is supplied to the device. Therefore, the 32 kHz output is always available to be enabled for syscon clock generation, Once enabled, the 32 kHz clock can be selected for the system clock or be observed through the CLKOUT pin.

In practice, we have a led on CLKOUT pin, or measure it with scope, to verify if RTC works normally.


Have a great day,
Jun Zhang

-------------------------------------------------------------------------------
Note:
- If this post answers your question, please click the "Mark Correct" button. Thank you!

- We are following threads for 7 weeks after the last post, later replies are ignored
Please open a new thread and refer to the closed one, if you have a related question at a later point in time.
-------------------------------------------------------------------------------

0 Kudos

539 Views
chad_pham
Contributor I

Hi Jun Zhang,

I am new with LPC55S69.  I tried to implement the RTC function for my custom board, the rtc demo is working for LPC55S69-EVK eval board, but when I ran on my custom board, the only thing is different is the 32Mhz crystal input for the XTAL32M instead of the 16MHz like the eval has.  The RTC seem like never got update to generate the interrupt

Can you please give me some pointer for me the check points?  

0 Kudos

539 Views
EugeneHiihtaja
Senior Contributor I

Hi Jun Zhang !

I mean case when MCU reboot. I shouldn't touch RTC in way when it lose context of common registers and RTC time.

I should by SW to identify if it initialized already and  running.

What is right sequence about it ?

Regards,

Eugene

0 Kudos

539 Views
ZhangJennie
NXP TechSupport
NXP TechSupport

I don't think there is a register can check if RTC is correctly initialized.

You can check RTC_COUNT register, if it can be update regularly.


Have a great day,
Jun Zhang

-------------------------------------------------------------------------------
Note:
- If this post answers your question, please click the "Mark Correct" button. Thank you!

- We are following threads for 7 weeks after the last post, later replies are ignored
Please open a new thread and refer to the closed one, if you have a related question at a later point in time.
-------------------------------------------------------------------------------

0 Kudos