diff --git a/Documentation/NuttxPortingGuide.html b/Documentation/NuttxPortingGuide.html index 873061716a6..dc3dbc67286 100644 --- a/Documentation/NuttxPortingGuide.html +++ b/Documentation/NuttxPortingGuide.html @@ -12,7 +12,7 @@
Last Updated: December 1, 2011
+Last Updated: December 14, 2011
@@ -1971,8 +1971,16 @@ elseCONFIG_RTC
CONFIG_RTC_DATETIME
+ CONFIG_RTC_DATETIME is selected, it specifies this second kind of RTC.
+ In this case, the RTC is used to "seed"" the normal NuttX timer and the NuttX system timer
+ provides for higher resoution time.
CONFIG_RTC_HIRES
- time_t value.
+ CONFIG_RTC_DATETIME not selected, then the simple, battery backed counter is used.
+ There are two different implementations of such simple counters based on the time resolution of the counter:
+ The typical RTC keeps time to resolution of 1 second, usually supporting a 32-bit time_t value.
In this case, the RTC is used to "seed" the normal NuttX timer and the NuttX timer provides for higher resoution time.
If CONFIG_RTC_HIRES is enabled in the NuttX configuration, then the RTC provides higher resolution time and completely replaces the system timer for purpose of date and time.
CONFIG_RTC_FREQUENCY
@@ -1983,12 +1991,31 @@ else
A callback function will be executed when the alarm goes off
- which requires the following three base functions to read time: + which requires the following base functions to read and set time:
up_rtcinitialize()up_rtc_time(). UTC time in seconds.up_rtc_gettime(). Replacement for g_system_tickup_rtcinitialize().
+ Initialize the hardware RTC per the selected configuration.
+ This function is called once during the OS initialization sequence
+ up_rtc_time().
+ Get the current time in seconds. This is similar to the standard time() function.
+ This interface is only required if the low-resolution RTC/counter hardware implementation selected.
+ It is only used by the RTOS during intialization to set up the system time when CONFIG_RTC is set
+ but neither CONFIG_RTC_HIRES nor CONFIG_RTC_DATETIME are set.
+ up_rtc_gettime().
+ Get the current time from the high resolution RTC clock/counter.
+ This interface is only supported by the hight-resolution RTC/counter hardware implementation.
+ It is used to replace the system timer (g_system_tick).
+ up_rtc_settime().
+ Set the RTC to the provided time.
+ All RTC implementations must be able to set their time based on a standard timespec.
+ up_rtc_setalarm().
+ Set up an alarm.
+ CONFIG_RTC_DATETIME:
+ There are two general types of RTC: (1) A simple battery backed counter that keeps the time when power
+ is down, and (2) A full date / time RTC the provides the date and time information, often in BCD format.
+ If CONFIG_RTC_DATETIME is selected, it specifies this second kind of RTC.
+ In this case, the RTC is used to "seed"" the normal NuttX timer and the NuttX system timer
+ provides for higher resoution time.
+ CONFIG_RTC_HIRES:
+ If CONFIG_RTC_DATETIME not selected, then the simple, battery backed counter is used.
+ There are two different implementations of such simple counters based on the time resolution of the counter:
The typical RTC keeps time to resolution of 1 second, usually supporting a 32-bit time_t value.
In this case, the RTC is used to "seed" the normal NuttX timer and the NuttX timer provides for higher resoution time.
If CONFIG_RTC_HIRES is enabled in the NuttX configuration, then the RTC provides higher resolution time and completely replaces the system timer for purpose of date and time.