CONFIDENTIAL
DM816x RTC User Guide v1.1
___________________________________________________________________________________________
Z3 Technology, LLC
♦
100 N. 8th St., Suite 250
♦
Lincoln, NE 68508 USA
♦
+1.402.323.0702
12
5.2 Running the software
(8) Boot up the MOD using TFTP and NFS accessing the PC where you just created the RTC files. Please see the
appropriate User’s Guide for details on how to do this.
(9) If any demo menus come up, exit the menus to reach the Linux prompt.
(10) At the prompt, type “/usr/local/bin/rtc_test”
# /usr/local/bin/rtc
_
test
RTC version : 2.2
Date (YYYY-MM-DD): 2013-08-27
Time (HH:MM:SS): 08:32:44
Date (YYYY-MM-DD): 2013-08-27
Time (HH:MM:SS): 08:32:45
You should see the version of the RTC software and date/time each time you press enter. Press Ctl-C to exit.
(11) Type “/usr/local/bin/hwclock2 –r” to print the time and date from the RTC
# /usr/local/bin/hwclock2 -r
Date (YYYY-MM-DD): 2013-08-27
Time (HH:MM:SS): 08:34:00
(12) Type “/usr/local/bin/hwclock2 –-set –-date=”m/d/y h:m:s” to set the RTC time/date.
# /usr/local/bin/hwclock2 –-set --date=”8/27/13 08:34:00”
Date (YYYY-MM-DD): 2013-08-27
Time (HH:MM:SS): 08:34:00
(13) Finally, you can use “/usr/local/sbin/i2cdump –y 1 0x42 b” to look directly at the MSP430 register values:
(14) “/usr/local/bin/hwclock2 –s” can be used to set the system time from the RTC time/date. By placing this
command on a script at boot time, the system time will always be correct.
Figure 8 Sample i2cdump Results