rtc interrupt every sec whilst continuing count

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

rtc interrupt every sec whilst continuing count

809 Views
avditkohli
Contributor III

Hi,

I wish to program the RTC of MC9S08pa16 to generate an interrupt every second where I compute some data whilst the RTC keeps counting. How do I do that?

 

Thanks,

Avdit

Labels (1)
Tags (2)
0 Kudos
Reply
1 Reply

463 Views
ankur_kala
NXP Employee
NXP Employee

Hi Avdit,

From your description it seems that you need a periodic interrupt of 1 sec using RTC. For this you can use PE ->Init_RTC module, set the clock source as 1-KHz Low Power Oscillator, clock gate -> Enabled, Prescaler -> 100, Modulo Value -> 9. In the interrupts section, you must enable the interrupt and give the name of the ISR that you may define in your application.

Hope this answers your question.

Regards,

Ankur

P.S. - If you see the answer helpful/correct, please mark appropriately.