Committer:
Sergunb
Date:
Mon Sep 04 12:03:42 2017 +0000
Revision:
0:f1834a63f7c1
Initial commit

Who changed what in which revision?

UserRevisionLine numberNew contents of line
Sergunb 0:f1834a63f7c1 1 /**
Sergunb 0:f1834a63f7c1 2 ******************************************************************************
Sergunb 0:f1834a63f7c1 3 * @file startup_stm32f10x_md.c
Sergunb 0:f1834a63f7c1 4 * @author Coocox
Sergunb 0:f1834a63f7c1 5 * @version V1.0
Sergunb 0:f1834a63f7c1 6 * @date 12/23/2009
Sergunb 0:f1834a63f7c1 7 * @brief STM32F10x Medium Density Devices Startup code.
Sergunb 0:f1834a63f7c1 8 * This module performs:
Sergunb 0:f1834a63f7c1 9 * - Set the initial SP
Sergunb 0:f1834a63f7c1 10 * - Set the vector table entries with the exceptions ISR address
Sergunb 0:f1834a63f7c1 11 * - Initialize data and bss
Sergunb 0:f1834a63f7c1 12 * - Setup the microcontroller system.
Sergunb 0:f1834a63f7c1 13 * - Call the application's entry point.
Sergunb 0:f1834a63f7c1 14 * After Reset the Cortex-M3 processor is in Thread mode,
Sergunb 0:f1834a63f7c1 15 * priority is Privileged, and the Stack is set to Main.
Sergunb 0:f1834a63f7c1 16 *******************************************************************************
Sergunb 0:f1834a63f7c1 17 */
Sergunb 0:f1834a63f7c1 18
Sergunb 0:f1834a63f7c1 19
Sergunb 0:f1834a63f7c1 20 /*----------Stack Configuration-----------------------------------------------*/
Sergunb 0:f1834a63f7c1 21 #define STACK_SIZE 0x00000100 /*!< The Stack size suggest using even number */
Sergunb 0:f1834a63f7c1 22 __attribute__ ((section(".co_stack")))
Sergunb 0:f1834a63f7c1 23 unsigned long pulStack[STACK_SIZE];
Sergunb 0:f1834a63f7c1 24
Sergunb 0:f1834a63f7c1 25
Sergunb 0:f1834a63f7c1 26 /*----------Macro definition--------------------------------------------------*/
Sergunb 0:f1834a63f7c1 27 #define WEAK __attribute__ ((weak))
Sergunb 0:f1834a63f7c1 28
Sergunb 0:f1834a63f7c1 29
Sergunb 0:f1834a63f7c1 30 /*----------Declaration of the default fault handlers-------------------------*/
Sergunb 0:f1834a63f7c1 31 /* System exception vector handler */
Sergunb 0:f1834a63f7c1 32 __attribute__ ((used))
Sergunb 0:f1834a63f7c1 33 void WEAK Reset_Handler(void);
Sergunb 0:f1834a63f7c1 34 void WEAK NMI_Handler(void);
Sergunb 0:f1834a63f7c1 35 void WEAK HardFault_Handler(void);
Sergunb 0:f1834a63f7c1 36 void WEAK MemManage_Handler(void);
Sergunb 0:f1834a63f7c1 37 void WEAK BusFault_Handler(void);
Sergunb 0:f1834a63f7c1 38 void WEAK UsageFault_Handler(void);
Sergunb 0:f1834a63f7c1 39 void WEAK SVC_Handler(void);
Sergunb 0:f1834a63f7c1 40 void WEAK DebugMon_Handler(void);
Sergunb 0:f1834a63f7c1 41 void WEAK PendSV_Handler(void);
Sergunb 0:f1834a63f7c1 42 void WEAK SysTick_Handler(void);
Sergunb 0:f1834a63f7c1 43 void WEAK WWDG_IRQHandler(void);
Sergunb 0:f1834a63f7c1 44 void WEAK PVD_IRQHandler(void);
Sergunb 0:f1834a63f7c1 45 void WEAK TAMPER_IRQHandler(void);
Sergunb 0:f1834a63f7c1 46 void WEAK RTC_IRQHandler(void);
Sergunb 0:f1834a63f7c1 47 void WEAK FLASH_IRQHandler(void);
Sergunb 0:f1834a63f7c1 48 void WEAK RCC_IRQHandler(void);
Sergunb 0:f1834a63f7c1 49 void WEAK EXTI0_IRQHandler(void);
Sergunb 0:f1834a63f7c1 50 void WEAK EXTI1_IRQHandler(void);
Sergunb 0:f1834a63f7c1 51 void WEAK EXTI2_IRQHandler(void);
Sergunb 0:f1834a63f7c1 52 void WEAK EXTI3_IRQHandler(void);
Sergunb 0:f1834a63f7c1 53 void WEAK EXTI4_IRQHandler(void);
Sergunb 0:f1834a63f7c1 54 void WEAK DMA1_Channel1_IRQHandler(void);
Sergunb 0:f1834a63f7c1 55 void WEAK DMA1_Channel2_IRQHandler(void);
Sergunb 0:f1834a63f7c1 56 void WEAK DMA1_Channel3_IRQHandler(void);
Sergunb 0:f1834a63f7c1 57 void WEAK DMA1_Channel4_IRQHandler(void);
Sergunb 0:f1834a63f7c1 58 void WEAK DMA1_Channel5_IRQHandler(void);
Sergunb 0:f1834a63f7c1 59 void WEAK DMA1_Channel6_IRQHandler(void);
Sergunb 0:f1834a63f7c1 60 void WEAK DMA1_Channel7_IRQHandler(void);
Sergunb 0:f1834a63f7c1 61 void WEAK ADC1_2_IRQHandler(void);
Sergunb 0:f1834a63f7c1 62 void WEAK USB_HP_CAN1_TX_IRQHandler(void);
Sergunb 0:f1834a63f7c1 63 void WEAK USB_LP_CAN1_RX0_IRQHandler(void);
Sergunb 0:f1834a63f7c1 64 void WEAK CAN1_RX1_IRQHandler(void);
Sergunb 0:f1834a63f7c1 65 void WEAK CAN1_SCE_IRQHandler(void);
Sergunb 0:f1834a63f7c1 66 void WEAK EXTI9_5_IRQHandler(void);
Sergunb 0:f1834a63f7c1 67 void WEAK TIM1_BRK_IRQHandler(void);
Sergunb 0:f1834a63f7c1 68 void WEAK TIM1_UP_IRQHandler(void);
Sergunb 0:f1834a63f7c1 69 void WEAK TIM1_TRG_COM_IRQHandler(void);
Sergunb 0:f1834a63f7c1 70 void WEAK TIM1_CC_IRQHandler(void);
Sergunb 0:f1834a63f7c1 71 void WEAK TIM2_IRQHandler(void);
Sergunb 0:f1834a63f7c1 72 void WEAK TIM3_IRQHandler(void);
Sergunb 0:f1834a63f7c1 73 void WEAK TIM4_IRQHandler(void);
Sergunb 0:f1834a63f7c1 74 void WEAK I2C1_EV_IRQHandler(void);
Sergunb 0:f1834a63f7c1 75 void WEAK I2C1_ER_IRQHandler(void);
Sergunb 0:f1834a63f7c1 76 void WEAK I2C2_EV_IRQHandler(void);
Sergunb 0:f1834a63f7c1 77 void WEAK I2C2_ER_IRQHandler(void);
Sergunb 0:f1834a63f7c1 78 void WEAK SPI1_IRQHandler(void);
Sergunb 0:f1834a63f7c1 79 void WEAK SPI2_IRQHandler(void);
Sergunb 0:f1834a63f7c1 80 void WEAK USART1_IRQHandler(void);
Sergunb 0:f1834a63f7c1 81 void WEAK USART2_IRQHandler(void);
Sergunb 0:f1834a63f7c1 82 void WEAK USART3_IRQHandler(void);
Sergunb 0:f1834a63f7c1 83 void WEAK EXTI15_10_IRQHandler(void);
Sergunb 0:f1834a63f7c1 84 void WEAK RTCAlarm_IRQHandler(void);
Sergunb 0:f1834a63f7c1 85 void WEAK USBWakeUp_IRQHandler(void);
Sergunb 0:f1834a63f7c1 86
Sergunb 0:f1834a63f7c1 87
Sergunb 0:f1834a63f7c1 88 /*----------Symbols defined in linker script----------------------------------*/
Sergunb 0:f1834a63f7c1 89 extern unsigned long _sidata; /*!< Start address for the initialization
Sergunb 0:f1834a63f7c1 90 values of the .data section. */
Sergunb 0:f1834a63f7c1 91 extern unsigned long _sdata; /*!< Start address for the .data section */
Sergunb 0:f1834a63f7c1 92 extern unsigned long _edata; /*!< End address for the .data section */
Sergunb 0:f1834a63f7c1 93 extern unsigned long _sbss; /*!< Start address for the .bss section */
Sergunb 0:f1834a63f7c1 94 extern unsigned long _ebss; /*!< End address for the .bss section */
Sergunb 0:f1834a63f7c1 95 extern void _eram; /*!< End address for ram */
Sergunb 0:f1834a63f7c1 96
Sergunb 0:f1834a63f7c1 97
Sergunb 0:f1834a63f7c1 98 /*----------Function prototypes-----------------------------------------------*/
Sergunb 0:f1834a63f7c1 99 extern int main(void); /*!< The entry point for the application. */
Sergunb 0:f1834a63f7c1 100 extern void SystemInit(void); /*!< Setup the microcontroller system(CMSIS) */
Sergunb 0:f1834a63f7c1 101 void Default_Reset_Handler(void); /*!< Default reset handler */
Sergunb 0:f1834a63f7c1 102 static void Default_Handler(void); /*!< Default exception handler */
Sergunb 0:f1834a63f7c1 103
Sergunb 0:f1834a63f7c1 104
Sergunb 0:f1834a63f7c1 105 /**
Sergunb 0:f1834a63f7c1 106 *@brief The minimal vector table for a Cortex M3. Note that the proper constructs
Sergunb 0:f1834a63f7c1 107 * must be placed on this to ensure that it ends up at physical address
Sergunb 0:f1834a63f7c1 108 * 0x00000000.
Sergunb 0:f1834a63f7c1 109 */
Sergunb 0:f1834a63f7c1 110 __attribute__ ((used,section(".isr_vector")))
Sergunb 0:f1834a63f7c1 111 void (* const g_pfnVectors[])(void) =
Sergunb 0:f1834a63f7c1 112 {
Sergunb 0:f1834a63f7c1 113 /*----------Core Exceptions-------------------------------------------------*/
Sergunb 0:f1834a63f7c1 114 (void *)&pulStack[STACK_SIZE], /*!< The initial stack pointer */
Sergunb 0:f1834a63f7c1 115 Reset_Handler, /*!< Reset Handler */
Sergunb 0:f1834a63f7c1 116 NMI_Handler, /*!< NMI Handler */
Sergunb 0:f1834a63f7c1 117 HardFault_Handler, /*!< Hard Fault Handler */
Sergunb 0:f1834a63f7c1 118 MemManage_Handler, /*!< MPU Fault Handler */
Sergunb 0:f1834a63f7c1 119 BusFault_Handler, /*!< Bus Fault Handler */
Sergunb 0:f1834a63f7c1 120 UsageFault_Handler, /*!< Usage Fault Handler */
Sergunb 0:f1834a63f7c1 121 0,0,0,0, /*!< Reserved */
Sergunb 0:f1834a63f7c1 122 SVC_Handler, /*!< SVCall Handler */
Sergunb 0:f1834a63f7c1 123 DebugMon_Handler, /*!< Debug Monitor Handler */
Sergunb 0:f1834a63f7c1 124 0, /*!< Reserved */
Sergunb 0:f1834a63f7c1 125 PendSV_Handler, /*!< PendSV Handler */
Sergunb 0:f1834a63f7c1 126 SysTick_Handler, /*!< SysTick Handler */
Sergunb 0:f1834a63f7c1 127
Sergunb 0:f1834a63f7c1 128 /*----------External Exceptions---------------------------------------------*/
Sergunb 0:f1834a63f7c1 129 WWDG_IRQHandler, /*!< 0: Window Watchdog */
Sergunb 0:f1834a63f7c1 130 PVD_IRQHandler, /*!< 1: PVD through EXTI Line detect */
Sergunb 0:f1834a63f7c1 131 TAMPER_IRQHandler, /*!< 2: Tamper */
Sergunb 0:f1834a63f7c1 132 RTC_IRQHandler, /*!< 3: RTC */
Sergunb 0:f1834a63f7c1 133 FLASH_IRQHandler, /*!< 4: Flash */
Sergunb 0:f1834a63f7c1 134 RCC_IRQHandler, /*!< 5: RCC */
Sergunb 0:f1834a63f7c1 135 EXTI0_IRQHandler, /*!< 6: EXTI Line 0 */
Sergunb 0:f1834a63f7c1 136 EXTI1_IRQHandler, /*!< 7: EXTI Line 1 */
Sergunb 0:f1834a63f7c1 137 EXTI2_IRQHandler, /*!< 8: EXTI Line 2 */
Sergunb 0:f1834a63f7c1 138 EXTI3_IRQHandler, /*!< 9: EXTI Line 3 */
Sergunb 0:f1834a63f7c1 139 EXTI4_IRQHandler, /*!< 10: EXTI Line 4 */
Sergunb 0:f1834a63f7c1 140 DMA1_Channel1_IRQHandler, /*!< 11: DMA1 Channel 1 */
Sergunb 0:f1834a63f7c1 141 DMA1_Channel2_IRQHandler, /*!< 12: DMA1 Channel 2 */
Sergunb 0:f1834a63f7c1 142 DMA1_Channel3_IRQHandler, /*!< 13: DMA1 Channel 3 */
Sergunb 0:f1834a63f7c1 143 DMA1_Channel4_IRQHandler, /*!< 14: DMA1 Channel 4 */
Sergunb 0:f1834a63f7c1 144 DMA1_Channel5_IRQHandler, /*!< 15: DMA1 Channel 5 */
Sergunb 0:f1834a63f7c1 145 DMA1_Channel6_IRQHandler, /*!< 16: DMA1 Channel 6 */
Sergunb 0:f1834a63f7c1 146 DMA1_Channel7_IRQHandler, /*!< 17: DMA1 Channel 7 */
Sergunb 0:f1834a63f7c1 147 ADC1_2_IRQHandler, /*!< 18: ADC1 & ADC2 */
Sergunb 0:f1834a63f7c1 148 USB_HP_CAN1_TX_IRQHandler, /*!< 19: USB High Priority or CAN1 TX */
Sergunb 0:f1834a63f7c1 149 USB_LP_CAN1_RX0_IRQHandler, /*!< 20: USB Low Priority or CAN1 RX0 */
Sergunb 0:f1834a63f7c1 150 CAN1_RX1_IRQHandler, /*!< 21: CAN1 RX1 */
Sergunb 0:f1834a63f7c1 151 CAN1_SCE_IRQHandler, /*!< 22: CAN1 SCE */
Sergunb 0:f1834a63f7c1 152 EXTI9_5_IRQHandler, /*!< 23: EXTI Line 9..5 */
Sergunb 0:f1834a63f7c1 153 TIM1_BRK_IRQHandler, /*!< 24: TIM1 Break */
Sergunb 0:f1834a63f7c1 154 TIM1_UP_IRQHandler, /*!< 25: TIM1 Update */
Sergunb 0:f1834a63f7c1 155 TIM1_TRG_COM_IRQHandler, /*!< 26: TIM1 Trigger and Commutation */
Sergunb 0:f1834a63f7c1 156 TIM1_CC_IRQHandler, /*!< 27: TIM1 Capture Compare */
Sergunb 0:f1834a63f7c1 157 TIM2_IRQHandler, /*!< 28: TIM2 */
Sergunb 0:f1834a63f7c1 158 TIM3_IRQHandler, /*!< 29: TIM3 */
Sergunb 0:f1834a63f7c1 159 TIM4_IRQHandler, /*!< 30: TIM4 */
Sergunb 0:f1834a63f7c1 160 I2C1_EV_IRQHandler, /*!< 31: I2C1 Event */
Sergunb 0:f1834a63f7c1 161 I2C1_ER_IRQHandler, /*!< 32: I2C1 Error */
Sergunb 0:f1834a63f7c1 162 I2C2_EV_IRQHandler, /*!< 33: I2C2 Event */
Sergunb 0:f1834a63f7c1 163 I2C2_ER_IRQHandler, /*!< 34: I2C2 Error */
Sergunb 0:f1834a63f7c1 164 SPI1_IRQHandler, /*!< 35: SPI1 */
Sergunb 0:f1834a63f7c1 165 SPI2_IRQHandler, /*!< 36: SPI2 */
Sergunb 0:f1834a63f7c1 166 USART1_IRQHandler, /*!< 37: USART1 */
Sergunb 0:f1834a63f7c1 167 USART2_IRQHandler, /*!< 38: USART2 */
Sergunb 0:f1834a63f7c1 168 USART3_IRQHandler, /*!< 39: USART3 */
Sergunb 0:f1834a63f7c1 169 EXTI15_10_IRQHandler, /*!< 40: EXTI Line 15..10 */
Sergunb 0:f1834a63f7c1 170 RTCAlarm_IRQHandler, /*!< 41: RTC Alarm through EXTI Line */
Sergunb 0:f1834a63f7c1 171 USBWakeUp_IRQHandler, /*!< 42: USB Wakeup from suspend */
Sergunb 0:f1834a63f7c1 172 0,0,0,0,0,0,0, /*!< Reserved */
Sergunb 0:f1834a63f7c1 173 (void *)0xF108F85F /*!< Boot in RAM mode */
Sergunb 0:f1834a63f7c1 174 };
Sergunb 0:f1834a63f7c1 175
Sergunb 0:f1834a63f7c1 176
Sergunb 0:f1834a63f7c1 177 /**
Sergunb 0:f1834a63f7c1 178 * @brief This is the code that gets called when the processor first
Sergunb 0:f1834a63f7c1 179 * starts execution following a reset event. Only the absolutely
Sergunb 0:f1834a63f7c1 180 * necessary set is performed, after which the application
Sergunb 0:f1834a63f7c1 181 * supplied main() routine is called.
Sergunb 0:f1834a63f7c1 182 * @param None
Sergunb 0:f1834a63f7c1 183 * @retval None
Sergunb 0:f1834a63f7c1 184 */
Sergunb 0:f1834a63f7c1 185 void Default_Reset_Handler(void)
Sergunb 0:f1834a63f7c1 186 {
Sergunb 0:f1834a63f7c1 187 /* Initialize data and bss */
Sergunb 0:f1834a63f7c1 188 unsigned long *pulSrc, *pulDest;
Sergunb 0:f1834a63f7c1 189
Sergunb 0:f1834a63f7c1 190 /* Copy the data segment initializers from flash to SRAM */
Sergunb 0:f1834a63f7c1 191 pulSrc = &_sidata;
Sergunb 0:f1834a63f7c1 192
Sergunb 0:f1834a63f7c1 193 for(pulDest = &_sdata; pulDest < &_edata; )
Sergunb 0:f1834a63f7c1 194 {
Sergunb 0:f1834a63f7c1 195 *(pulDest++) = *(pulSrc++);
Sergunb 0:f1834a63f7c1 196 }
Sergunb 0:f1834a63f7c1 197
Sergunb 0:f1834a63f7c1 198 /* Zero fill the bss segment. This is done with inline assembly since this
Sergunb 0:f1834a63f7c1 199 will clear the value of pulDest if it is not kept in a register. */
Sergunb 0:f1834a63f7c1 200 __asm(" ldr r0, =_sbss\n"
Sergunb 0:f1834a63f7c1 201 " ldr r1, =_ebss\n"
Sergunb 0:f1834a63f7c1 202 " mov r2, #0\n"
Sergunb 0:f1834a63f7c1 203 " .thumb_func\n"
Sergunb 0:f1834a63f7c1 204 "zero_loop:\n"
Sergunb 0:f1834a63f7c1 205 " cmp r0, r1\n"
Sergunb 0:f1834a63f7c1 206 " it lt\n"
Sergunb 0:f1834a63f7c1 207 " strlt r2, [r0], #4\n"
Sergunb 0:f1834a63f7c1 208 " blt zero_loop");
Sergunb 0:f1834a63f7c1 209
Sergunb 0:f1834a63f7c1 210 /* Setup the microcontroller system. */
Sergunb 0:f1834a63f7c1 211 SystemInit();
Sergunb 0:f1834a63f7c1 212
Sergunb 0:f1834a63f7c1 213 /* Call the application's entry point.*/
Sergunb 0:f1834a63f7c1 214 main();
Sergunb 0:f1834a63f7c1 215 }
Sergunb 0:f1834a63f7c1 216
Sergunb 0:f1834a63f7c1 217 /**
Sergunb 0:f1834a63f7c1 218 *@brief Provide weak aliases for each Exception handler to the Default_Handler.
Sergunb 0:f1834a63f7c1 219 * As they are weak aliases, any function with the same name will override
Sergunb 0:f1834a63f7c1 220 * this definition.
Sergunb 0:f1834a63f7c1 221 */
Sergunb 0:f1834a63f7c1 222 #pragma weak Reset_Handler = Default_Reset_Handler
Sergunb 0:f1834a63f7c1 223 #pragma weak NMI_Handler = Default_Handler
Sergunb 0:f1834a63f7c1 224 #pragma weak HardFault_Handler = Default_Handler
Sergunb 0:f1834a63f7c1 225 #pragma weak MemManage_Handler = Default_Handler
Sergunb 0:f1834a63f7c1 226 #pragma weak BusFault_Handler = Default_Handler
Sergunb 0:f1834a63f7c1 227 #pragma weak UsageFault_Handler = Default_Handler
Sergunb 0:f1834a63f7c1 228 #pragma weak SVC_Handler = Default_Handler
Sergunb 0:f1834a63f7c1 229 #pragma weak DebugMon_Handler = Default_Handler
Sergunb 0:f1834a63f7c1 230 #pragma weak PendSV_Handler = Default_Handler
Sergunb 0:f1834a63f7c1 231 #pragma weak SysTick_Handler = Default_Handler
Sergunb 0:f1834a63f7c1 232 #pragma weak WWDG_IRQHandler = Default_Handler
Sergunb 0:f1834a63f7c1 233 #pragma weak PVD_IRQHandler = Default_Handler
Sergunb 0:f1834a63f7c1 234 #pragma weak TAMPER_IRQHandler = Default_Handler
Sergunb 0:f1834a63f7c1 235 #pragma weak RTC_IRQHandler = Default_Handler
Sergunb 0:f1834a63f7c1 236 #pragma weak FLASH_IRQHandler = Default_Handler
Sergunb 0:f1834a63f7c1 237 #pragma weak RCC_IRQHandler = Default_Handler
Sergunb 0:f1834a63f7c1 238 #pragma weak EXTI0_IRQHandler = Default_Handler
Sergunb 0:f1834a63f7c1 239 #pragma weak EXTI1_IRQHandler = Default_Handler
Sergunb 0:f1834a63f7c1 240 #pragma weak EXTI2_IRQHandler = Default_Handler
Sergunb 0:f1834a63f7c1 241 #pragma weak EXTI3_IRQHandler = Default_Handler
Sergunb 0:f1834a63f7c1 242 #pragma weak EXTI4_IRQHandler = Default_Handler
Sergunb 0:f1834a63f7c1 243 #pragma weak DMA1_Channel1_IRQHandler = Default_Handler
Sergunb 0:f1834a63f7c1 244 #pragma weak DMA1_Channel2_IRQHandler = Default_Handler
Sergunb 0:f1834a63f7c1 245 #pragma weak DMA1_Channel3_IRQHandler = Default_Handler
Sergunb 0:f1834a63f7c1 246 #pragma weak DMA1_Channel4_IRQHandler = Default_Handler
Sergunb 0:f1834a63f7c1 247 #pragma weak DMA1_Channel5_IRQHandler = Default_Handler
Sergunb 0:f1834a63f7c1 248 #pragma weak DMA1_Channel6_IRQHandler = Default_Handler
Sergunb 0:f1834a63f7c1 249 #pragma weak DMA1_Channel7_IRQHandler = Default_Handler
Sergunb 0:f1834a63f7c1 250 #pragma weak ADC1_2_IRQHandler = Default_Handler
Sergunb 0:f1834a63f7c1 251 #pragma weak USB_HP_CAN1_TX_IRQHandler = Default_Handler
Sergunb 0:f1834a63f7c1 252 #pragma weak USB_LP_CAN1_RX0_IRQHandler = Default_Handler
Sergunb 0:f1834a63f7c1 253 #pragma weak CAN1_RX1_IRQHandler = Default_Handler
Sergunb 0:f1834a63f7c1 254 #pragma weak CAN1_SCE_IRQHandler = Default_Handler
Sergunb 0:f1834a63f7c1 255 #pragma weak EXTI9_5_IRQHandler = Default_Handler
Sergunb 0:f1834a63f7c1 256 #pragma weak TIM1_BRK_IRQHandler = Default_Handler
Sergunb 0:f1834a63f7c1 257 #pragma weak TIM1_UP_IRQHandler = Default_Handler
Sergunb 0:f1834a63f7c1 258 #pragma weak TIM1_TRG_COM_IRQHandler = Default_Handler
Sergunb 0:f1834a63f7c1 259 #pragma weak TIM1_CC_IRQHandler = Default_Handler
Sergunb 0:f1834a63f7c1 260 #pragma weak TIM2_IRQHandler = Default_Handler
Sergunb 0:f1834a63f7c1 261 #pragma weak TIM3_IRQHandler = Default_Handler
Sergunb 0:f1834a63f7c1 262 #pragma weak TIM4_IRQHandler = Default_Handler
Sergunb 0:f1834a63f7c1 263 #pragma weak I2C1_EV_IRQHandler = Default_Handler
Sergunb 0:f1834a63f7c1 264 #pragma weak I2C1_ER_IRQHandler = Default_Handler
Sergunb 0:f1834a63f7c1 265 #pragma weak I2C2_EV_IRQHandler = Default_Handler
Sergunb 0:f1834a63f7c1 266 #pragma weak I2C2_ER_IRQHandler = Default_Handler
Sergunb 0:f1834a63f7c1 267 #pragma weak SPI1_IRQHandler = Default_Handler
Sergunb 0:f1834a63f7c1 268 #pragma weak SPI2_IRQHandler = Default_Handler
Sergunb 0:f1834a63f7c1 269 #pragma weak USART1_IRQHandler = Default_Handler
Sergunb 0:f1834a63f7c1 270 #pragma weak USART2_IRQHandler = Default_Handler
Sergunb 0:f1834a63f7c1 271 #pragma weak USART3_IRQHandler = Default_Handler
Sergunb 0:f1834a63f7c1 272 #pragma weak EXTI15_10_IRQHandler = Default_Handler
Sergunb 0:f1834a63f7c1 273 #pragma weak RTCAlarm_IRQHandler = Default_Handler
Sergunb 0:f1834a63f7c1 274 #pragma weak USBWakeUp_IRQHandler = Default_Handler
Sergunb 0:f1834a63f7c1 275
Sergunb 0:f1834a63f7c1 276
Sergunb 0:f1834a63f7c1 277 /**
Sergunb 0:f1834a63f7c1 278 * @brief This is the code that gets called when the processor receives an
Sergunb 0:f1834a63f7c1 279 * unexpected interrupt. This simply enters an infinite loop,
Sergunb 0:f1834a63f7c1 280 * preserving the system state for examination by a debugger.
Sergunb 0:f1834a63f7c1 281 * @param None
Sergunb 0:f1834a63f7c1 282 * @retval None
Sergunb 0:f1834a63f7c1 283 */
Sergunb 0:f1834a63f7c1 284 static void Default_Handler(void)
Sergunb 0:f1834a63f7c1 285 {
Sergunb 0:f1834a63f7c1 286 /* Go into an infinite loop. */
Sergunb 0:f1834a63f7c1 287 while (1)
Sergunb 0:f1834a63f7c1 288 {
Sergunb 0:f1834a63f7c1 289 }
Sergunb 0:f1834a63f7c1 290 }
Sergunb 0:f1834a63f7c1 291
Sergunb 0:f1834a63f7c1 292 /*********************** (C) COPYRIGHT 2009 Coocox ************END OF FILE*****/