BKP_Tamper
[STM32F10x_StdPeriph_Examples]

Defines

#define BKP_DR_NUMBER   42

Functions

void BusFault_Handler (void)
 This function handles Bus Fault exception.
uint32_t CheckBackupReg (uint16_t FirstBackupData)
 Checks if the Backup DRx registers values are correct or not.
void DebugMon_Handler (void)
 This function handles Debug Monitor exception.
void GPIO_Configuration (void)
 Configures the different GPIO ports.
void HardFault_Handler (void)
 This function handles Hard Fault exception.
uint32_t IsBackupRegReset (void)
 Checks if the Backup DRx registers are reset or not.
int main (void)
 Main program.
void MemManage_Handler (void)
 This function handles Memory Manage exception.
void NMI_Handler (void)
 This function handles NMI exception.
void NVIC_Configuration (void)
 Configures NVIC and Vector Table base location.
void PendSV_Handler (void)
 This function handles PendSV_Handler exception.
void SVC_Handler (void)
 This function handles SVCall exception.
void SysTick_Handler (void)
 This function handles SysTick Handler.
void TAMPER_IRQHandler (void)
 This function handles Tamper interrupt request.
void UsageFault_Handler (void)
 This function handles Usage Fault exception.
void WriteToBackupReg (uint16_t FirstBackupData)
 Writes data Backup DRx registers.

Variables

uint16_t BKPDataReg [BKP_DR_NUMBER]

Define Documentation

#define BKP_DR_NUMBER   42

Function Documentation

void BusFault_Handler ( void   ) 

This function handles Bus Fault exception.

Parameters:
None 
Return values:
None 

Definition at line 86 of file STM32F10x_StdPeriph_Examples/BKP/Tamper/stm32f10x_it.c.

uint32_t CheckBackupReg ( uint16_t  FirstBackupData  ) 

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

Parameters:
FirstBackupData,: data to be compared with Backup data registers.
Return values:
0,: All Backup DRx registers values are correct

  • Value different from 0: Number of the first Backup register which value is not correct

Definition at line 175 of file STM32F10x_StdPeriph_Examples/BKP/Tamper/main.c.

References BKP_DR_NUMBER, BKP_ReadBackupRegister(), BKPDataReg, and index.

void DebugMon_Handler ( void   ) 

This function handles Debug Monitor exception.

Parameters:
None 
Return values:
None 

Definition at line 121 of file STM32F10x_StdPeriph_Examples/BKP/Tamper/stm32f10x_it.c.

void GPIO_Configuration ( void   ) 

Configures the different GPIO ports.

Configure TIM9 pins.

Configures TIM1, TIM3 and TIM4 Pins.

Configure TIM10 pin.

Configure the TIM3 Ouput Channels.

Configure the TIM3 Pins.

Configure the TIM3 and the GPIOE Pins.

Configure the GPIO Pins.

Configure the GPIOD Pins.

Configure the TIM1 Pins.

Parameters:
None 
Return values:
None 
Parameters:
None 
Return values:
None Configures the different GPIO ports.
Parameters:
None 
Return values:
None 

Definition at line 221 of file STM32F10x_StdPeriph_Examples/ADC/3ADCs_DMA/main.c.

References ENABLE, GPIO_FullRemap_TIM1, GPIO_FullRemap_TIM3, GPIO_FullRemap_USART3, GPIO_Init(), GPIO_InitStructure, GPIO_InitTypeDef::GPIO_Mode, GPIO_Mode_AF_OD, GPIO_Mode_AF_PP, GPIO_Mode_AIN, GPIO_Mode_IN_FLOATING, GPIO_Mode_Out_PP, GPIO_PartialRemap_USART3, GPIO_InitTypeDef::GPIO_Pin, GPIO_Pin_0, GPIO_Pin_1, GPIO_Pin_10, GPIO_Pin_11, GPIO_Pin_12, GPIO_Pin_13, GPIO_Pin_14, GPIO_Pin_15, GPIO_Pin_2, GPIO_Pin_3, GPIO_Pin_4, GPIO_Pin_5, GPIO_Pin_6, GPIO_Pin_7, GPIO_Pin_8, GPIO_Pin_9, GPIO_PinRemapConfig(), GPIO_Remap_SPI3, GPIO_Remap_SWJ_JTAGDisable, GPIO_Remap_TIM10, GPIO_Remap_USART2, GPIO_SetBits(), GPIO_InitTypeDef::GPIO_Speed, GPIO_Speed_50MHz, GPIOA, GPIOB, GPIOC, GPIOD, GPIOE, GPIOF, RCC_APB2Periph_AFIO, RCC_APB2Periph_GPIOA, RCC_APB2Periph_GPIOB, RCC_APB2Periph_GPIOF, RCC_APB2Periph_TIM10, RCC_APB2Periph_TIM9, and RCC_APB2PeriphClockCmd().

