]> git.sur5r.net Git - freertos/blob - FreeRTOS/Demo/ARM7_STR75x_IAR/75x_vect.s
Update version number in readiness for V10.3.0 release. Sync SVN with reviewed releas...
[freertos] / FreeRTOS / Demo / ARM7_STR75x_IAR / 75x_vect.s
1 ;******************** (C) COPYRIGHT 2006 STMicroelectronics ********************\r
2 ;* File Name          : 75x_vect.c\r
3 ;* Author             : MCD Application Team\r
4 ;* Date First Issued  : 03/10/2006\r
5 ;* Description        : This file used to initialize the exception and IRQ\r
6 ;*                      vectors, and to enter/return to/from exceptions handlers.\r
7 ;*******************************************************************************\r
8 ; History:\r
9 ; 07/17/2006 : V1.0\r
10 ; 03/10/2006 : V0.1\r
11 ;*******************************************************************************\r
12 ;* THE PRESENT SOFTWARE WHICH IS FOR GUIDANCE ONLY AIMS AT PROVIDING CUSTOMERS\r
13 ;* WITH CODING INFORMATION REGARDING THEIR PRODUCTS IN ORDER FOR THEM TO SAVE TIME.\r
14 ;* AS A RESULT, STMICROELECTRONICS SHALL NOT BE HELD LIABLE FOR ANY DIRECT,\r
15 ;* INDIRECT OR CONSEQUENTIAL DAMAGES WITH RESPECT TO ANY CLAIMS ARISING FROM THE\r
16 ;* CONTENT OF SUCH SOFTWARE AND/OR THE USE MADE BY CUSTOMERS OF THE CODING\r
17 ;* INFORMATION CONTAINED HEREIN IN CONNECTION WITH THEIR PRODUCTS.\r
18 ;*******************************************************************************\r
19 \r
20 #include "FreeRTOSConfig.h"\r
21 #include "ISR_Support.h"\r
22 \r
23 \r
24                 PROGRAM ?RESET\r
25                 SECTION .intvec:CODE(2)                 \r
26                 CODE32\r
27 \r
28 EIC_base_addr         EQU    0xFFFFF800 ; EIC base address\r
29 CICR_off_addr         EQU    0x04       ; Current Interrupt Channel Register\r
30 IVR_off_addr          EQU    0x18       ; Interrupt Vector Register\r
31 IPR_off_addr          EQU    0x40       ; Interrupt Pending Register\r
32 \r
33 \r
34 ;*******************************************************************************\r
35 ;              Import  the __program_start address from 75x_init.s\r
36 ;*******************************************************************************\r
37 \r
38         IMPORT  __iar_program_start\r
39 \r
40 \r
41 \r
42 ;*******************************************************************************\r
43 ;                      Import exception handlers\r
44 ;*******************************************************************************\r
45 \r
46         IMPORT  Undefined_Handler\r
47         IMPORT  SWI_Handler\r
48         IMPORT  Prefetch_Handler\r
49         IMPORT  Abort_Handler\r
50         IMPORT  FIQ_Handler\r
51 \r
52 ;*******************************************************************************\r
53 ;                   Import IRQ handlers from 75x_it.c\r
54 ;*******************************************************************************\r
55 \r
56         IMPORT WAKUP_IRQHandler\r
57         IMPORT TIM2_OC2_IRQHandler\r
58         IMPORT TIM2_OC1_IRQHandler\r
59         IMPORT TIM2_IC12_IRQHandler\r
60         IMPORT TIM2_UP_IRQHandler\r
61         IMPORT TIM1_OC2_IRQHandler\r
62         IMPORT TIM1_OC1_IRQHandler\r
63         IMPORT TIM1_IC12_IRQHandler\r
64         IMPORT TIM1_UP_IRQHandler\r
65         IMPORT TIM0_OC2_IRQHandler\r
66         IMPORT TIM0_OC1_IRQHandler\r
67         IMPORT TIM0_IC12_IRQHandler\r
68         IMPORT TIM0_UP_IRQHandler\r
69         IMPORT PWM_OC123_IRQHandler\r
70         IMPORT PWM_EM_IRQHandler\r
71         IMPORT PWM_UP_IRQHandler\r
72         IMPORT I2C_IRQHandler\r
73         IMPORT SSP1_IRQHandler\r
74         IMPORT SSP0_IRQHandler\r
75         IMPORT UART2_IRQHandler\r
76         IMPORT UART1_IRQHandler\r
77         IMPORT vSerialISR\r
78         IMPORT CAN_IRQHandler\r
79         IMPORT USB_LP_IRQHandler\r
80         IMPORT USB_HP_IRQHandler\r
81         IMPORT ADC_IRQHandler\r
82         IMPORT DMA_IRQHandler\r
83         IMPORT EXTIT_IRQHandler\r
84         IMPORT MRCC_IRQHandler\r
85         IMPORT FLASHSMI_IRQHandler\r
86         IMPORT RTC_IRQHandler\r
87         IMPORT TB_IRQHandler\r
88                 IMPORT vPortPreemptiveTick\r
89                 IMPORT vPortYieldProcessor\r
90                 IMPORT UART0_IRQHandler\r
91 \r
92 ;*******************************************************************************\r
93 ;            Export Peripherals IRQ handlers table address\r
94 ;*******************************************************************************\r
95 \r
96         EXPORT  WAKUP_Addr\r
97 \r
98 ;*******************************************************************************\r
99 ;                        Exception vectors\r
100 ;*******************************************************************************\r
101 \r
102 \r
103         LDR     PC, Reset_Addr\r
104         LDR     PC, Undefined_Addr\r
105         LDR     PC, SWI_Addr\r
106         LDR     PC, Prefetch_Addr\r
107         LDR     PC, Abort_Addr\r
108         NOP                             ; Reserved vector\r
109         LDR     PC, IRQ_Addr\r
110         LDR     PC, FIQ_Addr\r
111 \r
112 ;*******************************************************************************\r
113 ;               Exception handlers address table\r
114 ;*******************************************************************************\r
115 \r
116 Reset_Addr      DCD     __iar_program_start\r
117 Undefined_Addr  DCD     UndefinedHandler\r
118 SWI_Addr        DCD     vPortYieldProcessor\r
119 Prefetch_Addr   DCD     PrefetchAbortHandler\r
120 Abort_Addr      DCD     DataAbortHandler\r
121                 DCD     0               ; Reserved vector\r
122 IRQ_Addr        DCD     IRQHandler\r
123 FIQ_Addr        DCD     FIQHandler\r
124 \r
125 ;*******************************************************************************\r
126 ;              Peripherals IRQ handlers address table\r
127 ;*******************************************************************************\r
128 \r
129 WAKUP_Addr         DCD  WAKUPIRQHandler\r
130 TIM2_OC2_Addr      DCD  TIM2_OC2IRQHandler\r
131 TIM2_OC1_Addr      DCD  TIM2_OC1IRQHandler\r
132 TIM2_IC12_Addr     DCD  TIM2_IC12IRQHandler\r
133 TIM2_UP_Addr       DCD  TIM2_UPIRQHandler\r
134 TIM1_OC2_Addr      DCD  TIM1_OC2IRQHandler\r
135 TIM1_OC1_Addr      DCD  TIM1_OC1IRQHandler\r
136 TIM1_IC12_Addr     DCD  TIM1_IC12IRQHandler\r
137 TIM1_UP_Addr       DCD  TIM1_UPIRQHandler\r
138 TIM0_OC2_Addr      DCD  TIM0_OC2IRQHandler\r
139 TIM0_OC1_Addr      DCD  TIM0_OC1IRQHandler\r
140 TIM0_IC12_Addr     DCD  TIM0_IC12IRQHandler\r
141 TIM0_UP_Addr       DCD  TIM0_UPIRQHandler\r
142 PWM_OC123_Addr     DCD  PWM_OC123IRQHandler\r
143 PWM_EM_Addr        DCD  PWM_EMIRQHandler\r
144 PWM_UP_Addr        DCD  PWM_UPIRQHandler\r
145 I2C_Addr           DCD  I2CIRQHandler\r
146 SSP1_Addr          DCD  SSP1IRQHandler\r
147 SSP0_Addr          DCD  SSP0IRQHandler\r
148 UART2_Addr         DCD  UART2IRQHandler\r
149 UART1_Addr         DCD  UART1IRQHandler\r
150 UART0_Addr         DCD  vSerialISR\r
151 CAN_Addr           DCD  CANIRQHandler\r
152 USB_LP_Addr        DCD  USB_LPIRQHandler\r
153 USB_HP_Addr        DCD  USB_HPIRQHandler\r
154 ADC_Addr           DCD  ADCIRQHandler\r
155 DMA_Addr           DCD  DMAIRQHandler\r
156 EXTIT_Addr         DCD  EXTITIRQHandler\r
157 MRCC_Addr          DCD  MRCCIRQHandler\r
158 FLASHSMI_Addr      DCD  FLASHSMIIRQHandler\r
159 RTC_Addr           DCD  RTCIRQHandler\r
160 TB_Addr            DCD  vPortPreemptiveTick\r
161 \r
162 ;*******************************************************************************\r
163 ;                         Exception Handlers\r
164 ;*******************************************************************************\r
165 \r
166 ;*******************************************************************************\r
167 ;* Macro Name     : SaveContext\r
168 ;* Description    : This macro used to save the context before entering\r
169 ;*                  an exception handler.\r
170 ;* Input          : The range of registers to store.\r
171 ;* Output         : none\r
172 ;*******************************************************************************\r
173 SaveContext MACRO reg1,reg2\r
174         STMFD  sp!,{reg1-reg2,lr} ; Save The workspace plus the current return\r
175                               ; address lr_ mode into the stack.\r
176         MRS    r1,spsr        ; Save the spsr_mode into r1.\r
177         STMFD  sp!,{r1}       ; Save spsr.\r
178         ENDM\r
179 \r
180 ;*******************************************************************************\r
181 ;* Macro Name     : RestoreContext\r
182 ;* Description    : This macro used to restore the context to return from\r
183 ;*                  an exception handler and continue the program execution.\r
184 ;* Input          : The range of registers to restore.\r
185 ;* Output         : none\r
186 ;*******************************************************************************\r
187 RestoreContext MACRO reg1,reg2\r
188         LDMFD   sp!,{r1}        ; Restore the saved spsr_mode into r1.\r
189         MSR     spsr_cxsf,r1    ; Restore spsr_mode.\r
190         LDMFD   sp!,{reg1-reg2,pc}^; Return to the instruction following...\r
191                                 ; ...the exception interrupt.\r
192         ENDM\r
193 \r
194 ;*******************************************************************************\r
195 ;* Function Name  : UndefinedHandler\r
196 ;* Description    : This function called when undefined instruction exception\r
197 ;*                  is entered.\r
198 ;* Input          : none\r
199 ;* Output         : none\r
200 ;*******************************************************************************\r
201 UndefinedHandler\r
202         SaveContext r0,r12         ; Save the workspace plus the current\r
203                                    ; return address lr_ und and spsr_und.\r
204         ldr r0,=Undefined_Handler\r
205         ldr lr,=Undefined_Handler_end\r
206         bx r0                       ;Branch to Undefined_Handler\r
207 Undefined_Handler_end:\r
208         RestoreContext r0,r12      ; Return to the instruction following...\r
209                                     ; ...the undefined instruction.\r
210 \r
211 ;*******************************************************************************\r
212 ;* Function Name  : SWIHandler\r
213 ;* Description    : This function called when SWI instruction executed.\r
214 ;* Input          : none\r
215 ;* Output         : none\r
216 ;*******************************************************************************\r
217 SWIHandler\r
218         SaveContext r0,r12         ; Save the workspace plus the current\r
219                                    ; return address lr_ svc and spsr_svc.\r
220         ldr r0,= SWI_Handler\r
221         ldr lr,= SWI_Handler_end\r
222         bx r0                       ;Branch to  SWI_Handler\r
223 SWI_Handler_end:\r
224         RestoreContext r0,r12     ; Return to the instruction following...\r
225                                   ; ...the SWI instruction.\r
226 \r
227 ;*******************************************************************************\r
228 ;* Function Name  : IRQHandler\r
229 ;* Description    : This function called when IRQ exception is entered.\r
230 ;* Input          : none\r
231 ;* Output         : none\r
232 ;*******************************************************************************\r
233 IRQHandler\r
234         portSAVE_CONTEXT                                        ; Save the context of the current task.\r
235 \r
236         LDR    r0, =EIC_base_addr\r
237         LDR    r1, =IVR_off_addr\r
238         LDR    lr, =ReturnAddress                       ; Load the return address.      \r
239         ADD    pc,r0,r1                                         ; Branch to the IRQ handler.\r
240 ReturnAddress\r
241         LDR    r0, =EIC_base_addr\r
242         LDR    r2, [r0, #CICR_off_addr]         ; Get the IRQ channel number\r
243         MOV    r3,#1\r
244         MOV    r3,r3,LSL r2\r
245         STR    r3,[r0, #IPR_off_addr]           ; Clear the corresponding IPR bit.\r
246         \r
247         portRESTORE_CONTEXT                                     ; Restore the context of the selected task.\r
248 \r
249         \r
250 ;*******************************************************************************\r
251 ;* Function Name  : PrefetchAbortHandler\r
252 ;* Description    : This function called when Prefetch Abort exception is entered.\r
253 ;* Input          : none\r
254 ;* Output         : none\r
255 ;*******************************************************************************\r
256 PrefetchAbortHandler\r
257         SUB    lr,lr,#4        ; Update the link register.\r
258         SaveContext r0,r7      ; Save the workspace plus the current\r
259                                ; return address lr_abt and spsr_abt.\r
260         ldr r0,= Prefetch_Handler\r
261         ldr lr,= Prefetch_Handler_end\r
262         bx r0                       ;Branch to  Prefetch_Handler\r
263 Prefetch_Handler_end:\r
264         RestoreContext r0,r7   ; Return to the instruction following that...\r
265                                ; ...has generated the prefetch abort exception.\r
266 \r
267 ;*******************************************************************************\r
268 ;* Function Name  : DataAbortHandler\r
269 ;* Description    : This function is called when Data Abort exception is entered.\r
270 ;* Input          : none\r
271 ;* Output         : none\r
272 ;*******************************************************************************\r
273 DataAbortHandler\r
274         SUB    lr,lr,#8            ; Update the link register.\r
275         SaveContext r0,r12         ; Save the workspace plus the current\r
276                                    ; return address lr_ abt and spsr_abt.\r
277         ldr r0,= Abort_Handler\r
278         ldr lr,= Abort_Handler_end\r
279         bx r0                       ;Branch to  Abort_Handler\r
280 Abort_Handler_end:\r
281         RestoreContext r0,r12       ; Return to the instruction following that...\r
282                                     ; ...has generated the data abort exception.\r
283 \r
284 ;*******************************************************************************\r
285 ;* Function Name  : FIQHandler\r
286 ;* Description    : This function is called when FIQ exception is entered.\r
287 ;* Input          : none\r
288 ;* Output         : none\r
289 ;*******************************************************************************\r
290 FIQHandler\r
291         SUB    lr,lr,#4            ; Update the link register.\r
292         SaveContext r0,r7          ; Save the workspace plus the current\r
293                                    ; return address lr_ fiq and spsr_fiq.\r
294         ldr r0,= FIQ_Handler\r
295         ldr lr,= FIQ_Handler_end\r
296         bx r0                       ;Branch to  FIQ_Handler\r
297 FIQ_Handler_end:\r
298         RestoreContext r0,r7        ; Restore the context and return to the...\r
299                                     ; ...program execution.\r
300 \r
301 ;*******************************************************************************\r
302 ;* Macro Name     : IRQ_to_SYS\r
303 ;* Description    : This macro used to switch form IRQ mode to SYS mode.\r
304 ;* Input          : none.\r
305 ;* Output         : none\r
306 ;*******************************************************************************\r
307 IRQ_to_SYS MACRO\r
308         MSR    cpsr_c,#0x1F\r
309         STMFD  sp!,{lr}\r
310        ENDM\r
311 \r
312 ;*******************************************************************************\r
313 ;* Macro Name     : SYS_to_IRQ\r
314 ;* Description    : This macro used to switch from SYS mode to IRQ mode.\r
315 ;* Input          : none.\r
316 ;* Output         : none\r
317 ;*******************************************************************************\r
318 SYS_to_IRQ MACRO\r
319         LDMFD  sp!,{lr}\r
320         MSR    cpsr_c,#0xD2\r
321         MOV    pc,lr\r
322        ENDM\r
323 \r
324 ;*******************************************************************************\r
325 ;* Function Name  : WAKUPIRQHandler\r
326 ;* Description    : This function used to switch to SYS mode before entering\r
327 ;*                  the WAKUP_IRQHandler function located in 75x_it.c.\r
328 ;*                  Then to return to IRQ mode after the WAKUP_IRQHandler\r
329 ;*                  function termination.\r
330 ;* Input          : none\r
331 ;* Output         : none\r
332 ;*******************************************************************************\r
333 WAKUPIRQHandler\r
334         IRQ_to_SYS\r
335         ldr r0,=WAKUP_IRQHandler\r
336         ldr lr,=WAKUP_IRQHandler_end\r
337         bx r0\r
338 WAKUP_IRQHandler_end:\r
339         SYS_to_IRQ\r
340 \r
341 ;*******************************************************************************\r
342 ;* Function Name  : TIM2_OC2IRQHandler\r
343 ;* Description    : This function used to switch to SYS mode before entering\r
344 ;*                  the TIM2_OC2_IRQHandler function located in 75x_it.c.\r
345 ;*                  Then to return to IRQ mode after the TIM2_OC2_IRQHandler\r
346 ;*                  function termination.\r
347 ;* Input          : none\r
348 ;* Output         : none\r
349 ;*******************************************************************************\r
350 TIM2_OC2IRQHandler\r
351         IRQ_to_SYS\r
352         ldr r0,=TIM2_OC2_IRQHandler\r
353         ldr lr,=TIM2_OC2_IRQHandler_end\r
354         bx r0\r
355 TIM2_OC2_IRQHandler_end:\r
356         SYS_to_IRQ\r
357 \r
358 ;*******************************************************************************\r
359 ;* Function Name  : TIM2_OC1IRQHandler\r
360 ;* Description    : This function used to switch to SYS mode before entering\r
361 ;*                  the TIM2_OC1_IRQHandler function located in 75x_it.c.\r
362 ;*                  Then to return to IRQ mode after the TIM2_OC1_IRQHandler\r
363 ;*                  function termination.\r
364 ;* Input          : none\r
365 ;* Output         : none\r
366 ;*******************************************************************************\r
367 TIM2_OC1IRQHandler\r
368         IRQ_to_SYS\r
369         ldr r0,=TIM2_OC1_IRQHandler\r
370         ldr lr,=TIM2_OC1_IRQHandler_end\r
371         bx r0\r
372 TIM2_OC1_IRQHandler_end:\r
373         SYS_to_IRQ\r
374 \r
375 ;*******************************************************************************\r
376 ;* Function Name  : TIM2_IC12IRQHandler\r
377 ;* Description    : This function used to switch to SYS mode before entering\r
378 ;*                  the TIM2_IC12_IRQHandler function located in 75x_it.c.\r
379 ;*                  Then to return to IRQ mode after the TIM2_IC12_IRQHandler\r
380 ;*                  function termination.\r
381 ;* Input          : none\r
382 ;* Output         : none\r
383 ;*******************************************************************************\r
384 TIM2_IC12IRQHandler\r
385         IRQ_to_SYS\r
386         ldr r0,=TIM2_IC12_IRQHandler\r
387         ldr lr,=TIM2_IC12_IRQHandler_end\r
388         bx r0\r
389 TIM2_IC12_IRQHandler_end:\r
390         SYS_to_IRQ\r
391 \r
392 ;*******************************************************************************\r
393 ;* Function Name  : TIM2_UPIRQHandler\r
394 ;* Description    : This function used to switch to SYS mode before entering\r
395 ;*                  the TIM2_UP_IRQHandler function located in 75x_it.c.\r
396 ;*                  Then to return to IRQ mode after the TIM2_UP_IRQHandler\r
397 ;*                  function termination.\r
398 ;* Input          : none\r
399 ;* Output         : none\r
400 ;*******************************************************************************\r
401 TIM2_UPIRQHandler\r
402         IRQ_to_SYS\r
403         ldr r0,=TIM2_UP_IRQHandler\r
404         ldr lr,=TIM2_UP_IRQHandler_end\r
405         bx r0\r
406 TIM2_UP_IRQHandler_end:\r
407         SYS_to_IRQ\r
408 \r
409 ;*******************************************************************************\r
410 ;* Function Name  : TIM1_OC2IRQHandler\r
411 ;* Description    : This function used to switch to SYS mode before entering\r
412 ;*                  the TIM1_OC2_IRQHandler function located in 75x_it.c.\r
413 ;*                  Then to return to IRQ mode after the TIM1_OC2_IRQHandler\r
414 ;*                  function termination.\r
415 ;* Input          : none\r
416 ;* Output         : none\r
417 ;*******************************************************************************\r
418 TIM1_OC2IRQHandler\r
419         IRQ_to_SYS\r
420         ldr r0,=TIM1_OC2_IRQHandler\r
421         ldr lr,=TIM1_OC2_IRQHandler_end\r
422         bx r0\r
423 TIM1_OC2_IRQHandler_end:\r
424         SYS_to_IRQ\r
425 \r
426 ;*******************************************************************************\r
427 ;* Function Name  : TIM1_OC1IRQHandler\r
428 ;* Description    : This function used to switch to SYS mode before entering\r
429 ;*                  the TIM1_OC1_IRQHandler function located in 75x_it.c.\r
430 ;*                  Then to return to IRQ mode after the TIM1_OC1_IRQHandler\r
431 ;*                  function termination.\r
432 ;* Input          : none\r
433 ;* Output         : none\r
434 ;*******************************************************************************\r
435 TIM1_OC1IRQHandler\r
436         IRQ_to_SYS\r
437         ldr r0,=TIM1_OC1_IRQHandler\r
438         ldr lr,=TIM1_OC1_IRQHandler_end\r
439         bx r0\r
440 TIM1_OC1_IRQHandler_end:\r
441         SYS_to_IRQ\r
442 \r
443 ;*******************************************************************************\r
444 ;* Function Name  : TIM1_IC12IRQHandler\r
445 ;* Description    : This function used to switch to SYS mode before entering\r
446 ;*                  the TIM1_IC12_IRQHandler function located in 75x_it.c.\r
447 ;*                  Then to return to IRQ mode after the TIM1_IC12_IRQHandler\r
448 ;*                  function termination.\r
449 ;* Input          : none\r
450 ;* Output         : none\r
451 ;*******************************************************************************\r
452 TIM1_IC12IRQHandler\r
453         IRQ_to_SYS\r
454         ldr r0,=TIM1_IC12_IRQHandler\r
455         ldr lr,=TIM1_IC12_IRQHandler_end\r
456         bx r0\r
457 TIM1_IC12_IRQHandler_end:\r
458         SYS_to_IRQ\r
459 \r
460 ;*******************************************************************************\r
461 ;* Function Name  : TIM1_UPIRQHandler\r
462 ;* Description    : This function used to switch to SYS mode before entering\r
463 ;*                  the TIM1_UP_IRQHandler function located in 75x_it.c.\r
464 ;*                  Then to return to IRQ mode after the TIM1_UP_IRQHandler\r
465 ;*                  function termination.\r
466 ;* Input          : none\r
467 ;* Output         : none\r
468 ;*******************************************************************************\r
469 TIM1_UPIRQHandler\r
470         IRQ_to_SYS\r
471         ldr r0,=TIM1_UP_IRQHandler\r
472         ldr lr,=TIM1_UP_IRQHandler_end\r
473         bx r0\r
474 TIM1_UP_IRQHandler_end:\r
475         SYS_to_IRQ\r
476 \r
477 ;*******************************************************************************\r
478 ;* Function Name  : TIM0_OC2IRQHandler\r
479 ;* Description    : This function used to switch to SYS mode before entering\r
480 ;*                  the TIM0_OC2_IRQHandler function located in 75x_it.c.\r
481 ;*                  Then to return to IRQ mode after the TIM0_OC2_IRQHandler\r
482 ;*                  function termination.\r
483 ;* Input          : none\r
484 ;* Output         : none\r
485 ;*******************************************************************************\r
486 TIM0_OC2IRQHandler\r
487         IRQ_to_SYS\r
488         ldr r0,=TIM0_OC2_IRQHandler\r
489         ldr lr,=TIM0_OC2_IRQHandler_end\r
490         bx r0\r
491 TIM0_OC2_IRQHandler_end:\r
492         SYS_to_IRQ\r
493 \r
494 ;*******************************************************************************\r
495 ;* Function Name  : TIM0_OC1IRQHandler\r
496 ;* Description    : This function used to switch to SYS mode before entering\r
497 ;*                  the TIM0_OC1_IRQHandler function located in 75x_it.c.\r
498 ;*                  Then to return to IRQ mode after the TIM0_OC1_IRQHandler\r
499 ;*                  function termination.\r
500 ;* Input          : none\r
501 ;* Output         : none\r
502 ;*******************************************************************************\r
503 TIM0_OC1IRQHandler\r
504         IRQ_to_SYS\r
505         ldr r0,=TIM0_OC1_IRQHandler\r
506         ldr lr,=TIM0_OC1_IRQHandler_end\r
507         bx r0\r
508 TIM0_OC1_IRQHandler_end:\r
509         SYS_to_IRQ\r
510 \r
511 ;*******************************************************************************\r
512 ;* Function Name  : TIM0_IC12IRQHandler\r
513 ;* Description    : This function used to switch to SYS mode before entering\r
514 ;*                  the TIM0_IC12_IRQHandler function located in 75x_it.c.\r
515 ;*                  Then to return to IRQ mode after the TIM0_IC12_IRQHandler\r
516 ;*                  function termination.\r
517 ;* Input          : none\r
518 ;* Output         : none\r
519 ;*******************************************************************************\r
520 TIM0_IC12IRQHandler\r
521         IRQ_to_SYS\r
522         ldr r0,=TIM0_IC12_IRQHandler\r
523         ldr lr,=TIM0_IC12_IRQHandler_end\r
524         bx r0\r
525 TIM0_IC12_IRQHandler_end:\r
526         SYS_to_IRQ\r
527 \r
528 ;*******************************************************************************\r
529 ;* Function Name  : TIM0_UPIRQHandler\r
530 ;* Description    : This function used to switch to SYS mode before entering\r
531 ;*                  the TIM0_UP_IRQHandler function located in 75x_it.c.\r
532 ;*                  Then to return to IRQ mode after the TIM0_UP_IRQHandler\r
533 ;*                  function termination.\r
534 ;* Input          : none\r
535 ;* Output         : none\r
536 ;*******************************************************************************\r
537 TIM0_UPIRQHandler\r
538         IRQ_to_SYS\r
539         ldr r0,=TIM0_UP_IRQHandler\r
540         ldr lr,=TIM0_UP_IRQHandler_end\r
541         bx r0\r
542 TIM0_UP_IRQHandler_end:\r
543         SYS_to_IRQ\r
544 \r
545 ;*******************************************************************************\r
546 ;* Function Name  : PWM_OC123IRQHandler\r
547 ;* Description    : This function used to switch to SYS mode before entering\r
548 ;*                  the PWM_OC123_IRQHandler function located in 75x_it.c.\r
549 ;*                  Then to return to IRQ mode after the PWM_OC123_IRQHandler\r
550 ;*                  function termination.\r
551 ;* Input          : none\r
552 ;* Output         : none\r
553 ;*******************************************************************************\r
554 PWM_OC123IRQHandler\r
555         IRQ_to_SYS\r
556         ldr r0,=PWM_OC123_IRQHandler\r
557         ldr lr,=PWM_OC123_IRQHandler_end\r
558         bx r0\r
559 PWM_OC123_IRQHandler_end:\r
560         SYS_to_IRQ\r
561 \r
562 ;*******************************************************************************\r
563 ;* Function Name  : PWM_EMIRQHandler\r
564 ;* Description    : This function used to switch to SYS mode before entering\r
565 ;*                  the PWM_EM_IRQHandler function located in 75x_it.c.\r
566 ;*                  Then to return to IRQ mode after the PWM_EM_IRQHandler\r
567 ;*                  function termination.\r
568 ;* Input          : none\r
569 ;* Output         : none\r
570 ;*******************************************************************************\r
571 PWM_EMIRQHandler\r
572         IRQ_to_SYS\r
573         ldr r0,=PWM_EM_IRQHandler\r
574         ldr lr,=PWM_EM_IRQHandler_end\r
575         bx r0\r
576 PWM_EM_IRQHandler_end:\r
577         SYS_to_IRQ\r
578 \r
579 ;*******************************************************************************\r
580 ;* Function Name  : PWM_UPIRQHandler\r
581 ;* Description    : This function used to switch to SYS mode before entering\r
582 ;*                  the PWM_UP_IRQHandler function located in 75x_it.c.\r
583 ;*                  Then to return to IRQ mode after the PWM_UP_IRQHandler\r
584 ;*                  function termination.\r
585 ;* Input          : none\r
586 ;* Output         : none\r
587 ;*******************************************************************************\r
588 PWM_UPIRQHandler\r
589         IRQ_to_SYS\r
590         ldr r0,=PWM_UP_IRQHandler\r
591         ldr lr,=PWM_UP_IRQHandler_end\r
592         bx r0\r
593 PWM_UP_IRQHandler_end:\r
594         SYS_to_IRQ\r
595 \r
596 ;*******************************************************************************\r
597 ;* Function Name  : I2CIRQHandler\r
598 ;* Description    : This function used to switch to SYS mode before entering\r
599 ;*                  the I2C_IRQHandler function located in 75x_it.c.\r
600 ;*                  Then to return to IRQ mode after the I2C_IRQHandler function\r
601 ;*                  termination.\r
602 ;* Input          : none\r
603 ;* Output         : none\r
604 ;*******************************************************************************\r
605 I2CIRQHandler\r
606         IRQ_to_SYS\r
607         ldr r0,=I2C_IRQHandler\r
608         ldr lr,=I2C_IRQHandler_end\r
609         bx r0\r
610 I2C_IRQHandler_end:\r
611         SYS_to_IRQ\r
612 \r
613 ;*******************************************************************************\r
614 ;* Function Name  : SSP1IRQHandler\r
615 ;* Description    : This function used to switch to SYS mode before entering\r
616 ;*                  the SSP1_IRQHandler function located in 75x_it.c.\r
617 ;*                  Then to return to IRQ mode after the SSP1_IRQHandler\r
618 ;*                  function termination.\r
619 ;* Input          : none\r
620 ;* Output         : none\r
621 ;*******************************************************************************\r
622 SSP1IRQHandler\r
623         IRQ_to_SYS\r
624         ldr r0,=SSP1_IRQHandler\r
625         ldr lr,=SSP1_IRQHandler_end\r
626         bx r0\r
627 SSP1_IRQHandler_end:\r
628         SYS_to_IRQ\r
629 \r
630 ;*******************************************************************************\r
631 ;* Function Name  : SSP0IRQHandler\r
632 ;* Description    : This function used to switch to SYS mode before entering\r
633 ;*                  the SSP0_IRQHandler function located in 75x_it.c.\r
634 ;*                  Then to return to IRQ mode after the SSP0_IRQHandler\r
635 ;*                  function termination.\r
636 ;* Input          : none\r
637 ;* Output         : none\r
638 ;*******************************************************************************\r
639 SSP0IRQHandler\r
640         IRQ_to_SYS\r
641         ldr r0,=SSP0_IRQHandler\r
642         ldr lr,=SSP0_IRQHandler_end\r
643         bx r0\r
644 SSP0_IRQHandler_end:\r
645         SYS_to_IRQ\r
646 \r
647 ;*******************************************************************************\r
648 ;* Function Name  : UART2IRQHandler\r
649 ;* Description    : This function used to switch to SYS mode before entering\r
650 ;*                  the UART2_IRQHandler function located in 75x_it.c.\r
651 ;*                  Then to return to IRQ mode after the UART2_IRQHandler\r
652 ;*                  function termination.\r
653 ;* Input          : none\r
654 ;* Output         : none\r
655 ;*******************************************************************************\r
656 UART2IRQHandler\r
657         IRQ_to_SYS\r
658         ldr r0,=UART2_IRQHandler\r
659         ldr lr,=UART2_IRQHandler_end\r
660         bx r0\r
661 UART2_IRQHandler_end:\r
662         SYS_to_IRQ\r
663 \r
664 ;*******************************************************************************\r
665 ;* Function Name  : UART1IRQHandler\r
666 ;* Description    : This function used to switch to SYS mode before entering\r
667 ;*                  the UART1_IRQHandler function located in 75x_it.c.\r
668 ;*                  Then to return to IRQ mode after the UART1_IRQHandler\r
669 ;*                  function termination.\r
670 ;* Input          : none\r
671 ;* Output         : none\r
672 ;*******************************************************************************\r
673 UART1IRQHandler\r
674         IRQ_to_SYS\r
675         ldr r0,=UART1_IRQHandler\r
676         ldr lr,=UART1_IRQHandler_end\r
677         bx r0\r
678 UART1_IRQHandler_end:\r
679         SYS_to_IRQ\r
680 \r
681 ;*******************************************************************************\r
682 ;* Function Name  : UART0IRQHandler\r
683 ;* Description    : This function used to switch to SYS mode before entering\r
684 ;*                  the UART0_IRQHandler function located in 75x_it.c.\r
685 ;*                  Then to return to IRQ mode after the UART0_IRQHandler\r
686 ;*                  function termination.\r
687 ;* Input          : none\r
688 ;* Output         : none\r
689 ;*******************************************************************************\r
690 UART0IRQHandler\r
691         IRQ_to_SYS\r
692         ldr r0,=UART0_IRQHandler\r
693         ldr lr,=UART0_IRQHandler_end\r
694         bx r0\r
695 UART0_IRQHandler_end:\r
696         SYS_to_IRQ\r
697 \r
698 ;*******************************************************************************\r
699 ;* Function Name  : CANIRQHandler\r
700 ;* Description    : This function used to switch to SYS mode before entering\r
701 ;*                  the CAN_IRQHandler function located in 75x_it.c.\r
702 ;*                  Then to return to IRQ mode after the CAN_IRQHandler function\r
703 ;*                  termination.\r
704 ;* Input          : none\r
705 ;* Output         : none\r
706 ;*******************************************************************************\r
707 CANIRQHandler\r
708         IRQ_to_SYS\r
709         ldr r0,=CAN_IRQHandler\r
710         ldr lr,=CAN_IRQHandler_end\r
711         bx r0\r
712 CAN_IRQHandler_end:\r
713         SYS_to_IRQ\r
714 \r
715 ;*******************************************************************************\r
716 ;* Function Name  : USB_LPIRQHandler\r
717 ;* Description    : This function used to switch to SYS mode before entering\r
718 ;*                  the USB_LP_IRQHandler function located in 75x_it.c.\r
719 ;*                  Then to return to IRQ mode after the USB_LP_IRQHandler\r
720 ;*                  function termination.\r
721 ;* Input          : none\r
722 ;* Output         : none\r
723 ;*******************************************************************************\r
724 USB_LPIRQHandler\r
725         IRQ_to_SYS\r
726         ldr r0,=USB_LP_IRQHandler\r
727         ldr lr,=USB_LP_IRQHandler_end\r
728         bx r0\r
729 USB_LP_IRQHandler_end:\r
730         SYS_to_IRQ\r
731 \r
732 ;*******************************************************************************\r
733 ;* Function Name  : USB_HPIRQHandler\r
734 ;* Description    : This function used to switch to SYS mode before entering\r
735 ;*                  the USB_HP_IRQHandler function located in 75x_it.c.\r
736 ;*                  Then to return to IRQ mode after the USB_HP_IRQHandler\r
737 ;*                  function termination.\r
738 ;* Input          : none\r
739 ;* Output         : none\r
740 ;*******************************************************************************\r
741 USB_HPIRQHandler\r
742         IRQ_to_SYS\r
743         ldr r0,=USB_HP_IRQHandler\r
744         ldr lr,=USB_HP_IRQHandler_end\r
745         bx r0\r
746 USB_HP_IRQHandler_end:\r
747         SYS_to_IRQ\r
748 \r
749 ;*******************************************************************************\r
750 ;* Function Name  : ADCIRQHandler\r
751 ;* Description    : This function used to switch to SYS mode before entering\r
752 ;*                  the ADC_IRQHandler function located in 75x_it.c.\r
753 ;*                  Then to return to IRQ mode after the ADC_IRQHandler\r
754 ;*                  function termination.\r
755 ;* Input          : none\r
756 ;* Output         : none\r
757 ;*******************************************************************************\r
758 ADCIRQHandler\r
759         IRQ_to_SYS\r
760         ldr r0,=ADC_IRQHandler\r
761         ldr lr,=ADC_IRQHandler_end\r
762         bx r0\r
763 ADC_IRQHandler_end:\r
764         SYS_to_IRQ\r
765 \r
766 ;*******************************************************************************\r
767 ;* Function Name  : DMAIRQHandler\r
768 ;* Description    : This function used to switch to SYS mode before entering\r
769 ;*                  the DMA_IRQHandler function located in 75x_it.c.\r
770 ;*                  Then to return to IRQ mode after the DMA_IRQHandler\r
771 ;*                  function termination.\r
772 ;* Input          : none\r
773 ;* Output         : none\r
774 ;*******************************************************************************\r
775 DMAIRQHandler\r
776         IRQ_to_SYS\r
777         ldr r0,=DMA_IRQHandler\r
778         ldr lr,=DMA_IRQHandler_end\r
779         bx r0\r
780 DMA_IRQHandler_end:\r
781         SYS_to_IRQ\r
782 \r
783 ;*******************************************************************************\r
784 ;* Function Name  : EXTITIRQHandler\r
785 ;* Description    : This function used to switch to SYS mode before entering\r
786 ;*                  the EXTIT_IRQHandler function located in 75x_it.c.\r
787 ;*                  Then to return to IRQ mode after the EXTIT_IRQHandler\r
788 ;*                  function termination.\r
789 ;* Input          : none\r
790 ;* Output         : none\r
791 ;*******************************************************************************\r
792 EXTITIRQHandler\r
793         IRQ_to_SYS\r
794         ldr r0,=EXTIT_IRQHandler\r
795         ldr lr,=EXTIT_IRQHandler_end\r
796         bx r0\r
797 EXTIT_IRQHandler_end:\r
798         SYS_to_IRQ\r
799 \r
800 ;*******************************************************************************\r
801 ;* Function Name  : MRCCIRQHandler\r
802 ;* Description    : This function used to switch to SYS mode before entering\r
803 ;*                  the MRCC_IRQHandler function located in 75x_it.c.\r
804 ;*                  Then to return to IRQ mode after the MRCC_IRQHandler\r
805 ;*                  function termination.\r
806 ;* Input          : none\r
807 ;* Output         : none\r
808 ;*******************************************************************************\r
809 MRCCIRQHandler\r
810         IRQ_to_SYS\r
811         ldr r0,=MRCC_IRQHandler\r
812         ldr lr,=MRCC_IRQHandler_end\r
813         bx r0\r
814 MRCC_IRQHandler_end:\r
815         SYS_to_IRQ\r
816 \r
817 ;*******************************************************************************\r
818 ;* Function Name  : FLASHSMIIRQHandler\r
819 ;* Description    : This function used to switch to SYS mode before entering\r
820 ;*                  the FLASHSMI_IRQHandler function located in 75x_it.c.\r
821 ;*                  Then to return to IRQ mode after the FLASHSMI_IRQHandler\r
822 ;*                  function termination.\r
823 ;* Input          : none\r
824 ;* Output         : none\r
825 ;*******************************************************************************\r
826 FLASHSMIIRQHandler\r
827         IRQ_to_SYS\r
828         ldr r0,=FLASHSMI_IRQHandler\r
829         ldr lr,=FLASHSMI_IRQHandler_end\r
830         bx r0\r
831 FLASHSMI_IRQHandler_end:\r
832         SYS_to_IRQ\r
833 \r
834 ;*******************************************************************************\r
835 ;* Function Name  : RTCIRQHandler\r
836 ;* Description    : This function used to switch to SYS mode before entering\r
837 ;*                  the RTC_IRQHandler function located in 75x_it.c.\r
838 ;*                  Then to return to IRQ mode after the RTC_IRQHandler function\r
839 ;*                  termination.\r
840 ;* Input          : none\r
841 ;* Output         : none\r
842 ;*******************************************************************************\r
843 RTCIRQHandler\r
844         IRQ_to_SYS\r
845         ldr r0,=RTC_IRQHandler\r
846         ldr lr,=RTC_IRQHandler_end\r
847         bx r0\r
848 RTC_IRQHandler_end:\r
849         SYS_to_IRQ\r
850 \r
851 ;*******************************************************************************\r
852 ;* Function Name  : TBIRQHandler\r
853 ;* Description    : This function used to switch to SYS mode before entering\r
854 ;*                  the TB_IRQHandler function located in 75x_it.c.\r
855 ;*                  Then to return to IRQ mode after the TB_IRQHandler function\r
856 ;*                  termination.\r
857 ;* Input          : none\r
858 ;* Output         : none\r
859 ;*******************************************************************************\r
860 TBIRQHandler\r
861         IRQ_to_SYS\r
862         ldr r0,=TB_IRQHandler\r
863         ldr lr,=TB_IRQHandler_end\r
864         bx r0\r
865 TB_IRQHandler_end:\r
866         SYS_to_IRQ\r
867 \r
868        LTORG\r
869 \r
870         END\r
871 ;******************* (C) COPYRIGHT 2006 STMicroelectronics *****END OF FILE*****\r
872 \r
873 \r
874 \r
875 \r
876 \r
877 \r
878 \r
879 \r
880 \r
881 \r
882 \r