This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

TMS570LS1224: Suggestion for RTC in TMS570LS1224

Part Number: TMS570LS1224
Other Parts Discussed in Thread: HALCOGEN

Hi,

 I am using TMS570LS1224 for my application.I need RTC to get date and time.I can set the current time stamp,whenever i switch on the board.Whether RTI can used as RTC for this purpose.Kindly help me with your valuable suggestions.

  • Hello Kaleeswaran,

    Good to see your persistence in finding a chip level solution here! yes, the RTI could be used to emulate an RTC for limited use situations. For sure it can't be used exactly like an RTC in that it cannot be used in a low power mode to keep time when the system is in an off state but, if you are going to setup the start time on power up, then it can keep a reasonable time.

    To use the RTI to keep time, you would need to setup your RTI to signal an interrupt every second. The exact threshold count to use will be dependent on your specific device and RTI clock frequency configured. The RTI interrupt would then keep count of the number of interrupts since it was started and add this to the time you entered at the start. the easiest implementation is to have the time maintained in seconds then compute the number of days, hours, minutes that have passed from the start time.

    Does this make sense to you? Let me know if you need more explanation.

    For an example code, there is an example called example_rtiBlinky included in the example projects in HalCogen (help->examples->TMS570LS12x_11x). In this example they are using the RTI interrupt to set a time upon which the LED is toggled. If you consider you counter update time period the similar to the LED toggle time period, then this project should be a good starting point and you only need to update the counter to match the 1 second time if it isn't that already.