From 360b2d795d73d0b293e7c406e2547b03dedbb4f3 Mon Sep 17 00:00:00 2001 From: patacongo Date: Sat, 1 Oct 2011 22:09:00 +0000 Subject: [PATCH] Add support for lo- and hi-res RTC hardware git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@4005 42af7a65-404d-4744-a932-0658087f49c3 --- Documentation/NuttxPortingGuide.html | 67 ++++++++++++++++++++++------ 1 file changed, 53 insertions(+), 14 deletions(-) diff --git a/Documentation/NuttxPortingGuide.html b/Documentation/NuttxPortingGuide.html index 20f6778ca8f..d05eea2396c 100644 --- a/Documentation/NuttxPortingGuide.html +++ b/Documentation/NuttxPortingGuide.html @@ -12,7 +12,7 @@

NuttX RTOS Porting Guide

-

Last Updated: September 13, 2011

+

Last Updated: October 1, 2011

@@ -1989,18 +1989,30 @@ CONFIG_SYSTEM_UTC=y

4.1.20.2 Hardware

- To enable hardware module use option: + To enable hardware module use the following configuration options:

-

+

which requires the following three base functions to read time:

This module depends on CONFIG_SYSTEM_UTC=y. @@ -2024,15 +2036,17 @@ CONFIG_RTC=y Running at rate of system base timer, used for time-slicing, and so forth.

- If hardware RTC is present (CONFIG_RTC) and enabled, then after successful - initiliazation variables are overriden by calls to up_rtc_getclock() which is + If hardware RTC is present (CONFIG_RTC) and and high-resolution timeing + is enabled (CONFIG_RTC_HIRES), then after successful + initiliazation variables are overriden by calls to up_rtc_gettime() which is running continously even in power-down modes.

- In the case of CONFIG_RTC is set the g_tickcount and g_system_utc keep - counting at rate of a system timer, which however, is disabled in power-down - mode. By comparing this time and RTC (actual time) one may determine the - actual system active time. To retrieve that variable use: + In the case of CONFIG_RTC_HIRES is set the g_tickcount and + g_system_utc keep counting at rate of a system timer, which however, is + disabled in power-down mode. + By comparing this time and RTC (actual time) one may determine the actual system active time. + To retrieve that variable use:

Device Drivers

+

RTC

+ +

SPI driver