STM32F207VC-RTC-USART3

所属分类:嵌入式/单片机/硬件编程
开发工具:C/C++
文件大小:7441KB
下载次数:16
上传日期:2015-06-03 09:36:26
上 传 者tawnie
说明:  STM32F207 RTC和USART3程序,使用外部RTC晶振
(STM32F207 RTC and USART3 program, using an external RTC crystal)

文件列表:
STM32F207VC RTC USART3\EWARM\Project.ewd (24245, 2012-04-14)
STM32F207VC RTC USART3\EWARM\Project.ewp (29877, 2012-04-14)
STM32F207VC RTC USART3\EWARM\Project.eww (161, 2012-04-14)
STM32F207VC RTC USART3\EWARM\stm32f2xx_flash.icf (1342, 2012-04-14)
STM32F207VC RTC USART3\EWARM\stm32f2xx_flash_extsram.icf (1363, 2012-04-14)
STM32F207VC RTC USART3\EWARM\stm32f2xx_sram.icf (1342, 2012-04-14)
STM32F207VC RTC USART3\Libraries\CMSIS\CM3\CoreSupport\core_cm3.c (17273, 2011-04-21)
STM32F207VC RTC USART3\Libraries\CMSIS\CM3\CoreSupport\core_cm3.h (85714, 2011-04-21)
STM32F207VC RTC USART3\Libraries\CMSIS\CM3\DeviceSupport\ST\STM32F2xx\startup\arm\startup_stm32f2xx.s (29091, 2011-04-21)
STM32F207VC RTC USART3\Libraries\CMSIS\CM3\DeviceSupport\ST\STM32F2xx\startup\gcc_ride7\startup_stm32f2xx.s (23785, 2011-04-21)
STM32F207VC RTC USART3\Libraries\CMSIS\CM3\DeviceSupport\ST\STM32F2xx\startup\iar\startup_stm32f2xx.s (24021, 2011-04-21)
STM32F207VC RTC USART3\Libraries\CMSIS\CM3\DeviceSupport\ST\STM32F2xx\startup\TrueSTUDIO\startup_stm32f2xx.s (23851, 2013-07-06)
STM32F207VC RTC USART3\Libraries\CMSIS\CM3\DeviceSupport\ST\STM32F2xx\stm32f2xx.h (522087, 2011-12-31)
STM32F207VC RTC USART3\Libraries\CMSIS\CM3\DeviceSupport\ST\STM32F2xx\system_stm32f2xx.c (20825, 2011-12-28)
STM32F207VC RTC USART3\Libraries\CMSIS\CM3\DeviceSupport\ST\STM32F2xx\system_stm32f2xx.h (2092, 2011-04-21)
STM32F207VC RTC USART3\Libraries\CMSIS\License.doc (39936, 2011-04-21)
STM32F207VC RTC USART3\Libraries\STM32F2xx_StdPeriph_Driver\inc\misc.h (6788, 2011-04-21)
STM32F207VC RTC USART3\Libraries\STM32F2xx_StdPeriph_Driver\inc\stm32f2xx_adc.h (32413, 2011-04-21)
STM32F207VC RTC USART3\Libraries\STM32F2xx_StdPeriph_Driver\inc\stm32f2xx_can.h (27182, 2011-04-21)
STM32F207VC RTC USART3\Libraries\STM32F2xx_StdPeriph_Driver\inc\stm32f2xx_crc.h (2280, 2011-04-21)
STM32F207VC RTC USART3\Libraries\STM32F2xx_StdPeriph_Driver\inc\stm32f2xx_cryp.h (12524, 2011-04-21)
STM32F207VC RTC USART3\Libraries\STM32F2xx_StdPeriph_Driver\inc\stm32f2xx_dac.h (14810, 2011-04-21)
STM32F207VC RTC USART3\Libraries\STM32F2xx_StdPeriph_Driver\inc\stm32f2xx_dbgmcu.h (4160, 2011-04-21)
STM32F207VC RTC USART3\Libraries\STM32F2xx_StdPeriph_Driver\inc\stm32f2xx_dcmi.h (12841, 2011-04-21)
STM32F207VC RTC USART3\Libraries\STM32F2xx_StdPeriph_Driver\inc\stm32f2xx_dma.h (28746, 2011-04-21)
STM32F207VC RTC USART3\Libraries\STM32F2xx_StdPeriph_Driver\inc\stm32f2xx_exti.h (7876, 2011-04-21)
STM32F207VC RTC USART3\Libraries\STM32F2xx_StdPeriph_Driver\inc\stm32f2xx_flash.h (14459, 2011-04-21)
STM32F207VC RTC USART3\Libraries\STM32F2xx_StdPeriph_Driver\inc\stm32f2xx_fsmc.h (27040, 2011-04-21)
STM32F207VC RTC USART3\Libraries\STM32F2xx_StdPeriph_Driver\inc\stm32f2xx_gpio.h (17476, 2011-04-21)
STM32F207VC RTC USART3\Libraries\STM32F2xx_StdPeriph_Driver\inc\stm32f2xx_hash.h (8948, 2011-04-21)
STM32F207VC RTC USART3\Libraries\STM32F2xx_StdPeriph_Driver\inc\stm32f2xx_i2c.h (31452, 2011-04-21)
STM32F207VC RTC USART3\Libraries\STM32F2xx_StdPeriph_Driver\inc\stm32f2xx_iwdg.h (4187, 2011-04-21)
STM32F207VC RTC USART3\Libraries\STM32F2xx_StdPeriph_Driver\inc\stm32f2xx_pwr.h (5364, 2011-04-21)
STM32F207VC RTC USART3\Libraries\STM32F2xx_StdPeriph_Driver\inc\stm32f2xx_rcc.h (24673, 2011-04-21)
STM32F207VC RTC USART3\Libraries\STM32F2xx_StdPeriph_Driver\inc\stm32f2xx_rng.h (3822, 2011-04-21)
STM32F207VC RTC USART3\Libraries\STM32F2xx_StdPeriph_Driver\inc\stm32f2xx_rtc.h (25396, 2011-04-21)
STM32F207VC RTC USART3\Libraries\STM32F2xx_StdPeriph_Driver\inc\stm32f2xx_sdio.h (22641, 2011-04-21)
STM32F207VC RTC USART3\Libraries\STM32F2xx_StdPeriph_Driver\inc\stm32f2xx_spi.h (19848, 2011-04-21)
STM32F207VC RTC USART3\Libraries\STM32F2xx_StdPeriph_Driver\inc\stm32f2xx_syscfg.h (7092, 2011-04-21)
... ...

