Martin Johnson / STM32F3-Discovery

Dependents:   Space_Invaders_Demo neopixels gpio_test_stm32f3_discovery gpio_test_systimer ... more

Embed: (wiki syntax)

« Back to documentation index

Interrupts and flags management functions

Interrupts and flags management functions
[RTC_Private_Functions]

Interrupts and flags management functions. More...

Functions

void RTC_ITConfig (uint32_t RTC_IT, FunctionalState NewState)
 Enables or disables the specified RTC interrupts.
FlagStatus RTC_GetFlagStatus (uint32_t RTC_FLAG)
 Checks whether the specified RTC flag is set or not.
void RTC_ClearFlag (uint32_t RTC_FLAG)
 Clears the RTC's pending flags.
ITStatus RTC_GetITStatus (uint32_t RTC_IT)
 Checks whether the specified RTC interrupt has occurred or not.
void RTC_ClearITPendingBit (uint32_t RTC_IT)
 Clears the RTC's interrupt pending bits.

Detailed Description

Interrupts and flags management functions.

 ===============================================================================
                ##### Interrupts and flags management functions #####
 ===============================================================================  
    [..] All RTC interrupts are connected to the EXTI controller.
         (+) To enable the RTC Alarm interrupt, the following sequence is required:
             (++) Configure and enable the EXTI Line 17 in interrupt mode and select 
                  the rising edge sensitivity using the EXTI_Init() function.
             (++) Configure and enable the RTC_Alarm IRQ channel in the NVIC using 
                  the NVIC_Init() function.
             (++) Configure the RTC to generate RTC alarms (Alarm A and/or Alarm B)
                  using the RTC_SetAlarm() and RTC_AlarmCmd() functions.
         (+) To enable the RTC Wakeup interrupt, the following sequence is required:
             (++) Configure and enable the EXTI Line 20 in interrupt mode and select 
                  the rising edge sensitivity using the EXTI_Init() function.
             (++) Configure and enable the RTC_WKUP IRQ channel in the NVIC using
                  the NVIC_Init() function.
             (++) Configure the RTC to generate the RTC wakeup timer event using the 
                  RTC_WakeUpClockConfig(), RTC_SetWakeUpCounter() and RTC_WakeUpCmd() 
                  functions.
         (+) To enable the RTC Tamper interrupt, the following sequence is required:
             (++) Configure and enable the EXTI Line 19 in interrupt mode and select 
                  the rising edge sensitivity using the EXTI_Init() function.
             (++) Configure and enable the TAMP_STAMP IRQ channel in the NVIC using 
                  the NVIC_Init() function.
             (++) Configure the RTC to detect the RTC tamper event using the 
                  RTC_TamperTriggerConfig() and RTC_TamperCmd() functions.
         (+) To enable the RTC TimeStamp interrupt, the following sequence is required:
             (++) Configure and enable the EXTI Line 19 in interrupt mode and select
                  the rising edge sensitivity using the EXTI_Init() function.
             (++) Configure and enable the TAMP_STAMP IRQ channel in the NVIC using 
                  the NVIC_Init() function.
             (++) Configure the RTC to detect the RTC time-stamp event using the 
                  RTC_TimeStampCmd() functions.


Function Documentation

void RTC_ClearFlag ( uint32_t  RTC_FLAG )

Clears the RTC's pending flags.

Parameters:
RTC_FLAG,:specifies the RTC flag to clear. This parameter can be any combination of the following values:

  • RTC_FLAG_TAMP3F: Tamper 3 event flag
  • RTC_FLAG_TAMP2F: Tamper 2 event flag
  • RTC_FLAG_TAMP1F: Tamper 1 event flag
  • RTC_FLAG_TSOVF: Time Stamp Overflow flag
  • RTC_FLAG_TSF: Time Stamp event flag
  • RTC_FLAG_WUTF: WakeUp Timer flag
  • RTC_FLAG_ALRBF: Alarm B flag
  • RTC_FLAG_ALRAF: Alarm A flag
  • RTC_FLAG_RSF: Registers Synchronized flag
