From 0b08eb3243a52370912409affeec4ca87dabc85d Mon Sep 17 00:00:00 2001 From: patacongo Date: Wed, 14 Dec 2011 19:59:06 +0000 Subject: STM32 RTC driver now compiles and links without error (still untested) git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@4177 42af7a65-404d-4744-a932-0658087f49c3 --- nuttx/configs/README.txt | 35 +++++++++++++++++---------- nuttx/configs/stm3240g-eval/README.txt | 1 + nuttx/configs/stm3240g-eval/dhcpd/defconfig | 34 ++++++++++++++++++++++++++ nuttx/configs/stm3240g-eval/nettest/defconfig | 34 ++++++++++++++++++++++++++ nuttx/configs/stm3240g-eval/nsh/defconfig | 34 ++++++++++++++++++++++++++ nuttx/configs/stm3240g-eval/ostest/defconfig | 34 ++++++++++++++++++++++++++ 6 files changed, 159 insertions(+), 13 deletions(-) (limited to 'nuttx/configs') diff --git a/nuttx/configs/README.txt b/nuttx/configs/README.txt index 46b41d1ab..3ed5d2563 100644 --- a/nuttx/configs/README.txt +++ b/nuttx/configs/README.txt @@ -609,20 +609,29 @@ defconfig -- This is a configuration file similar to the Linux RTC - CONFIG_RTC - Enables general support for a hardware RTC. Specific + CONFIG_RTC - Enables general support for a hardware RTC. Specific architectures may require other specific settings. - CONFIG_RTC_HIRES - 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 - If CONFIG_RTC_HIRES is defined, then the - frequency of the high resolution RTC must be provided. If CONFIG_RTC_HIRES - is not defined, CONFIG_RTC_FREQUENCY is assumed to be one. - CONFIG_RTC_ALARM - Enable if the RTC hardware supports setting of an alarm. - A callback function will be executed when the alarm goes off + 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. + CONFIG_RTC_FREQUENCY - If CONFIG_RTC_HIRES is defined, then the frequency + of the high resolution RTC must be provided. If CONFIG_RTC_HIRES is + not defined, CONFIG_RTC_FREQUENCY is assumed to be one. + CONFIG_RTC_ALARM - Enable if the RTC hardware supports setting of an + alarm. A callback function will be executed when the alarm goes off SPI driver diff --git a/nuttx/configs/stm3240g-eval/README.txt b/nuttx/configs/stm3240g-eval/README.txt index a840e1699..3368ef1fb 100755 --- a/nuttx/configs/stm3240g-eval/README.txt +++ b/nuttx/configs/stm3240g-eval/README.txt @@ -335,6 +335,7 @@ STM3240G-EVAL-specific Configuration Options CONFIG_STM32_CAN1 CONFIG_STM32_CAN2 CONFIG_STM32_DAC + CONFIG_STM32_PWR -- Required for RTC APB2 ---- diff --git a/nuttx/configs/stm3240g-eval/dhcpd/defconfig b/nuttx/configs/stm3240g-eval/dhcpd/defconfig index a3bdd3f32..c2f3440f3 100755 --- a/nuttx/configs/stm3240g-eval/dhcpd/defconfig +++ b/nuttx/configs/stm3240g-eval/dhcpd/defconfig @@ -161,6 +161,7 @@ CONFIG_STM32_I2C3=n CONFIG_STM32_CAN1=n CONFIG_STM32_CAN2=n CONFIG_STM32_DAC=n +CONFIG_STM32_PWR=n # APB2: CONFIG_STM32_TIM1=n CONFIG_STM32_TIM8=n @@ -754,6 +755,39 @@ CONFIG_NET_BROADCAST=y CONFIG_NET_DHCP_LIGHT=n CONFIG_NET_RESOLV_ENTRIES=4 +# +# RTC Configuration +# +# CONFIG_RTC - Enables general support for a hardware RTC. Specific +# architectures may require other specific settings. +# 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. +# CONFIG_RTC_FREQUENCY - If CONFIG_RTC_HIRES is defined, then the frequency +# of the high resolution RTC must be provided. If CONFIG_RTC_HIRES is +# not defined, CONFIG_RTC_FREQUENCY is assumed to be one. +# CONFIG_RTC_ALARM - Enable if the RTC hardware supports setting of an +# alarm. A callback function will be executed when the alarm goes off +# +CONFIG_RTC=n +CONFIG_RTC_DATETIME=y +CONFIG_RTC_HIRES=n +CONFIG_RTC_FREQUENCY=n +CONFIG_RTC_ALARM=n + # # USB Device Configuration # diff --git a/nuttx/configs/stm3240g-eval/nettest/defconfig b/nuttx/configs/stm3240g-eval/nettest/defconfig index 7399ea9ed..94b8075db 100755 --- a/nuttx/configs/stm3240g-eval/nettest/defconfig +++ b/nuttx/configs/stm3240g-eval/nettest/defconfig @@ -161,6 +161,7 @@ CONFIG_STM32_I2C3=n CONFIG_STM32_CAN1=n CONFIG_STM32_CAN2=n CONFIG_STM32_DAC=n +CONFIG_STM32_PWR=n # APB2: CONFIG_STM32_TIM1=n CONFIG_STM32_TIM8=n @@ -754,6 +755,39 @@ CONFIG_NET_BROADCAST=n CONFIG_NET_DHCP_LIGHT=n CONFIG_NET_RESOLV_ENTRIES=4 +# +# RTC Configuration +# +# CONFIG_RTC - Enables general support for a hardware RTC. Specific +# architectures may require other specific settings. +# 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. +# CONFIG_RTC_FREQUENCY - If CONFIG_RTC_HIRES is defined, then the frequency +# of the high resolution RTC must be provided. If CONFIG_RTC_HIRES is +# not defined, CONFIG_RTC_FREQUENCY is assumed to be one. +# CONFIG_RTC_ALARM - Enable if the RTC hardware supports setting of an +# alarm. A callback function will be executed when the alarm goes off +# +CONFIG_RTC=n +CONFIG_RTC_DATETIME=y +CONFIG_RTC_HIRES=n +CONFIG_RTC_FREQUENCY=n +CONFIG_RTC_ALARM=n + # # USB Device Configuration # diff --git a/nuttx/configs/stm3240g-eval/nsh/defconfig b/nuttx/configs/stm3240g-eval/nsh/defconfig index cc98db02a..ca3783760 100755 --- a/nuttx/configs/stm3240g-eval/nsh/defconfig +++ b/nuttx/configs/stm3240g-eval/nsh/defconfig @@ -161,6 +161,7 @@ CONFIG_STM32_I2C3=n CONFIG_STM32_CAN1=n CONFIG_STM32_CAN2=n CONFIG_STM32_DAC=n +CONFIG_STM32_PWR=n # APB2: CONFIG_STM32_TIM1=n CONFIG_STM32_TIM8=n @@ -758,6 +759,39 @@ CONFIG_NET_BROADCAST=n CONFIG_NET_DHCP_LIGHT=n CONFIG_NET_RESOLV_ENTRIES=4 +# +# RTC Configuration +# +# CONFIG_RTC - Enables general support for a hardware RTC. Specific +# architectures may require other specific settings. +# 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. +# CONFIG_RTC_FREQUENCY - If CONFIG_RTC_HIRES is defined, then the frequency +# of the high resolution RTC must be provided. If CONFIG_RTC_HIRES is +# not defined, CONFIG_RTC_FREQUENCY is assumed to be one. +# CONFIG_RTC_ALARM - Enable if the RTC hardware supports setting of an +# alarm. A callback function will be executed when the alarm goes off +# +CONFIG_RTC=n +CONFIG_RTC_DATETIME=y +CONFIG_RTC_HIRES=n +CONFIG_RTC_FREQUENCY=n +CONFIG_RTC_ALARM=n + # # USB Device Configuration # diff --git a/nuttx/configs/stm3240g-eval/ostest/defconfig b/nuttx/configs/stm3240g-eval/ostest/defconfig index f45820bf9..8acda4c6b 100755 --- a/nuttx/configs/stm3240g-eval/ostest/defconfig +++ b/nuttx/configs/stm3240g-eval/ostest/defconfig @@ -161,6 +161,7 @@ CONFIG_STM32_I2C3=n CONFIG_STM32_CAN1=n CONFIG_STM32_CAN2=n CONFIG_STM32_DAC=n +CONFIG_STM32_PWR=n # APB2: CONFIG_STM32_TIM1=n CONFIG_STM32_TIM8=n @@ -714,6 +715,39 @@ CONFIG_NET_BROADCAST=n CONFIG_NET_DHCP_LIGHT=n CONFIG_NET_RESOLV_ENTRIES=4 +# +# RTC Configuration +# +# CONFIG_RTC - Enables general support for a hardware RTC. Specific +# architectures may require other specific settings. +# 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. +# CONFIG_RTC_FREQUENCY - If CONFIG_RTC_HIRES is defined, then the frequency +# of the high resolution RTC must be provided. If CONFIG_RTC_HIRES is +# not defined, CONFIG_RTC_FREQUENCY is assumed to be one. +# CONFIG_RTC_ALARM - Enable if the RTC hardware supports setting of an +# alarm. A callback function will be executed when the alarm goes off +# +CONFIG_RTC=n +CONFIG_RTC_DATETIME=y +CONFIG_RTC_HIRES=n +CONFIG_RTC_FREQUENCY=n +CONFIG_RTC_ALARM=n + # # USB Device Configuration # -- cgit v1.2.3