TIM_6Steps
[STM32F10x_StdPeriph_Examples]

Functions

void BusFault_Handler (void)
 This function handles Bus Fault exception.
void DebugMon_Handler (void)
 This function handles Debug Monitor exception.
void GPIO_Configuration (void)
 Configure the TIM1 Pins.
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 the nested vectored interrupt controller.
void PendSV_Handler (void)
 This function handles PendSV_Handler exception.
void RCC_Configuration (void)
 Configures the different system clocks.
void SVC_Handler (void)
 This function handles SVCall exception.
void SysTick_Configuration (void)
 Configures the SysTick.
void SysTick_Handler (void)
 This function handles SysTick Handler.
void TIM1_TRG_COM_IRQHandler (void)
 This function handles TIM1 Trigger and commutation interrupts requests.
void UsageFault_Handler (void)
 This function handles Usage Fault exception.

Variables

uint16_t CCR1_Val = 32767
uint16_t CCR2_Val = 24575
uint16_t CCR3_Val = 16383
uint16_t CCR4_Val = 8191
__IO uint32_t step = 1
TIM_BDTRInitTypeDef TIM_BDTRInitStructure
TIM_OCInitTypeDef TIM_OCInitStructure
TIM_TimeBaseInitTypeDef TIM_TimeBaseStructure

Function Documentation

void BusFault_Handler ( void   ) 

This function handles Bus Fault exception.

Parameters:
None 
Return values:
None 

Definition at line 85 of file STM32F10x_StdPeriph_Examples/TIM/6Steps/stm32f10x_it.c.

void DebugMon_Handler ( void   ) 

This function handles Debug Monitor exception.

Parameters:
None 
Return values:
None 

Definition at line 109 of file STM32F10x_StdPeriph_Examples/TIM/6Steps/stm32f10x_it.c.

void GPIO_Configuration ( void   ) 
void HardFault_Handler ( void   ) 

This function handles Hard Fault exception.

Parameters:
None 
Return values:
None 

Definition at line 61 of file STM32F10x_StdPeriph_Examples/TIM/6Steps/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 57 of file STM32F10x_StdPeriph_Examples/TIM/6Steps/main.c.

References ENABLE, GPIO_Configuration(), NVIC_Configuration(), RCC_Configuration(), SysTick_Configuration(), TIM1, TIM_BDTRInitTypeDef::TIM_AutomaticOutput, TIM_AutomaticOutput_Enable, TIM_BDTRConfig(), TIM_BDTRInitTypeDef::TIM_Break, TIM_Break_Enable, TIM_BDTRInitTypeDef::TIM_BreakPolarity, TIM_BreakPolarity_High, TIM_CCPreloadControl(), TIM_TimeBaseInitTypeDef::TIM_ClockDivision, TIM_Cmd(), TIM_TimeBaseInitTypeDef::TIM_CounterMode, TIM_CounterMode_Up, TIM_CtrlPWMOutputs(), TIM_BDTRInitTypeDef::TIM_DeadTime, TIM_IT_COM, TIM_ITConfig(), TIM_BDTRInitTypeDef::TIM_LOCKLevel, TIM_LOCKLevel_OFF, TIM_OC1Init(), TIM_OC2Init(), TIM_OC3Init(), TIM_OCInitTypeDef::TIM_OCIdleState, TIM_OCIdleState_Set, TIM_OCInitTypeDef::TIM_OCMode, TIM_OCMode_Timing, TIM_OCInitTypeDef::TIM_OCNIdleState, TIM_OCNIdleState_Set, TIM_OCInitTypeDef::TIM_OCNPolarity, TIM_OCNPolarity_High, TIM_OCInitTypeDef::TIM_OCPolarity, TIM_OCPolarity_High, TIM_BDTRInitTypeDef::TIM_OSSIState, TIM_OSSIState_Enable, TIM_BDTRInitTypeDef::TIM_OSSRState, TIM_OSSRState_Enable, TIM_OCInitTypeDef::TIM_OutputNState, TIM_OutputNState_Enable, TIM_OCInitTypeDef::TIM_OutputState, TIM_OutputState_Enable, TIM_TimeBaseInitTypeDef::TIM_Period, TIM_TimeBaseInitTypeDef::TIM_Prescaler, TIM_OCInitTypeDef::TIM_Pulse, TIM_TimeBaseInitTypeDef::TIM_RepetitionCounter, and TIM_TimeBaseInit().

void MemManage_Handler ( void   ) 

This function handles Memory Manage exception.

Parameters:
None 
Return values:
None 

Definition at line 73 of file STM32F10x_StdPeriph_Examples/TIM/6Steps/stm32f10x_it.c.

void NMI_Handler ( void   ) 

This function handles NMI exception.

Parameters:
None 
Return values:
None 

Definition at line 52 of file STM32F10x_StdPeriph_Examples/TIM/6Steps/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 125 of file STM32F10x_StdPeriph_Examples/TIM/6Steps/stm32f10x_it.c.

void RCC_Configuration ( void   ) 

Configures the different system clocks.

Parameters:
None 
Return values:
None 

Definition at line 164 of file STM32F10x_StdPeriph_Examples/TIM/6Steps/main.c.

References ENABLE, RCC_APB2Periph_AFIO, RCC_APB2Periph_GPIOA, RCC_APB2Periph_GPIOB, RCC_APB2Periph_GPIOE, RCC_APB2Periph_TIM1, and RCC_APB2PeriphClockCmd().

void SVC_Handler ( void   ) 

This function handles SVCall exception.

Parameters:
None 
Return values:
None 

Definition at line 117 of file STM32F10x_StdPeriph_Examples/TIM/6Steps/stm32f10x_it.c.

void SysTick_Configuration ( void   ) 

Configures the SysTick.

Parameters:
None 
Return values:
None 

Definition at line 222 of file STM32F10x_StdPeriph_Examples/TIM/6Steps/main.c.

References SystemCoreClock, and SysTick_IRQn.

void SysTick_Handler ( void   ) 

This function handles SysTick Handler.

Parameters:
None 
Return values:
None 

Definition at line 133 of file STM32F10x_StdPeriph_Examples/TIM/6Steps/stm32f10x_it.c.

References TIM1, TIM_EventSource_COM, and TIM_GenerateEvent().

void TIM1_TRG_COM_IRQHandler ( void   ) 

This function handles TIM1 Trigger and commutation interrupts requests.

Parameters:
None 
Return values:
None 

Definition at line 152 of file STM32F10x_StdPeriph_Examples/TIM/6Steps/stm32f10x_it.c.

References step, TIM1, TIM_CCx_Disable, TIM_CCx_Enable, TIM_CCxCmd(), TIM_CCxN_Disable, TIM_CCxN_Enable, TIM_CCxNCmd(), TIM_Channel_1, TIM_Channel_2, TIM_Channel_3, TIM_ClearITPendingBit(), TIM_IT_COM, TIM_OCMode_PWM1, and TIM_SelectOCxM().

void UsageFault_Handler ( void   ) 

This function handles Usage Fault exception.

Parameters:
None 
Return values:
None 

Definition at line 97 of file STM32F10x_StdPeriph_Examples/TIM/6Steps/stm32f10x_it.c.


Variable Documentation

uint16_t CCR1_Val = 32767
uint16_t CCR2_Val = 24575
uint16_t CCR3_Val = 16383
uint16_t CCR4_Val = 8191
__IO uint32_t step = 1
STM32F10x Standard Peripherals Library: Footer

 

 

 

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