Time: 12 hours: 12 minutes: 12 seconds.In real_time_clock.c, the date, time and alarm times are:.It can be measured using a digital frequency meter.The 32768 Hz RTCCLK is available on the RTC_CLKOUT pin of the TMS320C5505 USB Stick.After 120 seconds a second alarm occurs which changes the PLL to 12 MHz (Lower power).After 10 seconds the PLL changes from 40 MHz to 2 MHz (Low power).The RTC produces a periodic interrupt once every second.The program uses the RTC to control the PLL frequency and power dissipation.TMS320C5505 USB Stick Setup USB to PC Microphone Headphones Follow the steps previously given in Chapter 1 to set up the new project.Copy the code given in Application 19 Real Time Clock to the workspace.Do not use “printf” or any other slow function in an interrupt.Interrupts should be kept short so they run fast.The C code uses the special keyword “interrupt”.When the call is complete, the processor goes back to sleep.If there is an incoming call, the PLL is set to maximum speed.When 1 second in RTC has expired, the LED flashes and the processor wakes up.When the phone is not in use, it is put to “sleep”.A typical example of a RTC being used to control system power on a mobile phone might be:.The IRQ function prototypes are provided in csl_intc.h.csl_rtc.h provides data structures for time and date.The code for this application has been based on the CSL example code csl_rtc_example.c.This saves a great deal of work, particularly when implementing interrupts.Most the functions required to implement a RTC in software are already provided by the Chip Support Library (CSL).To keep the time and date accurate, compensation can be applied.The 32768 Hz crystal frequency varies with temperature.Sets up wake up and controls the clock output on RTC_CLKOUT pin.Every time one of the RTC interrupt occurs, a flag needs to be cleared (Register RTCINTFL 1920h). ![]() In order to turn on RTC interrupts, the RTC interrupt must be enabled.When new values of time, date or alarm are written, the new values do not take effect until the TIMEUPT and/or ALARMUPDT bits are written.When a certain time is reached, the alarm becomes active.The alarm functions like a standard alarm clock.The real-time clock provides the following values for time and date operations:.A 32768 Hz crystal is a low cost item – it is widely used in digital watches.Fast enough to give resolution of 1ms per ‘tick’.The output from the RTC is available on the RTC_CLKOUT pin of the TMS320C5505 USB Stick.The RTC Clock signal can be used to drive the System Clock (SYSCLK). ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |