FreeCalypso > hg > freecalypso-sw
annotate gsm-fw/L1/glue/l1_isr_glue.c @ 599:a74230436958
gsm-fw/L1/glue/l1_isr_glue.c: initial version concocted
author | Michael Spacefalcon <msokolov@ivan.Harhan.ORG> |
---|---|
date | Sun, 17 Aug 2014 20:44:25 +0000 |
parents | |
children |
rev | line source |
---|---|
599
a74230436958
gsm-fw/L1/glue/l1_isr_glue.c: initial version concocted
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1 /* |
a74230436958
gsm-fw/L1/glue/l1_isr_glue.c: initial version concocted
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
2 * This module contains the LISR and HISR glue functions for L1 |
a74230436958
gsm-fw/L1/glue/l1_isr_glue.c: initial version concocted
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
3 * which used to be in the dl1_com module in the Leonardo version. |
a74230436958
gsm-fw/L1/glue/l1_isr_glue.c: initial version concocted
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
4 * The LoCosto source from which we got our L1 code no longer has a |
a74230436958
gsm-fw/L1/glue/l1_isr_glue.c: initial version concocted
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
5 * dl1_com.c module, and the ISR glue functions in question have been |
a74230436958
gsm-fw/L1/glue/l1_isr_glue.c: initial version concocted
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
6 * moved into csw-system/init_common/init.c - an incredibly messy C |
a74230436958
gsm-fw/L1/glue/l1_isr_glue.c: initial version concocted
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
7 * module that is mostly devoted to LoCosto BSP initialization. |
a74230436958
gsm-fw/L1/glue/l1_isr_glue.c: initial version concocted
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
8 * |
a74230436958
gsm-fw/L1/glue/l1_isr_glue.c: initial version concocted
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
9 * The present C code has been extracted from LoCosto's init.c, |
a74230436958
gsm-fw/L1/glue/l1_isr_glue.c: initial version concocted
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
10 * guided by the disassembly of dl1_com.obj from the Leonardo version. |
a74230436958
gsm-fw/L1/glue/l1_isr_glue.c: initial version concocted
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
11 */ |
a74230436958
gsm-fw/L1/glue/l1_isr_glue.c: initial version concocted
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
12 |
a74230436958
gsm-fw/L1/glue/l1_isr_glue.c: initial version concocted
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
13 #include "config.h" |
a74230436958
gsm-fw/L1/glue/l1_isr_glue.c: initial version concocted
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
14 #include "sys_types.h" |
a74230436958
gsm-fw/L1/glue/l1_isr_glue.c: initial version concocted
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
15 #include "../../nucleus/nucleus.h" |
a74230436958
gsm-fw/L1/glue/l1_isr_glue.c: initial version concocted
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
16 |
a74230436958
gsm-fw/L1/glue/l1_isr_glue.c: initial version concocted
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
17 /* Include Files */ |
a74230436958
gsm-fw/L1/glue/l1_isr_glue.c: initial version concocted
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
18 #include <ctype.h> |
a74230436958
gsm-fw/L1/glue/l1_isr_glue.c: initial version concocted
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
19 #include <stdarg.h> |
a74230436958
gsm-fw/L1/glue/l1_isr_glue.c: initial version concocted
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
20 #include <stdlib.h> |
a74230436958
gsm-fw/L1/glue/l1_isr_glue.c: initial version concocted
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
21 #include <string.h> |
a74230436958
gsm-fw/L1/glue/l1_isr_glue.c: initial version concocted
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
22 |
a74230436958
gsm-fw/L1/glue/l1_isr_glue.c: initial version concocted
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
23 #include "l1_types.h" |
a74230436958
gsm-fw/L1/glue/l1_isr_glue.c: initial version concocted
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
24 #include "l1_confg.h" |
a74230436958
gsm-fw/L1/glue/l1_isr_glue.c: initial version concocted
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
25 #include "l1_const.h" |
a74230436958
gsm-fw/L1/glue/l1_isr_glue.c: initial version concocted
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
26 |
a74230436958
gsm-fw/L1/glue/l1_isr_glue.c: initial version concocted
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
27 #if TESTMODE |
a74230436958
gsm-fw/L1/glue/l1_isr_glue.c: initial version concocted
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
28 #include "l1tm_defty.h" |
a74230436958
gsm-fw/L1/glue/l1_isr_glue.c: initial version concocted
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
29 #endif // TESTMODE |
a74230436958
gsm-fw/L1/glue/l1_isr_glue.c: initial version concocted
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
30 |
a74230436958
gsm-fw/L1/glue/l1_isr_glue.c: initial version concocted
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
31 #if (AUDIO_TASK == 1) |
a74230436958
gsm-fw/L1/glue/l1_isr_glue.c: initial version concocted
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
32 #include "l1audio_const.h" |
a74230436958
gsm-fw/L1/glue/l1_isr_glue.c: initial version concocted
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
33 #include "l1audio_cust.h" |
a74230436958
gsm-fw/L1/glue/l1_isr_glue.c: initial version concocted
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
34 #include "l1audio_defty.h" |
a74230436958
gsm-fw/L1/glue/l1_isr_glue.c: initial version concocted
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
35 #endif // AUDIO_TASK |
a74230436958
gsm-fw/L1/glue/l1_isr_glue.c: initial version concocted
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
36 |
a74230436958
gsm-fw/L1/glue/l1_isr_glue.c: initial version concocted
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
37 #if (L1_GTT == 1) |
a74230436958
gsm-fw/L1/glue/l1_isr_glue.c: initial version concocted
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
38 #include "l1gtt_const.h" |
a74230436958
gsm-fw/L1/glue/l1_isr_glue.c: initial version concocted
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
39 #include "l1gtt_defty.h" |
a74230436958
gsm-fw/L1/glue/l1_isr_glue.c: initial version concocted
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
40 #endif |
a74230436958
gsm-fw/L1/glue/l1_isr_glue.c: initial version concocted
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
41 |
a74230436958
gsm-fw/L1/glue/l1_isr_glue.c: initial version concocted
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
42 #if (L1_MP3 == 1) |
a74230436958
gsm-fw/L1/glue/l1_isr_glue.c: initial version concocted
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
43 #include "l1mp3_defty.h" |
a74230436958
gsm-fw/L1/glue/l1_isr_glue.c: initial version concocted
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
44 #endif |
a74230436958
gsm-fw/L1/glue/l1_isr_glue.c: initial version concocted
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
45 |
a74230436958
gsm-fw/L1/glue/l1_isr_glue.c: initial version concocted
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
46 #if (L1_MIDI == 1) |
a74230436958
gsm-fw/L1/glue/l1_isr_glue.c: initial version concocted
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
47 #include "l1midi_defty.h" |
a74230436958
gsm-fw/L1/glue/l1_isr_glue.c: initial version concocted
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
48 #endif |
a74230436958
gsm-fw/L1/glue/l1_isr_glue.c: initial version concocted
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
49 |
a74230436958
gsm-fw/L1/glue/l1_isr_glue.c: initial version concocted
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
50 #if (L1_AAC == 1) |
a74230436958
gsm-fw/L1/glue/l1_isr_glue.c: initial version concocted
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
51 #include "l1aac_defty.h" |
a74230436958
gsm-fw/L1/glue/l1_isr_glue.c: initial version concocted
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
52 #endif |
a74230436958
gsm-fw/L1/glue/l1_isr_glue.c: initial version concocted
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
53 #if (L1_DYN_DSP_DWNLD == 1) |
a74230436958
gsm-fw/L1/glue/l1_isr_glue.c: initial version concocted
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
54 #include "l1_dyn_dwl_defty.h" |
a74230436958
gsm-fw/L1/glue/l1_isr_glue.c: initial version concocted
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
55 #endif |
a74230436958
gsm-fw/L1/glue/l1_isr_glue.c: initial version concocted
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
56 |
a74230436958
gsm-fw/L1/glue/l1_isr_glue.c: initial version concocted
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
57 #if (TRACE_TYPE == 4) |
a74230436958
gsm-fw/L1/glue/l1_isr_glue.c: initial version concocted
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
58 #include "l1_defty.h" |
a74230436958
gsm-fw/L1/glue/l1_isr_glue.c: initial version concocted
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
59 #endif |
a74230436958
gsm-fw/L1/glue/l1_isr_glue.c: initial version concocted
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
60 |
a74230436958
gsm-fw/L1/glue/l1_isr_glue.c: initial version concocted
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
61 #include "../../bsp/armio.h" |
a74230436958
gsm-fw/L1/glue/l1_isr_glue.c: initial version concocted
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
62 #include "../../bsp/timer.h" |
a74230436958
gsm-fw/L1/glue/l1_isr_glue.c: initial version concocted
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
63 |
a74230436958
gsm-fw/L1/glue/l1_isr_glue.c: initial version concocted
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
64 #include "../../bsp/iq.h" |
a74230436958
gsm-fw/L1/glue/l1_isr_glue.c: initial version concocted
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
65 #include "../../bsp/mem.h" |
a74230436958
gsm-fw/L1/glue/l1_isr_glue.c: initial version concocted
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
66 #include "../../bsp/clkm.h" |
a74230436958
gsm-fw/L1/glue/l1_isr_glue.c: initial version concocted
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
67 #include "../../bsp/inth.h" |
a74230436958
gsm-fw/L1/glue/l1_isr_glue.c: initial version concocted
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
68 |
a74230436958
gsm-fw/L1/glue/l1_isr_glue.c: initial version concocted
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
69 /* |
a74230436958
gsm-fw/L1/glue/l1_isr_glue.c: initial version concocted
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
70 * The function that sets up the HISRs has an assert() macro call in it. |
a74230436958
gsm-fw/L1/glue/l1_isr_glue.c: initial version concocted
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
71 * The Leonardo version was built with the TMS470 compiler's C library |
a74230436958
gsm-fw/L1/glue/l1_isr_glue.c: initial version concocted
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
72 * version of assert() in it, which is not very useful. Here I am |
a74230436958
gsm-fw/L1/glue/l1_isr_glue.c: initial version concocted
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
73 * pulling in some GPF/VSI headers so we get the more useful GPF/VSI |
a74230436958
gsm-fw/L1/glue/l1_isr_glue.c: initial version concocted
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
74 * version of assert() instead. |
a74230436958
gsm-fw/L1/glue/l1_isr_glue.c: initial version concocted
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
75 */ |
a74230436958
gsm-fw/L1/glue/l1_isr_glue.c: initial version concocted
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
76 #include "../../gpf/inc/typedefs.h" |
a74230436958
gsm-fw/L1/glue/l1_isr_glue.c: initial version concocted
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
77 #include "../../gpf/inc/vsi.h" |
a74230436958
gsm-fw/L1/glue/l1_isr_glue.c: initial version concocted
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
78 #include "../../gpf/inc/cust_os.h" |
a74230436958
gsm-fw/L1/glue/l1_isr_glue.c: initial version concocted
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
79 |
a74230436958
gsm-fw/L1/glue/l1_isr_glue.c: initial version concocted
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
80 /* |
a74230436958
gsm-fw/L1/glue/l1_isr_glue.c: initial version concocted
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
81 * Timing monitor |
a74230436958
gsm-fw/L1/glue/l1_isr_glue.c: initial version concocted
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
82 */ |
a74230436958
gsm-fw/L1/glue/l1_isr_glue.c: initial version concocted
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
83 #if (TRACE_TYPE == 4) |
a74230436958
gsm-fw/L1/glue/l1_isr_glue.c: initial version concocted
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
84 extern T_L1A_L1S_COM l1a_l1s_com; |
a74230436958
gsm-fw/L1/glue/l1_isr_glue.c: initial version concocted
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
85 extern T_L1S_GLOBAL l1s; |
a74230436958
gsm-fw/L1/glue/l1_isr_glue.c: initial version concocted
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
86 UNSIGNED max_cpu, fn_max_cpu; |
a74230436958
gsm-fw/L1/glue/l1_isr_glue.c: initial version concocted
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
87 unsigned short layer_1_sync_end_time; |
a74230436958
gsm-fw/L1/glue/l1_isr_glue.c: initial version concocted
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
88 unsigned short max_cpu_flag; |
a74230436958
gsm-fw/L1/glue/l1_isr_glue.c: initial version concocted
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
89 #if (DSP >= 38) |
a74230436958
gsm-fw/L1/glue/l1_isr_glue.c: initial version concocted
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
90 // DSP CPU load measurement trace variables |
a74230436958
gsm-fw/L1/glue/l1_isr_glue.c: initial version concocted
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
91 UWORD32 dsp_max_cpu_load_trace_array[4]; |
a74230436958
gsm-fw/L1/glue/l1_isr_glue.c: initial version concocted
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
92 UWORD32 dsp_max_cpu_load_idle_frame; |
a74230436958
gsm-fw/L1/glue/l1_isr_glue.c: initial version concocted
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
93 unsigned short l1_dsp_cpu_load_trace_flag; |
a74230436958
gsm-fw/L1/glue/l1_isr_glue.c: initial version concocted
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
94 #endif |
a74230436958
gsm-fw/L1/glue/l1_isr_glue.c: initial version concocted
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
95 #endif |
a74230436958
gsm-fw/L1/glue/l1_isr_glue.c: initial version concocted
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
96 |
a74230436958
gsm-fw/L1/glue/l1_isr_glue.c: initial version concocted
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
97 #if (L1_EXT_AUDIO_MGT == 1) |
a74230436958
gsm-fw/L1/glue/l1_isr_glue.c: initial version concocted
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
98 NU_HISR EXT_AUDIO_MGT_hisr; |
a74230436958
gsm-fw/L1/glue/l1_isr_glue.c: initial version concocted
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
99 char FAR ext_audio_mgt_hisr_stack[500]; |
a74230436958
gsm-fw/L1/glue/l1_isr_glue.c: initial version concocted
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
100 extern void Cust_ext_audio_mgt_hisr(void); |
a74230436958
gsm-fw/L1/glue/l1_isr_glue.c: initial version concocted
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
101 #endif |
a74230436958
gsm-fw/L1/glue/l1_isr_glue.c: initial version concocted
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
102 |
a74230436958
gsm-fw/L1/glue/l1_isr_glue.c: initial version concocted
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
103 #if ( (L1_MP3 == 1) || (L1_MIDI == 1) || (L1_AAC == 1) || (L1_DYN_DSP_DWNLD == 1) ) // equivalent to an API_HISR flag |
a74230436958
gsm-fw/L1/glue/l1_isr_glue.c: initial version concocted
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
104 extern void api_hisr(void); |
a74230436958
gsm-fw/L1/glue/l1_isr_glue.c: initial version concocted
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
105 char FAR API_HISR_stack[0x400] __attribute__ ((section ("int.ram"))); |
a74230436958
gsm-fw/L1/glue/l1_isr_glue.c: initial version concocted
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
106 NU_HISR apiHISR; |
a74230436958
gsm-fw/L1/glue/l1_isr_glue.c: initial version concocted
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
107 #endif // (L1_MP3 == 1) || (L1_MIDI == 1) || (L1_DYN_DSP_DWNLD == 1) |
a74230436958
gsm-fw/L1/glue/l1_isr_glue.c: initial version concocted
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
108 |
a74230436958
gsm-fw/L1/glue/l1_isr_glue.c: initial version concocted
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
109 #if (FF_L1_IT_DSP_USF == 1) || (FF_L1_IT_DSP_DTX == 1) |
a74230436958
gsm-fw/L1/glue/l1_isr_glue.c: initial version concocted
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
110 char FAR API_MODEM_HISR_stack[0x400]; // stack size to be tuned |
a74230436958
gsm-fw/L1/glue/l1_isr_glue.c: initial version concocted
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
111 NU_HISR api_modemHISR; |
a74230436958
gsm-fw/L1/glue/l1_isr_glue.c: initial version concocted
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
112 #endif // FF_L1_IT_DSP_USF |
a74230436958
gsm-fw/L1/glue/l1_isr_glue.c: initial version concocted
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
113 |
a74230436958
gsm-fw/L1/glue/l1_isr_glue.c: initial version concocted
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
114 /* |
a74230436958
gsm-fw/L1/glue/l1_isr_glue.c: initial version concocted
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
115 * HISR stack and semaphore needed by L1 |
a74230436958
gsm-fw/L1/glue/l1_isr_glue.c: initial version concocted
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
116 */ |
a74230436958
gsm-fw/L1/glue/l1_isr_glue.c: initial version concocted
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
117 #if (OP_L1_STANDALONE == 0) |
a74230436958
gsm-fw/L1/glue/l1_isr_glue.c: initial version concocted
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
118 #define LAYER_1_SYNC_STACK_SIZE 4000 /* matching Leonardo version */ |
a74230436958
gsm-fw/L1/glue/l1_isr_glue.c: initial version concocted
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
119 unsigned char layer_1_sync_stack[LAYER_1_SYNC_STACK_SIZE]; |
a74230436958
gsm-fw/L1/glue/l1_isr_glue.c: initial version concocted
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
120 #else |
a74230436958
gsm-fw/L1/glue/l1_isr_glue.c: initial version concocted
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
121 #if TESTMODE |
a74230436958
gsm-fw/L1/glue/l1_isr_glue.c: initial version concocted
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
122 char FAR layer_1_sync_stack[2600 /*3600*/]; // Frame interrupt task stack for EVA3 |
a74230436958
gsm-fw/L1/glue/l1_isr_glue.c: initial version concocted
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
123 #else |
a74230436958
gsm-fw/L1/glue/l1_isr_glue.c: initial version concocted
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
124 char FAR layer_1_sync_stack[1600 /* 2600 */]; // Frame interrupt task stack for EVA3 |
a74230436958
gsm-fw/L1/glue/l1_isr_glue.c: initial version concocted
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
125 #endif |
a74230436958
gsm-fw/L1/glue/l1_isr_glue.c: initial version concocted
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
126 #endif /* OP_L1_STANDALONE */ |
a74230436958
gsm-fw/L1/glue/l1_isr_glue.c: initial version concocted
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
127 |
a74230436958
gsm-fw/L1/glue/l1_isr_glue.c: initial version concocted
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
128 NU_HISR layer_1_sync_HISR; // Frame interrupt task stack for EVA3 |
a74230436958
gsm-fw/L1/glue/l1_isr_glue.c: initial version concocted
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
129 |
a74230436958
gsm-fw/L1/glue/l1_isr_glue.c: initial version concocted
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
130 |
a74230436958
gsm-fw/L1/glue/l1_isr_glue.c: initial version concocted
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
131 /* |
a74230436958
gsm-fw/L1/glue/l1_isr_glue.c: initial version concocted
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
132 * l1_create_HISR |
a74230436958
gsm-fw/L1/glue/l1_isr_glue.c: initial version concocted
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
133 * |
a74230436958
gsm-fw/L1/glue/l1_isr_glue.c: initial version concocted
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
134 * Create L1 HISR. This function is called from l1_pei. |
a74230436958
gsm-fw/L1/glue/l1_isr_glue.c: initial version concocted
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
135 * |
a74230436958
gsm-fw/L1/glue/l1_isr_glue.c: initial version concocted
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
136 * Apparently this function was originally called l1_create_ISR(), |
a74230436958
gsm-fw/L1/glue/l1_isr_glue.c: initial version concocted
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
137 * as that is how it appears in the Leonardo dl1_com.obj module. |
a74230436958
gsm-fw/L1/glue/l1_isr_glue.c: initial version concocted
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
138 * The LoCosto version originally had an l1_create_ISR() wrapper |
a74230436958
gsm-fw/L1/glue/l1_isr_glue.c: initial version concocted
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
139 * that simply calls l1_create_HISR(), but I plan on changing |
a74230436958
gsm-fw/L1/glue/l1_isr_glue.c: initial version concocted
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
140 * l1_pei to call l1_create_HISR() instead. -- Space Falcon |
a74230436958
gsm-fw/L1/glue/l1_isr_glue.c: initial version concocted
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
141 */ |
a74230436958
gsm-fw/L1/glue/l1_isr_glue.c: initial version concocted
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
142 void l1_create_HISR (void) |
a74230436958
gsm-fw/L1/glue/l1_isr_glue.c: initial version concocted
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
143 { |
a74230436958
gsm-fw/L1/glue/l1_isr_glue.c: initial version concocted
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
144 STATUS status; |
a74230436958
gsm-fw/L1/glue/l1_isr_glue.c: initial version concocted
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
145 |
a74230436958
gsm-fw/L1/glue/l1_isr_glue.c: initial version concocted
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
146 #if (OP_L1_STANDALONE == 0) |
a74230436958
gsm-fw/L1/glue/l1_isr_glue.c: initial version concocted
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
147 // Fill the entire stack with the pattern 0xFE |
a74230436958
gsm-fw/L1/glue/l1_isr_glue.c: initial version concocted
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
148 memset (layer_1_sync_stack, 0xFE, LAYER_1_SYNC_STACK_SIZE); |
a74230436958
gsm-fw/L1/glue/l1_isr_glue.c: initial version concocted
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
149 #endif |
a74230436958
gsm-fw/L1/glue/l1_isr_glue.c: initial version concocted
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
150 |
a74230436958
gsm-fw/L1/glue/l1_isr_glue.c: initial version concocted
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
151 status = NU_Create_HISR (&layer_1_sync_HISR, |
a74230436958
gsm-fw/L1/glue/l1_isr_glue.c: initial version concocted
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
152 "L1_HISR", |
a74230436958
gsm-fw/L1/glue/l1_isr_glue.c: initial version concocted
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
153 layer_1_sync_HISR_entry, |
a74230436958
gsm-fw/L1/glue/l1_isr_glue.c: initial version concocted
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
154 #if (OP_L1_STANDALONE == 0) |
a74230436958
gsm-fw/L1/glue/l1_isr_glue.c: initial version concocted
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
155 1, |
a74230436958
gsm-fw/L1/glue/l1_isr_glue.c: initial version concocted
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
156 layer_1_sync_stack, |
a74230436958
gsm-fw/L1/glue/l1_isr_glue.c: initial version concocted
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
157 LAYER_1_SYNC_STACK_SIZE); |
a74230436958
gsm-fw/L1/glue/l1_isr_glue.c: initial version concocted
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
158 #else |
a74230436958
gsm-fw/L1/glue/l1_isr_glue.c: initial version concocted
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
159 1, |
a74230436958
gsm-fw/L1/glue/l1_isr_glue.c: initial version concocted
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
160 layer_1_sync_stack, |
a74230436958
gsm-fw/L1/glue/l1_isr_glue.c: initial version concocted
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
161 sizeof(layer_1_sync_stack)); |
a74230436958
gsm-fw/L1/glue/l1_isr_glue.c: initial version concocted
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
162 #endif |
a74230436958
gsm-fw/L1/glue/l1_isr_glue.c: initial version concocted
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
163 |
a74230436958
gsm-fw/L1/glue/l1_isr_glue.c: initial version concocted
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
164 #if (L1_EXT_AUDIO_MGT) |
a74230436958
gsm-fw/L1/glue/l1_isr_glue.c: initial version concocted
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
165 // Create HISR for Ext MIDI activity |
a74230436958
gsm-fw/L1/glue/l1_isr_glue.c: initial version concocted
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
166 //================================== |
a74230436958
gsm-fw/L1/glue/l1_isr_glue.c: initial version concocted
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
167 status += NU_Create_HISR(&EXT_AUDIO_MGT_hisr, |
a74230436958
gsm-fw/L1/glue/l1_isr_glue.c: initial version concocted
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
168 "H_EXT_AUDIO_MGT", |
a74230436958
gsm-fw/L1/glue/l1_isr_glue.c: initial version concocted
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
169 Cust_ext_audio_mgt_hisr, |
a74230436958
gsm-fw/L1/glue/l1_isr_glue.c: initial version concocted
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
170 2, |
a74230436958
gsm-fw/L1/glue/l1_isr_glue.c: initial version concocted
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
171 ext_audio_mgt_hisr_stack, |
a74230436958
gsm-fw/L1/glue/l1_isr_glue.c: initial version concocted
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
172 sizeof(ext_audio_mgt_hisr_stack)); |
a74230436958
gsm-fw/L1/glue/l1_isr_glue.c: initial version concocted
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
173 #endif |
a74230436958
gsm-fw/L1/glue/l1_isr_glue.c: initial version concocted
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
174 |
a74230436958
gsm-fw/L1/glue/l1_isr_glue.c: initial version concocted
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
175 #if ( (L1_MP3 == 1) || (L1_MIDI == 1) || (L1_AAC == 1) || (L1_DYN_DSP_DWNLD == 1) ) // equivalent to an API_HISR flag |
a74230436958
gsm-fw/L1/glue/l1_isr_glue.c: initial version concocted
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
176 status += NU_Create_HISR(&apiHISR, |
a74230436958
gsm-fw/L1/glue/l1_isr_glue.c: initial version concocted
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
177 "API_HISR", |
a74230436958
gsm-fw/L1/glue/l1_isr_glue.c: initial version concocted
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
178 api_hisr, |
a74230436958
gsm-fw/L1/glue/l1_isr_glue.c: initial version concocted
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
179 2, |
a74230436958
gsm-fw/L1/glue/l1_isr_glue.c: initial version concocted
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
180 API_HISR_stack, |
a74230436958
gsm-fw/L1/glue/l1_isr_glue.c: initial version concocted
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
181 sizeof(API_HISR_stack)); |
a74230436958
gsm-fw/L1/glue/l1_isr_glue.c: initial version concocted
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
182 #endif // (L1_MP3 == 1) || (L1_MIDI == 1) || (L1_AAC == 1) || (L1_DYN_DSP_DWNLD == 1) |
a74230436958
gsm-fw/L1/glue/l1_isr_glue.c: initial version concocted
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
183 |
a74230436958
gsm-fw/L1/glue/l1_isr_glue.c: initial version concocted
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
184 #if (FF_L1_IT_DSP_USF == 1) || (FF_L1_IT_DSP_DTX == 1) // equivalent to an API_MODEM_HISR flag |
a74230436958
gsm-fw/L1/glue/l1_isr_glue.c: initial version concocted
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
185 // Create HISR for USF DSP interrupt !!!!. This HISR needs |
a74230436958
gsm-fw/L1/glue/l1_isr_glue.c: initial version concocted
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
186 // to have the highest priority since the USF status needs |
a74230436958
gsm-fw/L1/glue/l1_isr_glue.c: initial version concocted
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
187 // to be known before the next block starts. |
a74230436958
gsm-fw/L1/glue/l1_isr_glue.c: initial version concocted
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
188 //======================================================== |
a74230436958
gsm-fw/L1/glue/l1_isr_glue.c: initial version concocted
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
189 status += NU_Create_HISR(&api_modemHISR, |
a74230436958
gsm-fw/L1/glue/l1_isr_glue.c: initial version concocted
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
190 "MODEM", |
a74230436958
gsm-fw/L1/glue/l1_isr_glue.c: initial version concocted
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
191 api_modem_hisr, |
a74230436958
gsm-fw/L1/glue/l1_isr_glue.c: initial version concocted
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
192 1, |
a74230436958
gsm-fw/L1/glue/l1_isr_glue.c: initial version concocted
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
193 API_MODEM_HISR_stack, |
a74230436958
gsm-fw/L1/glue/l1_isr_glue.c: initial version concocted
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
194 sizeof(API_MODEM_HISR_stack)); |
a74230436958
gsm-fw/L1/glue/l1_isr_glue.c: initial version concocted
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
195 #endif |
a74230436958
gsm-fw/L1/glue/l1_isr_glue.c: initial version concocted
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
196 |
a74230436958
gsm-fw/L1/glue/l1_isr_glue.c: initial version concocted
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
197 assert (status == 0); |
a74230436958
gsm-fw/L1/glue/l1_isr_glue.c: initial version concocted
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
198 } |
a74230436958
gsm-fw/L1/glue/l1_isr_glue.c: initial version concocted
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
199 |
a74230436958
gsm-fw/L1/glue/l1_isr_glue.c: initial version concocted
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
200 /* |
a74230436958
gsm-fw/L1/glue/l1_isr_glue.c: initial version concocted
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
201 * The versions of TP_FrameIntHandler() and layer_1_sync_HISR_entry() |
a74230436958
gsm-fw/L1/glue/l1_isr_glue.c: initial version concocted
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
202 * in the Leonardo dl1_com.obj module contain CPU load measurement |
a74230436958
gsm-fw/L1/glue/l1_isr_glue.c: initial version concocted
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
203 * code, but in the LoCosto version of L1 which we are using this |
a74230436958
gsm-fw/L1/glue/l1_isr_glue.c: initial version concocted
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
204 * functionality has been moved into L1S proper, i.e., inside the |
a74230436958
gsm-fw/L1/glue/l1_isr_glue.c: initial version concocted
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
205 * hisr() function. |
a74230436958
gsm-fw/L1/glue/l1_isr_glue.c: initial version concocted
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
206 */ |
a74230436958
gsm-fw/L1/glue/l1_isr_glue.c: initial version concocted
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
207 |
a74230436958
gsm-fw/L1/glue/l1_isr_glue.c: initial version concocted
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
208 /*-------------------------------------------------------*/ |
a74230436958
gsm-fw/L1/glue/l1_isr_glue.c: initial version concocted
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
209 /* TP_FrameIntHandler() Low Interrupt service routine */ |
a74230436958
gsm-fw/L1/glue/l1_isr_glue.c: initial version concocted
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
210 /*-------------------------------------------------------*/ |
a74230436958
gsm-fw/L1/glue/l1_isr_glue.c: initial version concocted
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
211 /* Parameters : */ |
a74230436958
gsm-fw/L1/glue/l1_isr_glue.c: initial version concocted
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
212 /* Return : */ |
a74230436958
gsm-fw/L1/glue/l1_isr_glue.c: initial version concocted
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
213 /* Functionality : activate Hisr on each frame interrupt*/ |
a74230436958
gsm-fw/L1/glue/l1_isr_glue.c: initial version concocted
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
214 /*-------------------------------------------------------*/ |
a74230436958
gsm-fw/L1/glue/l1_isr_glue.c: initial version concocted
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
215 void TP_FrameIntHandler(void) |
a74230436958
gsm-fw/L1/glue/l1_isr_glue.c: initial version concocted
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
216 { |
a74230436958
gsm-fw/L1/glue/l1_isr_glue.c: initial version concocted
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
217 |
a74230436958
gsm-fw/L1/glue/l1_isr_glue.c: initial version concocted
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
218 #if (OP_L1_STANDALONE == 1) |
a74230436958
gsm-fw/L1/glue/l1_isr_glue.c: initial version concocted
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
219 |
a74230436958
gsm-fw/L1/glue/l1_isr_glue.c: initial version concocted
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
220 #if (TRACE_TYPE==1) |
a74230436958
gsm-fw/L1/glue/l1_isr_glue.c: initial version concocted
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
221 if (trace_info.current_config->l1_dyn_trace & 1<<L1_DYN_TRACE_L1S_CPU_LOAD) |
a74230436958
gsm-fw/L1/glue/l1_isr_glue.c: initial version concocted
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
222 { |
a74230436958
gsm-fw/L1/glue/l1_isr_glue.c: initial version concocted
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
223 TM_ResetTimer (2, 0xFFFF, 1, 0); |
a74230436958
gsm-fw/L1/glue/l1_isr_glue.c: initial version concocted
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
224 TM_StartTimer (2); |
a74230436958
gsm-fw/L1/glue/l1_isr_glue.c: initial version concocted
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
225 } |
a74230436958
gsm-fw/L1/glue/l1_isr_glue.c: initial version concocted
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
226 #endif |
a74230436958
gsm-fw/L1/glue/l1_isr_glue.c: initial version concocted
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
227 |
a74230436958
gsm-fw/L1/glue/l1_isr_glue.c: initial version concocted
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
228 #if (TRACE_TYPE==6) |
a74230436958
gsm-fw/L1/glue/l1_isr_glue.c: initial version concocted
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
229 TM_ResetTimer (2, 0xFFFF, 1, 0); |
a74230436958
gsm-fw/L1/glue/l1_isr_glue.c: initial version concocted
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
230 TM_StartTimer (2); |
a74230436958
gsm-fw/L1/glue/l1_isr_glue.c: initial version concocted
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
231 #endif |
a74230436958
gsm-fw/L1/glue/l1_isr_glue.c: initial version concocted
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
232 |
a74230436958
gsm-fw/L1/glue/l1_isr_glue.c: initial version concocted
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
233 #if (TRACE_TYPE==7) /* CPU_LOAD */ |
a74230436958
gsm-fw/L1/glue/l1_isr_glue.c: initial version concocted
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
234 l1_cpu_load_start(); |
a74230436958
gsm-fw/L1/glue/l1_isr_glue.c: initial version concocted
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
235 #endif |
a74230436958
gsm-fw/L1/glue/l1_isr_glue.c: initial version concocted
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
236 |
a74230436958
gsm-fw/L1/glue/l1_isr_glue.c: initial version concocted
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
237 #else |
a74230436958
gsm-fw/L1/glue/l1_isr_glue.c: initial version concocted
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
238 |
a74230436958
gsm-fw/L1/glue/l1_isr_glue.c: initial version concocted
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
239 #if (TRACE_TYPE == 4) && (TI_NUC_MONITOR != 1) && (WCP_PROF == 1) |
a74230436958
gsm-fw/L1/glue/l1_isr_glue.c: initial version concocted
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
240 TM_ResetTimer (2, TIMER_RESET_VALUE, 1, 0); |
a74230436958
gsm-fw/L1/glue/l1_isr_glue.c: initial version concocted
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
241 TM_StartTimer (2); |
a74230436958
gsm-fw/L1/glue/l1_isr_glue.c: initial version concocted
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
242 #endif |
a74230436958
gsm-fw/L1/glue/l1_isr_glue.c: initial version concocted
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
243 |
a74230436958
gsm-fw/L1/glue/l1_isr_glue.c: initial version concocted
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
244 #if (TI_NUC_MONITOR == 1) |
a74230436958
gsm-fw/L1/glue/l1_isr_glue.c: initial version concocted
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
245 /* Copy LISR buffer in Log buffer each end of HISR */ |
a74230436958
gsm-fw/L1/glue/l1_isr_glue.c: initial version concocted
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
246 ti_nuc_monitor_tdma_action(); |
a74230436958
gsm-fw/L1/glue/l1_isr_glue.c: initial version concocted
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
247 #endif |
a74230436958
gsm-fw/L1/glue/l1_isr_glue.c: initial version concocted
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
248 |
a74230436958
gsm-fw/L1/glue/l1_isr_glue.c: initial version concocted
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
249 #if WCP_PROF == 1 |
a74230436958
gsm-fw/L1/glue/l1_isr_glue.c: initial version concocted
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
250 prf_LogFNSwitch(l1s.actual_time.fn_mod42432); |
a74230436958
gsm-fw/L1/glue/l1_isr_glue.c: initial version concocted
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
251 #endif |
a74230436958
gsm-fw/L1/glue/l1_isr_glue.c: initial version concocted
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
252 |
a74230436958
gsm-fw/L1/glue/l1_isr_glue.c: initial version concocted
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
253 #endif /* OP_L1_STANDALONE */ |
a74230436958
gsm-fw/L1/glue/l1_isr_glue.c: initial version concocted
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
254 |
a74230436958
gsm-fw/L1/glue/l1_isr_glue.c: initial version concocted
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
255 NU_Activate_HISR(&layer_1_sync_HISR); /* Activate HISR interrupt */ |
a74230436958
gsm-fw/L1/glue/l1_isr_glue.c: initial version concocted
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
256 |
a74230436958
gsm-fw/L1/glue/l1_isr_glue.c: initial version concocted
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
257 #if (OP_L1_STANDALONE == 0) |
a74230436958
gsm-fw/L1/glue/l1_isr_glue.c: initial version concocted
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
258 #if (WCP_PROF == 1) |
a74230436958
gsm-fw/L1/glue/l1_isr_glue.c: initial version concocted
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
259 #if (PRF_CALIBRATION == 1) |
a74230436958
gsm-fw/L1/glue/l1_isr_glue.c: initial version concocted
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
260 NU_Activate_HISR(&prf_CalibrationHISR); |
a74230436958
gsm-fw/L1/glue/l1_isr_glue.c: initial version concocted
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
261 #endif |
a74230436958
gsm-fw/L1/glue/l1_isr_glue.c: initial version concocted
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
262 #endif |
a74230436958
gsm-fw/L1/glue/l1_isr_glue.c: initial version concocted
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
263 #endif |
a74230436958
gsm-fw/L1/glue/l1_isr_glue.c: initial version concocted
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
264 |
a74230436958
gsm-fw/L1/glue/l1_isr_glue.c: initial version concocted
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
265 } |
a74230436958
gsm-fw/L1/glue/l1_isr_glue.c: initial version concocted
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
266 |
a74230436958
gsm-fw/L1/glue/l1_isr_glue.c: initial version concocted
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
267 /* |
a74230436958
gsm-fw/L1/glue/l1_isr_glue.c: initial version concocted
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
268 * layer_1_sync_HISR_entry |
a74230436958
gsm-fw/L1/glue/l1_isr_glue.c: initial version concocted
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
269 * |
a74230436958
gsm-fw/L1/glue/l1_isr_glue.c: initial version concocted
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
270 * HISR associated to layer 1 sync. |
a74230436958
gsm-fw/L1/glue/l1_isr_glue.c: initial version concocted
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
271 */ |
a74230436958
gsm-fw/L1/glue/l1_isr_glue.c: initial version concocted
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
272 |
a74230436958
gsm-fw/L1/glue/l1_isr_glue.c: initial version concocted
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
273 void layer_1_sync_HISR_entry (void) |
a74230436958
gsm-fw/L1/glue/l1_isr_glue.c: initial version concocted
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
274 { |
a74230436958
gsm-fw/L1/glue/l1_isr_glue.c: initial version concocted
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
275 // Call Synchronous Layer1 |
a74230436958
gsm-fw/L1/glue/l1_isr_glue.c: initial version concocted
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
276 hisr(); |
a74230436958
gsm-fw/L1/glue/l1_isr_glue.c: initial version concocted
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
277 } |