RCC_Example
[STM32F10x_StdPeriph_Examples]

Defines

#define DELAY_COUNT   0x3FFFF

Functions

void BusFault_Handler (void)
 This function handles Bus Fault exception.
void DebugMon_Handler (void)
 This function handles Debug Monitor exception.
void Delay (__IO uint32_t nCount)
 Inserts a delay time.
void HardFault_Handler (void)
 This function handles Hard Fault exception.
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 Vector Table base location.
void PendSV_Handler (void)
 This function handles PendSV_Handler exception.
void RCC_IRQHandler (void)
 This function handles RCC interrupt request.
void SetSysClockTo24 (void)
 Sets System clock frequency to 24MHz and configure HCLK, PCLK2 and PCLK1 prescalers.
void SetSysClockTo36 (void)
 Sets System clock frequency to 36MHz and configure HCLK, PCLK2 and PCLK1 prescalers.
void SetSysClockTo48 (void)
 Sets System clock frequency to 48MHz and configure HCLK, PCLK2 and PCLK1 prescalers.
void SetSysClockTo56 (void)
 Sets System clock frequency to 56MHz and configure HCLK, PCLK2 and PCLK1 prescalers.
void SetSysClockTo72 (void)
 Sets System clock frequency to 72MHz and configure HCLK, PCLK2 and PCLK1 prescalers.
void SetSysClockToHSE (void)
 Selects HSE as System clock source and configure HCLK, PCLK2 and PCLK1 prescalers.
void SVC_Handler (void)
 This function handles SVCall exception.
void SysTick_Handler (void)
 This function handles SysTick Handler.
void UsageFault_Handler (void)
 This function handles Usage Fault exception.

Variables

GPIO_InitTypeDef GPIO_InitStructure
ErrorStatus HSEStartUpStatus
RCC_ClocksTypeDef RCC_ClockFreq

Define Documentation

#define DELAY_COUNT   0x3FFFF

Definition at line 35 of file STM32F10x_StdPeriph_Examples/RCC/main.c.

Referenced by main().


Function Documentation

void BusFault_Handler ( void   ) 

This function handles Bus Fault exception.

Parameters:
None 
Return values:
None 

Definition at line 115 of file STM32F10x_StdPeriph_Examples/RCC/stm32f10x_it.c.

void DebugMon_Handler ( void   ) 

This function handles Debug Monitor exception.

Parameters:
None 
Return values:
None 

Definition at line 150 of file STM32F10x_StdPeriph_Examples/RCC/stm32f10x_it.c.

void Delay ( __IO uint32_t  nCount  ) 

Inserts a delay time.

Parameters:
nCount,: specifies the delay time length.
Return values:
None 

Definition at line 676 of file STM32F10x_StdPeriph_Examples/RCC/main.c.

void HardFault_Handler ( void   ) 

This function handles Hard Fault exception.

Parameters:
None 
Return values:
None 

Definition at line 89 of file STM32F10x_StdPeriph_Examples/RCC/stm32f10x_it.c.

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 69 of file STM32F10x_StdPeriph_Examples/RCC/main.c.

References Delay(), DELAY_COUNT, ENABLE, GPIO_Init(), GPIO_InitTypeDef::GPIO_Mode, GPIO_Mode_AF_PP, GPIO_InitTypeDef::GPIO_Pin, GPIO_Pin_8, GPIO_InitTypeDef::GPIO_Speed, GPIO_Speed_50MHz, GPIOA, LED1, LED2, LED3, LED4, NVIC_Configuration(), RCC_APB2Periph_GPIOA, RCC_APB2PeriphClockCmd(), RCC_ClockSecuritySystemCmd(), RCC_GetClocksFreq(), RCC_MCO_HSE, RCC_MCOConfig(), SetSysClock(), STM_EVAL_LEDInit(), and STM_EVAL_LEDToggle().

void MemManage_Handler ( void   ) 

This function handles Memory Manage exception.

Parameters:
None 
Return values:
None 

Definition at line 102 of file STM32F10x_StdPeriph_Examples/RCC/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/RCC/stm32f10x_it.c.

References ENABLE, RCC_ClearITPendingBit(), RCC_GetITStatus(), RCC_HSE_ON, RCC_HSEConfig(), RCC_IT_CSS, RCC_IT_HSERDY, RCC_IT_PLLRDY, RCC_ITConfig(), and RESET.

void NVIC_Configuration ( void   ) 
void PendSV_Handler ( void   ) 

This function handles PendSV_Handler exception.

Parameters:
None 
Return values:
None 

Definition at line 159 of file STM32F10x_StdPeriph_Examples/RCC/stm32f10x_it.c.

void RCC_IRQHandler ( void   ) 
void SetSysClockTo24 ( void   ) 
void SetSysClockTo36 ( void   ) 
void SetSysClockTo48 ( void   ) 
void SetSysClockTo56 ( void   ) 
void SetSysClockTo72 ( void   ) 
void SetSysClockToHSE ( void   ) 
void SVC_Handler ( void   ) 

This function handles SVCall exception.

Parameters:
None 
Return values:
None 

Definition at line 141 of file STM32F10x_StdPeriph_Examples/RCC/stm32f10x_it.c.

void SysTick_Handler ( void   ) 

This function handles SysTick Handler.

Parameters:
None 
Return values:
None 

Definition at line 168 of file STM32F10x_StdPeriph_Examples/RCC/stm32f10x_it.c.

void UsageFault_Handler ( void   ) 

This function handles Usage Fault exception.

Parameters:
None 
Return values:
None 

Definition at line 128 of file STM32F10x_StdPeriph_Examples/RCC/stm32f10x_it.c.


Variable Documentation

Definition at line 39 of file STM32F10x_StdPeriph_Examples/RCC/main.c.

Definition at line 41 of file STM32F10x_StdPeriph_Examples/RCC/main.c.

Definition at line 40 of file STM32F10x_StdPeriph_Examples/RCC/main.c.

STM32F10x Standard Peripherals Library: Footer

 

 

 

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