Referenced by main().

void HardFault_Handler ( void   ) 

This function handles Hard Fault exception.

Parameters:
None 
Return values:
None 

Definition at line 60 of file STM32F10x_StdPeriph_Examples/BKP/Tamper/stm32f10x_it.c.

uint32_t IsBackupRegReset ( void   ) 

Checks if the Backup DRx registers are reset or not.

Parameters:
None 
Return values:
0,: All Backup DRx registers are reset

  • Value different from 0: Number of the first Backup register not reset

Definition at line 198 of file STM32F10x_StdPeriph_Examples/BKP/Tamper/main.c.

References BKP_DR_NUMBER, BKP_ReadBackupRegister(), BKPDataReg, and index.

Referenced by TAMPER_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_stm32f10x_xx.s) before to branch to application main. To reconfigure the default setting of SystemInit() function, refer to system_stm32f10x.c file

Definition at line 73 of file STM32F10x_StdPeriph_Examples/BKP/Tamper/main.c.

References BKP_ClearFlag(), BKP_ITConfig(), BKP_TamperPinCmd(), BKP_TamperPinLevel_Low, BKP_TamperPinLevelConfig(), CheckBackupReg(), DISABLE, ENABLE, LED1, LED2, LED3, LED4, NVIC_Configuration(), PWR_BackupAccessCmd(), RCC_APB1Periph_BKP, RCC_APB1Periph_PWR, RCC_APB1PeriphClockCmd(), STM_EVAL_LEDInit(), STM_EVAL_LEDOn(), and WriteToBackupReg().

void MemManage_Handler ( void   ) 

This function handles Memory Manage exception.

Parameters:
None 
Return values:
None 

Definition at line 73 of file STM32F10x_StdPeriph_Examples/BKP/Tamper/stm32f10x_it.c.

void NMI_Handler ( void   ) 

This function handles NMI exception.

Parameters:
None 
Return values:
None 

Definition at line 51 of file STM32F10x_StdPeriph_Examples/BKP/Tamper/stm32f10x_it.c.

void NVIC_Configuration ( void   ) 
void PendSV_Handler ( void   ) 

This function handles PendSV_Handler exception.

Parameters:
None 
Return values:
None 

Definition at line 130 of file STM32F10x_StdPeriph_Examples/BKP/Tamper/stm32f10x_it.c.

void SVC_Handler ( void   ) 

This function handles SVCall exception.

Parameters:
None 
Return values:
None 

Definition at line 112 of file STM32F10x_StdPeriph_Examples/BKP/Tamper/stm32f10x_it.c.

void SysTick_Handler ( void   ) 

This function handles SysTick Handler.

Parameters:
None 
Return values:
None 

Definition at line 139 of file STM32F10x_StdPeriph_Examples/BKP/Tamper/stm32f10x_it.c.

void TAMPER_IRQHandler ( void   ) 

This function handles Tamper interrupt request.

Parameters:
None 
Return values:
None 

Definition at line 152 of file STM32F10x_StdPeriph_Examples/BKP/Tamper/stm32f10x_it.c.

References BKP_ClearFlag(), BKP_ClearITPendingBit(), BKP_GetITStatus(), BKP_TamperPinCmd(), DISABLE, ENABLE, IsBackupRegReset(), LED3, LED4, RESET, and STM_EVAL_LEDOn().

void UsageFault_Handler ( void   ) 

This function handles Usage Fault exception.

Parameters:
None 
Return values:
None 

Definition at line 99 of file STM32F10x_StdPeriph_Examples/BKP/Tamper/stm32f10x_it.c.

void WriteToBackupReg ( uint16_t  FirstBackupData  ) 

Writes data Backup DRx registers.

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

Definition at line 157 of file STM32F10x_StdPeriph_Examples/BKP/Tamper/main.c.

References BKP_DR_NUMBER, BKP_WriteBackupRegister(), BKPDataReg, and index.


Variable Documentation

uint16_t BKPDataReg[BKP_DR_NUMBER]
STM32F10x Standard Peripherals Library: Footer

 

 

 

      For complete documentation on STM32(CORTEX M3) 32-bit Microcontrollers platform visit  www.st.com/STM32