/** @page HW_Calendar RTC Hardware Calendar example @verbatim ******************** (C) COPYRIGHT 2012 STMicroelectronics ******************* * @file RTC/HW_Calendar/readme.txt * @author MCD Application Team * @version V1.1.0 * @date 13-April-2012 * @brief Description of the RTC Hardware Calendar example. ****************************************************************************** * * Licensed under MCD-ST Liberty SW License Agreement V2, (the "License"); * You may not use this file except in compliance with the License. * You may obtain a copy of the License at: * * http://www.st.com/software_license_agreement_liberty_v2 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * ****************************************************************************** @endverbatim @par Example Description This example demonstrates and explains how to use the RTC peripheral. As an application example, it demonstrates how to setup the RTC peripheral, in terms of prescaler and interrupts, to be used to keep time and to generate alarm interrupt. One from the following clock can be used as RTC clock source (uncomment the corresponding define in main.c): - LSE oscillator clock usually delivered by a 32.768 kHz quartz. - LSI oscillator clock The RTC is in the backup (BKP) domain, still powered by VBAT when VDD is switched off, so the RTC configuration is not lost if a battery is connected to the VBAT pin. A key value is written in backup data register 0 to indicate if the RTC is already configured. The program behaves as follows: 1. After startup the program checks the backup data register 0 value: - BKP_DR0 value not correct: (RTC_BKP_DR0 value is not correct or has not yet been programmed when the program is executed for the first time) the RTC is configured and the user is asked to set the time and alarm (entered on HyperTerminal). - BKP_DR0 value correct: this means that the RTC is configured and the time and Alarm A are displayed on HyperTerminal. 2. When an External Reset occurs the BKP domain is not reset and the RTC configuration is not lost. 3. When power on reset occurs: - If a battery is connected to the VBAT pin: the BKP domain is not reset and the RTC configuration is not lost. - If no battery is connected to the VBAT pin: the BKP domain is reset and the RTC configuration is lost. 4. When an RTC Alarm A event occurs the RTC Alarm interrupt is generated and the LED1 is toggled. The example uses HyperTerminal to configure the RTC clock and display the current time: - When Tamper button is pressed, a menu is displayed to configure the RTC Time and Alarm A registers. - When Key button is pressed, the current time is displayed. - When WakeUp button is pressed, the current alarm A is displayed. LED2 is truned ON when the RTC configuration is done correctly. @par Directory contents - RTC/HW_Calendar/system_stm32f2xx.c STM32F2xx system clock configuration file - RTC/HW_Calendar/stm32f2xx_conf.h Library Configuration file - RTC/HW_Calendar/stm32f2xx_it.c Interrupt handlers - RTC/HW_Calendar/stm32f2xx_it.h Header for stm32f2xx_it.c - RTC/HW_Calendar/main.c Main program - RTC/HW_Calendar/main.h Main header file @note The "system_stm32f2xx.c" is generated by an automatic clock configuration tool and can be easily customized to your own configuration. To select different clock setup, use the "STM32F2xx_Clock_Configuration_V1.0.0.xls" provided with the AN3362 package available on ST Microcontrollers @par Hardware and Software environment - This example runs on STM32F2xx Devices. - This example has been tested with STM322xG-EVAL RevB and can be easily tailored to any other development board. - STM322xG-EVAL Set-up - Use LED1 led connected respectively to PG.06 pins. - Use the TAMPER push button connected to PC.13 pin (EXTI Line13). - Use the KEY push button connected to PG.15 pin (EXTI Line15). - Use the WAKEUP push button connected to PA.00 pin (EXTI Line0). - Make sure that jumper JP19 is in position 1-2 to connect the 3V battery to VBAT pin - Connect a null-modem female/female RS232 cable between the DB9 connector CN16 (USART3) and PC serial port if you want to display data on the HyperTerminal. @note Make sure that jumper JP22 is in position 1-2 - Hyperterminal configuration: - Word Length = 8 Bits - One Stop Bit - No parity - BaudRate = 115200 baud - flow control: None @par How to use it ? In order to make the program work, you must do the following : - Copy all source files from this example folder to the template folder under Project\STM32F2xx_StdPeriph_Template - Open your preferred toolchain - Rebuild all files and load your image into target memory - Run the example *

© COPYRIGHT STMicroelectronics

*/

近期下载者

相关文件


收藏者