/**
  @page RTC_TimeStamp RTC TimeStamp example
  
  @verbatim
  ******************** (C) COPYRIGHT 2011 STMicroelectronics *******************
  * @file    RTC/TimeStamp/readme.txt 
  * @author  MCD Application Team
  * @version V1.0.0
  * @date    18-April-2011
  * @brief   Description of the RTC TimeStamp example.
  ******************************************************************************
  * THE PRESENT FIRMWARE WHICH IS FOR GUIDANCE ONLY AIMS AT PROVIDING CUSTOMERS
  * WITH CODING INFORMATION REGARDING THEIR PRODUCTS IN ORDER FOR THEM TO SAVE
  * TIME. AS A RESULT, STMICROELECTRONICS SHALL NOT BE HELD LIABLE FOR ANY
  * DIRECT, INDIRECT OR CONSEQUENTIAL DAMAGES WITH RESPECT TO ANY CLAIMS ARISING
  * FROM THE CONTENT OF SUCH FIRMWARE AND/OR THE USE MADE BY CUSTOMERS OF THE
  * CODING INFORMATION CONTAINED HEREIN IN CONNECTION WITH THEIR PRODUCTS.
  ******************************************************************************
   @endverbatim

@par Example Description 

This example provides a short description of how to use the RTC peripheral and 
the Time Stamp feature.

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 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 date (entered on 
      HyperTerminal).
    
    - BKP_DR0 value correct: this means that the RTC is configured and the time
      date and timestamp (time and date) 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. It configures the RTC_AF1 pin TimeStamp to be falling edge and enables the
TimeStamp detection.

5. On applying a low level on the RTC_AF1 pin (PC.13), the calendar is saved in 
the time-stamp registers thanks to the timestamp event detection.
   
The example uses HyperTerminal to configure the RTC clock, display the current 
time and timestamp registers contents:
 - pressing TAMPER push button, the current time and date are saved in RTC TSTR
   and TSDR registers.
 - When pressing WAKEUP push button, the TimeStamp Calendar is cleared.
 - When pressing KEY push button, the current RTC Calendar (Time and date) and
   RTC TimeStamp Calendar (Time and date) are displayed.

@note  The RTC_Year member in the TimeStamp Date is always 00 (no years in the RTC_TSDR register)
 
@par Directory contents 

  - RTC/TimeStamp/system_stm32f2xx.c   STM32F2xx system clock configuration file
  - RTC/TimeStamp/stm32f2xx_conf.h     Library Configuration file
  - RTC/TimeStamp/stm32f2xx_it.c       Interrupt handlers
  - RTC/TimeStamp/stm32f2xx_it.h       Header for stm32f2xx_it.c
  - RTC/TimeStamp/main.c               Main program
  - RTC/TimeStamp/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" tool.

      
@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 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
    
 * <h3><center>&copy; COPYRIGHT 2011 STMicroelectronics</center></h3>
 */
