RTC microsecond PSoc5lp

Tip / Sign in to post questions, reply, level up, and achieve exciting badges. Know more

cross mob
lock attach
Attachments are accessible only for community members.
Anonymous
Not applicable

Hello all, I need a little help.

I want an RTC with microsecond intervals, I'm using the  RTC module existing in PSOC 5 prototype Kit, and to generate the microseconds I am using a up counter  with a 1MHz in the input, my problem is how to reset the counter each one second interrupt of the RTC ?

   

I don't Know how to use RTC interrupts, I'd like to put this function "Counter_Init();" in the " RTC_EverySecondHandler(void)"

   

Thank you very much.

0 Likes
3 Replies
rola_264706
Level 8
Level 8
50 likes received 25 likes received 10 likes received

Adonis: Are you using the  CY8CKIT-059 PSOC 5LP? If so you need to add A WCO crystal on P15.2 and P15.3 to drive the RTC component. Then the RTC will be functional and you can then use it to trigger you counter and sync it for you clock. You should provide a 32.768-kHz clock from an external crystal oscillator. The accuracy of this component is defined by the accuracy of the connected external clock source. Refer to the Clock Editor section of the PSoC Creator Help for information about how to connect and configure the built-in XTAL_32KHZ clock in your design.

0 Likes
Anonymous
Not applicable

Bobgoar: Yes I am using the 32.768-kHz crystal oscillator, The RTC is working well, but I don't know how to use the every second interrupt from RTC. I'd like to use this interrupt to initiate the counter.

0 Likes
lock attach
Attachments are accessible only for community members.
Bob_Marlowe
Level 10
Level 10
First like given 50 questions asked 10 questions asked

The problem is to synchronize the ms to the RTC seconds. I would suggest to use the OPPS (one pulse per second) to reset the timer either using the interrupt of the opps or using the signal coming from the opps. I didn't try yet and I do not want to spoil your fun testing it.

   

 

   

Bob

0 Likes