Real Time Counter - rt1020

cancel
Showing results for 
Search instead for 
Did you mean: 

Real Time Counter - rt1020

214 Views
estacey
Contributor III

I'm exploring the option of using the SNVS real time counter as a polled PIT.  The SDK demo projects don't use the counter that way.  I'm wondering how do I determine the period of the counter programmatically? 

Thanks,

Ellen

0 Kudos
5 Replies

86 Views
jeremyzhou
NXP TechSupport
NXP TechSupport

Hi Ellen Stacey,

Thank you for your interest in NXP Semiconductor products and for the opportunity to serve you.
I'm not very clear with your question, whether you can want to implement the periodic Interrupt feature of the RTC, if yes, please refer to snvs_hp_rtc demo in the SDK library.

Have a great day,
TIC

 

-------------------------------------------------------------------------------
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

86 Views
estacey
Contributor III

No, we're polling the count for time elapsed so I need to know the period of the count.  We're doing this as a work around for our timer interrupt causing exceptions when we are erasing flash.

0 Kudos

86 Views
jeremyzhou
NXP TechSupport
NXP TechSupport

Hi Ellen Stacey,

Thank you for your clarification。
It means that you want to monitor the counter value to evaluate the elapsed time, and it needs to modify the rtc demo in the SDK library by yourself to implement that.

Have a great day,
TIC

 

-------------------------------------------------------------------------------
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

86 Views
estacey
Contributor III

Yes, I understand that.  The question is, is there a way to determine the period of the clock source in code or do I need to hard code it to a fixed value?  Thank you

0 Kudos

86 Views
jeremyzhou
NXP TechSupport
NXP TechSupport

Hi Ellen Stacey,

Thanks for your reply.
The RTC clock source is from either Internal ring oscillator or RTC_XTAL (external crystal), in general, the internal oscillator is not precise relative to a crystal and RTC oscillators are either implemented with 32 kHz or 32.768 kHz crystals.
The RTC clock period won't change via the software code once the clock source has been selected.

Have a great day,
TIC

 

-------------------------------------------------------------------------------
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