STM32F0xx Standard Peripherals Firmware Library: RTC_Tamper

STM32F0xx Standard Peripherals Library

STM32F0xx Standard Peripherals Firmware Library

Defines

#define RTC_BKP_DR_NUMBER   5
#define RTC_CLOCK_SOURCE_LSI   */

Functions

static uint32_t CheckRTC_BKP_DR (uint32_t FirstRTCBackupData)
 Checks if the RTC Backup DRx registers values are correct or not.
void HardFault_Handler (void)
 This function handles Hard Fault exception.
uint32_t IsBackupRegReset (void)
 Checks if the RTC Backup DRx registers are reset or not.
int main (void)
 Main program.
void NMI_Handler (void)
 This function handles NMI exception.
void PendSV_Handler (void)
 This function handles PendSVC exception.
static void RTC_Config (void)
 Configure the RTC peripheral by selecting the clock source.
void RTC_IRQHandler (void)
 This function handles RTC interrupt request.
void SVC_Handler (void)
 This function handles SVCall exception.
void SysTick_Handler (void)
 This function handles SysTick Handler.
static void WriteToRTC_BKP_DR (uint32_t FirstRTCBackupData)
 Writes data RTC Backup DRx registers.

Variables

uint32_t RTC_BKP_DR [RTC_BKP_DR_NUMBER]

Define Documentation

#define RTC_BKP_DR_NUMBER   5
#define RTC_CLOCK_SOURCE_LSI   */

Function Documentation

static uint32_t CheckRTC_BKP_DR ( uint32_t  FirstRTCBackupData) [static]

Checks if the RTC Backup DRx registers values are correct or not.

Parameters:
FirstRTCBackupData,:data to be compared with RTC Backup data registers.
Return values:
-0: All RTC Backup DRx registers values are correct
  • Value different from 0: Number of the first Backup register which value is not correct

Definition at line 207 of file STM32F0xx_StdPeriph_Examples/RTC/RTC_Tamper/main.c.

References RTC_BKP_DR, and RTC_BKP_DR_NUMBER.

Referenced by main().

void HardFault_Handler ( void  )

This function handles Hard Fault exception.

Parameters:
None
Return values:
None

Definition at line 66 of file STM32F0xx_StdPeriph_Examples/RTC/RTC_Tamper/stm32f0xx_it.c.

uint32_t IsBackupRegReset ( void  )

Checks if the RTC Backup DRx registers are reset or not.

Parameters:
None
Return values:
-0: All RTC Backup DRx registers are reset
  • Value different from 0: Number of the first Backup register not reset

Definition at line 229 of file STM32F0xx_StdPeriph_Examples/RTC/RTC_Tamper/main.c.

References RTC_BKP_DR, and RTC_BKP_DR_NUMBER.

Referenced by RTC_IRQHandler().

int main ( void  )

Main program.

Parameters:
None
Return values:
None

< At this stage the microcontroller clock setting is already configured, this is done through SystemInit() function which is called from startup file (startup_stm32f0xx.s) before to branch to application main. To reconfigure the default setting of SystemInit() function, refer to system_stm32f0xx.c file

Definition at line 67 of file STM32F0xx_StdPeriph_Examples/RTC/RTC_Tamper/main.c.

References CheckRTC_BKP_DR(), RTC_Config(), and WriteToRTC_BKP_DR().

void NMI_Handler ( void  )

This function handles NMI exception.

Parameters:
None
Return values:
None

Definition at line 57 of file STM32F0xx_StdPeriph_Examples/RTC/RTC_Tamper/stm32f0xx_it.c.

void PendSV_Handler ( void  )

This function handles PendSVC exception.

Parameters:
None
Return values:
None

Definition at line 88 of file STM32F0xx_StdPeriph_Examples/RTC/RTC_Tamper/stm32f0xx_it.c.

static void RTC_Config ( void  ) [static]

Configure the RTC peripheral by selecting the clock source.

Parameters:
None
Return values:
None

Definition at line 111 of file STM32F0xx_StdPeriph_Examples/RTC/RTC_Tamper/main.c.

References EXTI_InitStructure, and NVIC_InitStructure.

Referenced by main().

void RTC_IRQHandler ( void  )

This function handles RTC interrupt request.

This function handles RTC Auto wake-up interrupt request.

Parameters:
None
Return values:
None

Definition at line 109 of file STM32F0xx_StdPeriph_Examples/RTC/RTC_Tamper/stm32f0xx_it.c.

References IsBackupRegReset().

void SVC_Handler ( void  )

This function handles SVCall exception.

Parameters:
None
Return values:
None

Definition at line 79 of file STM32F0xx_StdPeriph_Examples/RTC/RTC_Tamper/stm32f0xx_it.c.

void SysTick_Handler ( void  )

This function handles SysTick Handler.

Parameters:
None
Return values:
None

Definition at line 97 of file STM32F0xx_StdPeriph_Examples/RTC/RTC_Tamper/stm32f0xx_it.c.

static void WriteToRTC_BKP_DR ( uint32_t  FirstRTCBackupData) [static]

Writes data RTC Backup DRx registers.

Parameters:
FirstRTCBackupData,:data to be written to RTC Backup data registers.
Return values:
None

Definition at line 189 of file STM32F0xx_StdPeriph_Examples/RTC/RTC_Tamper/main.c.

References RTC_BKP_DR, and RTC_BKP_DR_NUMBER.

Referenced by main().


Variable Documentation

uint32_t RTC_BKP_DR[RTC_BKP_DR_NUMBER]
Initial value:
  {
    RTC_BKP_DR0, RTC_BKP_DR1, RTC_BKP_DR2, RTC_BKP_DR3, RTC_BKP_DR4
  }

Definition at line 50 of file STM32F0xx_StdPeriph_Examples/RTC/RTC_Tamper/main.c.

Referenced by CheckRTC_BKP_DR(), IsBackupRegReset(), and WriteToRTC_BKP_DR().

STM32L1xx Standard Peripherals Library: Footer

 

 

 For complete documentation on STM32 Microcontrollers visit www.st.com/STM32