1 /********************* (C) COPYRIGHT 2007 RAISONANCE S.A.S. *******************/
\r
4 * @file stm32f10x_circle_it.c
\r
5 * @brief Interrupt handler for the CircleOS project.
\r
11 /******************************************************************************/
\r
13 /* Includes ------------------------------------------------------------------*/
\r
16 /* External variables --------------------------------------------------------*/
\r
18 extern u16 Current_CCR_BackLightStart;
\r
20 /*******************************************************************************
\r
24 *******************************************************************************/
\r
27 * Handles the NMI exception.
\r
30 /******************************************************************************/
\r
31 void NMIException( void ) {}
\r
33 /*******************************************************************************
\r
35 * HardFaultException
\r
37 *******************************************************************************/
\r
40 * Handles the Hard Fault exception.
\r
43 /******************************************************************************/
\r
44 void HardFaultException( void )
\r
46 #ifdef TIMING_ANALYSIS //to debug with a scope
\r
47 GPIO_WriteBit( GPIOA, GPIO_Pin_5, Bit_RESET );
\r
48 GPIO_WriteBit( GPIOA, GPIO_Pin_5, Bit_SET );
\r
52 /*******************************************************************************
\r
54 * MemManageException
\r
56 *******************************************************************************/
\r
59 * Handles the Memory Manage exception.
\r
62 /******************************************************************************/
\r
63 void MemManageException( void ) {}
\r
65 /*******************************************************************************
\r
69 *******************************************************************************/
\r
72 * Handles the Bus Fault exception.
\r
75 /******************************************************************************/
\r
76 void BusFaultException( void ) {}
\r
78 /*******************************************************************************
\r
80 * UsageFaultException
\r
82 *******************************************************************************/
\r
85 * Handles the Usage Fault exception.
\r
88 /******************************************************************************/
\r
89 void UsageFaultException( void ) {}
\r
91 /*******************************************************************************
\r
95 *******************************************************************************/
\r
98 * Handles the Debug Monitor exception.
\r
101 /******************************************************************************/
\r
102 void DebugMonitor( void ) {}
\r
104 /*******************************************************************************
\r
108 *******************************************************************************/
\r
111 * Handles the SVCall exception.
\r
114 /******************************************************************************/
\r
115 void SVCHandler( void ) {}
\r
117 /*******************************************************************************
\r
121 *******************************************************************************/
\r
124 * Handles the PendSVC exception.
\r
127 /******************************************************************************/
\r
128 void PendSVC( void ) {}
\r
130 /*******************************************************************************
\r
134 *******************************************************************************/
\r
137 * Default handling for the IRQ-Exception
\r
140 /******************************************************************************/
\r
141 void DummyHandler ( void ) {}
\r
143 /*******************************************************************************
\r
147 *******************************************************************************/
\r
150 * Handles the TIM2 global interrupt request.
\r
153 /******************************************************************************/
\r
154 void TIM2_IRQHandler( void )
\r
156 #ifdef TIMING_ANALYSIS //to debug with a scope
\r
157 GPIO_WriteBit( GPIOA, GPIO_Pin_7, Bit_RESET );
\r
160 /* Clear TIM2 update interrupt */
\r
161 TIM_ClearITPendingBit( TIM2, TIM_IT_Update );
\r
165 #ifdef TIMING_ANALYSIS //to debug with a scope
\r
166 GPIO_WriteBit( GPIOA, GPIO_Pin_7, Bit_SET );
\r
170 /*******************************************************************************
\r
174 *******************************************************************************/
\r
177 * Handles the TIM3 global interrupt request.
\r
180 /******************************************************************************/
\r
181 void TIM3_IRQHandler( void )
\r
185 if( TIM_GetITStatus( TIM3, TIM_IT_CC3 ) != RESET )
\r
187 capture = TIM_GetCapture3( TIM3 );
\r
189 TIM_SetCompare3( TIM3, capture + CCR_Val + 1 );
\r
190 TIM_ClearITPendingBit( TIM3, TIM_IT_CC3 );
\r
194 /*******************************************************************************
\r
198 *******************************************************************************/
\r
201 * Handles the TIM4 global interrupt request.
\r
204 /******************************************************************************/
\r
205 void TIM4_IRQHandler( void )
\r
207 u16 BackLight_capture = 0;
\r
209 if( TIM_GetITStatus( TIM4, TIM_IT_CC2 ) != RESET )
\r
211 BackLight_capture = TIM_GetCapture2( TIM4 );
\r
213 TIM_SetCompare2( TIM4, BackLight_capture + Current_CCR_BackLightStart + 1 );
\r
214 TIM_ClearITPendingBit( TIM4, TIM_IT_CC2 );
\r