Return values:
None

Definition at line 2474 of file stm32f30x_rtc.c.

void RTC_ClearITPendingBit ( uint32_t  RTC_IT )

Clears the RTC's interrupt pending bits.

Parameters:
RTC_IT,:specifies the RTC interrupt pending bit to clear. This parameter can be any combination of the following values:

  • RTC_IT_TS: Time Stamp interrupt
  • RTC_IT_WUT: WakeUp Timer interrupt
  • RTC_IT_ALRB: Alarm B interrupt
  • RTC_IT_ALRA: Alarm A interrupt
  • RTC_IT_TAMP1: Tamper1 event interrupt
  • RTC_IT_TAMP2: Tamper2 event interrupt
  • RTC_IT_TAMP3: Tamper3 event interrupt
Return values:
None

Definition at line 2538 of file stm32f30x_rtc.c.

FlagStatus RTC_GetFlagStatus ( uint32_t  RTC_FLAG )

Checks whether the specified RTC flag is set or not.

Parameters:
RTC_FLAG,:specifies the flag to check. This parameter can be one of the following values:

  • RTC_FLAG_RECALPF: RECALPF event flag
  • RTC_FLAG_TAMP3F: Tamper 3 event flag
  • RTC_FLAG_TAMP2F: Tamper 2 event flag
  • RTC_FLAG_TAMP1F: Tamper 1 event flag
  • RTC_FLAG_TSOVF: Time Stamp OverFlow flag
  • RTC_FLAG_TSF: Time Stamp event flag
  • RTC_FLAG_WUTF: WakeUp Timer flag
  • RTC_FLAG_ALRBF: Alarm B flag
  • RTC_FLAG_ALRAF: Alarm A flag
  • RTC_FLAG_INITF: Initialization mode flag
  • RTC_FLAG_RSF: Registers Synchronized flag
  • RTC_FLAG_INITS: Registers Configured flag : Shift operation pending flag.
  • RTC_FLAG_WUTWF: WakeUp Timer Write flag
  • RTC_FLAG_ALRBWF: Alarm B Write flag
  • RTC_FLAG_ALRAWF: Alarm A write flag
Return values:
Thenew state of RTC_FLAG (SET or RESET).

Definition at line 2436 of file stm32f30x_rtc.c.

ITStatus RTC_GetITStatus ( uint32_t  RTC_IT )

Checks whether the specified RTC interrupt has occurred or not.

Parameters:
RTC_IT,:specifies the RTC interrupt source to check. This parameter can be one of the following values:

  • RTC_IT_TS: Time Stamp interrupt
  • RTC_IT_WUT: WakeUp Timer interrupt
  • RTC_IT_ALRB: Alarm B interrupt
  • RTC_IT_ALRA: Alarm A interrupt
  • RTC_IT_TAMP1: Tamper1 event interrupt
  • RTC_IT_TAMP2: Tamper2 event interrupt
  • RTC_IT_TAMP3: Tamper3 event interrupt
Return values:
Thenew state of RTC_IT (SET or RESET).

Definition at line 2496 of file stm32f30x_rtc.c.

void RTC_ITConfig ( uint32_t  RTC_IT,
FunctionalState  NewState 
)

Enables or disables the specified RTC interrupts.

Parameters:
RTC_IT,:specifies the RTC interrupt sources to be enabled or disabled. This parameter can be any combination of the following values:

  • RTC_IT_TS: Time Stamp interrupt mask
  • RTC_IT_WUT: WakeUp Timer interrupt mask
  • RTC_IT_ALRB: Alarm B interrupt mask
  • RTC_IT_ALRA: Alarm A interrupt mask
  • RTC_IT_TAMP: Tamper event interrupt mask
NewState,:new state of the specified RTC interrupts. This parameter can be: ENABLE or DISABLE.
Return values:
None

Definition at line 2386 of file stm32f30x_rtc.c.