3 Replies Latest reply on Nov 24, 2015 4:24 AM by JoMe_264151

    RTC microsecond PSoc5lp

      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.

        • 1. Re: RTC microsecond PSoc5lp

          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.

          • 2. Re: RTC microsecond PSoc5lp

            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.

            • 3. Re: RTC microsecond PSoc5lp

              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.