FreeCalypso > hg > freecalypso-sw
annotate gsm-fw/L1/cfile/l1_isr_glue.c @ 753:7f68d2ab0d33
SIM_TOOLKIT re-enabled: the SIM entity code is broken without it
author | Michael Spacefalcon <msokolov@ivan.Harhan.ORG> |
---|---|
date | Sat, 11 Oct 2014 21:24:24 +0000 |
parents | 3fea71719423 |
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" |
600
3fea71719423
L1: l1_isr_glue.c moved to cfile directory; compiles successfully
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
599
diff
changeset
|
15 #include "../../riviera/rv/general.h" |
599
a74230436958
gsm-fw/L1/glue/l1_isr_glue.c: initial version concocted
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
16 #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
|
17 |
a74230436958
gsm-fw/L1/glue/l1_isr_glue.c: initial version concocted
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
18 /* Include Files */ |
a74230436958
gsm-fw/L1/glue/l1_isr_glue.c: initial version concocted
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
19 #include <ctype.h> |
a74230436958
gsm-fw/L1/glue/l1_isr_glue.c: initial version concocted
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
20 #include <stdarg.h> |
a74230436958
gsm-fw/L1/glue/l1_isr_glue.c: initial version concocted
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
21 #include <stdlib.h> |
a74230436958
gsm-fw/L1/glue/l1_isr_glue.c: initial version concocted
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
22 #include <string.h> |
a74230436958
gsm-fw/L1/glue/l1_isr_glue.c: initial version concocted
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
23 |
a74230436958
gsm-fw/L1/glue/l1_isr_glue.c: initial version concocted
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
24 #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
|
25 #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
|
26 #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
|
27 |
a74230436958
gsm-fw/L1/glue/l1_isr_glue.c: initial version concocted
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
28 #if TESTMODE |
a74230436958
gsm-fw/L1/glue/l1_isr_glue.c: initial version concocted
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
29 #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
|
30 #endif // TESTMODE |
a74230436958
gsm-fw/L1/glue/l1_isr_glue.c: initial version concocted
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
31 |
a74230436958
gsm-fw/L1/glue/l1_isr_glue.c: initial version concocted
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
32 #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
|
33 #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
|
34 #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
|
35 #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
|
36 #endif // AUDIO_TASK |
a74230436958
gsm-fw/L1/glue/l1_isr_glue.c: initial version concocted
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
37 |
a74230436958
gsm-fw/L1/glue/l1_isr_glue.c: initial version concocted
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
38 #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
|
39 #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
|
40 #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
|
41 #endif |
a74230436958
gsm-fw/L1/glue/l1_isr_glue.c: initial version concocted
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
42 |
a74230436958
gsm-fw/L1/glue/l1_isr_glue.c: initial version concocted
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
43 #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
|
44 #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
|
45 #endif |
a74230436958
gsm-fw/L1/glue/l1_isr_glue.c: initial version concocted
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
46 |
a74230436958
gsm-fw/L1/glue/l1_isr_glue.c: initial version concocted
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
47 #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
|
48 #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
|
49 #endif |
a74230436958
gsm-fw/L1/glue/l1_isr_glue.c: initial version concocted
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
50 |
a74230436958
gsm-fw/L1/glue/l1_isr_glue.c: initial version concocted
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
51 #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
|
52 #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
|
53 #endif |
a74230436958
gsm-fw/L1/glue/l1_isr_glue.c: initial version concocted
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
54 #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
|
55 #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
|
56 #endif |
a74230436958
gsm-fw/L1/glue/l1_isr_glue.c: initial version concocted
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
57 |
a74230436958
gsm-fw/L1/glue/l1_isr_glue.c: initial version concocted
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
58 #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
|
59 #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
|
60 #endif |
a74230436958
gsm-fw/L1/glue/l1_isr_glue.c: initial version concocted
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
61 |
a74230436958
gsm-fw/L1/glue/l1_isr_glue.c: initial version concocted
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
62 #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
|
63 #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
|
64 |
a74230436958
gsm-fw/L1/glue/l1_isr_glue.c: initial version concocted
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
65 #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
|
66 #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
|
67 #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
|
68 #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
|
69 |
a74230436958
gsm-fw/L1/glue/l1_isr_glue.c: initial version concocted
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
70 /* |
a74230436958
gsm-fw/L1/glue/l1_isr_glue.c: initial version concocted
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
71 * 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
|
72 * 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
|
73 * 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
|
74 * 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
|
75 * 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
|
76 */ |
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/typedefs.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/vsi.h" |
a74230436958
gsm-fw/L1/glue/l1_isr_glue.c: initial version concocted
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
79 #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
|
80 |
a74230436958
gsm-fw/L1/glue/l1_isr_glue.c: initial version concocted
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
81 /* |
a74230436958
gsm-fw/L1/glue/l1_isr_glue.c: initial version concocted
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
82 * Timing monitor |
a74230436958
gsm-fw/L1/glue/l1_isr_glue.c: initial version concocted
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
83 */ |
a74230436958
gsm-fw/L1/glue/l1_isr_glue.c: initial version concocted
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
84 #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
|
85 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
|
86 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
|
87 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
|
88 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
|
89 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
|
90 #if (DSP >= 38) |
a74230436958
gsm-fw/L1/glue/l1_isr_glue.c: initial version concocted
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
91 // 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
|
92 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
|
93 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
|
94 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
|
95 #endif |
a74230436958
gsm-fw/L1/glue/l1_isr_glue.c: initial version concocted
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
96 #endif |
a74230436958
gsm-fw/L1/glue/l1_isr_glue.c: initial version concocted
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
97 |
600
3fea71719423
L1: l1_isr_glue.c moved to cfile directory; compiles successfully
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
599
diff
changeset
|
98 #define STACK_SECTION __attribute__ ((section ("int.ram"))) |
3fea71719423
L1: l1_isr_glue.c moved to cfile directory; compiles successfully
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
599
diff
changeset
|
99 |
599
a74230436958
gsm-fw/L1/glue/l1_isr_glue.c: initial version concocted
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
100 #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
|
101 NU_HISR EXT_AUDIO_MGT_hisr; |
600
3fea71719423
L1: l1_isr_glue.c moved to cfile directory; compiles successfully
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
599
diff
changeset
|
102 char FAR ext_audio_mgt_hisr_stack[500] STACK_SECTION; |
599
a74230436958
gsm-fw/L1/glue/l1_isr_glue.c: initial version concocted
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
103 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
|
104 #endif |
a74230436958
gsm-fw/L1/glue/l1_isr_glue.c: initial version concocted
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
105 |
a74230436958
gsm-fw/L1/glue/l1_isr_glue.c: initial version concocted
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
106 #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
|
107 extern void api_hisr(void); |
600
3fea71719423
L1: l1_isr_glue.c moved to cfile directory; compiles successfully
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
599
diff
changeset
|
108 char FAR API_HISR_stack[0x400] STACK_SECTION; |
599
a74230436958
gsm-fw/L1/glue/l1_isr_glue.c: initial version concocted
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
109 NU_HISR apiHISR; |
a74230436958
gsm-fw/L1/glue/l1_isr_glue.c: initial version concocted
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
110 #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
|
111 |
a74230436958
gsm-fw/L1/glue/l1_isr_glue.c: initial version concocted
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
112 #if (FF_L1_IT_DSP_USF == 1) || (FF_L1_IT_DSP_DTX == 1) |
600
3fea71719423
L1: l1_isr_glue.c moved to cfile directory; compiles successfully
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
599
diff
changeset
|
113 char FAR API_MODEM_HISR_stack[0x400] STACK_SECTION; // stack size to be tuned |
599
a74230436958
gsm-fw/L1/glue/l1_isr_glue.c: initial version concocted
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
114 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
|
115 #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
|
116 |
a74230436958
gsm-fw/L1/glue/l1_isr_glue.c: initial version concocted
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
117 /* |
a74230436958
gsm-fw/L1/glue/l1_isr_glue.c: initial version concocted
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
118 * 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
|
119 */ |
a74230436958
gsm-fw/L1/glue/l1_isr_glue.c: initial version concocted
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
120 #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
|
121 #define LAYER_1_SYNC_STACK_SIZE 4000 /* matching Leonardo version */ |
600
3fea71719423
L1: l1_isr_glue.c moved to cfile directory; compiles successfully
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
599
diff
changeset
|
122 unsigned char layer_1_sync_stack[LAYER_1_SYNC_STACK_SIZE] STACK_SECTION; |
599
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 #if TESTMODE |
a74230436958
gsm-fw/L1/glue/l1_isr_glue.c: initial version concocted
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
125 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
|
126 #else |
a74230436958
gsm-fw/L1/glue/l1_isr_glue.c: initial version concocted
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
127 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
|
128 #endif |
a74230436958
gsm-fw/L1/glue/l1_isr_glue.c: initial version concocted
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
129 #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
|
130 |
a74230436958
gsm-fw/L1/glue/l1_isr_glue.c: initial version concocted
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
131 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
|
132 |
600
3fea71719423
L1: l1_isr_glue.c moved to cfile directory; compiles successfully
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
599
diff
changeset
|
133 /* forward declaration */ |
3fea71719423
L1: l1_isr_glue.c moved to cfile directory; compiles successfully
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
599
diff
changeset
|
134 void layer_1_sync_HISR_entry (void); |
599
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 /* |
a74230436958
gsm-fw/L1/glue/l1_isr_glue.c: initial version concocted
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
137 * l1_create_HISR |
a74230436958
gsm-fw/L1/glue/l1_isr_glue.c: initial version concocted
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
138 * |
a74230436958
gsm-fw/L1/glue/l1_isr_glue.c: initial version concocted
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
139 * 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
|
140 * |
a74230436958
gsm-fw/L1/glue/l1_isr_glue.c: initial version concocted
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
141 * 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
|
142 * 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
|
143 * 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
|
144 * 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
|
145 * 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
|
146 */ |
a74230436958
gsm-fw/L1/glue/l1_isr_glue.c: initial version concocted
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
147 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
|
148 { |
a74230436958
gsm-fw/L1/glue/l1_isr_glue.c: initial version concocted
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
149 STATUS status; |
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 #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
|
152 // 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
|
153 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
|
154 #endif |
a74230436958
gsm-fw/L1/glue/l1_isr_glue.c: initial version concocted
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
155 |
a74230436958
gsm-fw/L1/glue/l1_isr_glue.c: initial version concocted
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
156 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
|
157 "L1_HISR", |
a74230436958
gsm-fw/L1/glue/l1_isr_glue.c: initial version concocted
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
158 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
|
159 #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
|
160 1, |
a74230436958
gsm-fw/L1/glue/l1_isr_glue.c: initial version concocted
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
161 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 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
|
163 #else |
a74230436958
gsm-fw/L1/glue/l1_isr_glue.c: initial version concocted
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
164 1, |
a74230436958
gsm-fw/L1/glue/l1_isr_glue.c: initial version concocted
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
165 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
|
166 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
|
167 #endif |
a74230436958
gsm-fw/L1/glue/l1_isr_glue.c: initial version concocted
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
168 |
a74230436958
gsm-fw/L1/glue/l1_isr_glue.c: initial version concocted
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
169 #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
|
170 // 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
|
171 //================================== |
a74230436958
gsm-fw/L1/glue/l1_isr_glue.c: initial version concocted
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
172 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
|
173 "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
|
174 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
|
175 2, |
a74230436958
gsm-fw/L1/glue/l1_isr_glue.c: initial version concocted
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
176 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
|
177 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
|
178 #endif |
a74230436958
gsm-fw/L1/glue/l1_isr_glue.c: initial version concocted
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
179 |
a74230436958
gsm-fw/L1/glue/l1_isr_glue.c: initial version concocted
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
180 #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
|
181 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
|
182 "API_HISR", |
a74230436958
gsm-fw/L1/glue/l1_isr_glue.c: initial version concocted
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
183 api_hisr, |
a74230436958
gsm-fw/L1/glue/l1_isr_glue.c: initial version concocted
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
184 2, |
a74230436958
gsm-fw/L1/glue/l1_isr_glue.c: initial version concocted
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
185 API_HISR_stack, |
a74230436958
gsm-fw/L1/glue/l1_isr_glue.c: initial version concocted
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
186 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
|
187 #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
|
188 |
a74230436958
gsm-fw/L1/glue/l1_isr_glue.c: initial version concocted
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
189 #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
|
190 // 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
|
191 // 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
|
192 // 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
|
193 //======================================================== |
a74230436958
gsm-fw/L1/glue/l1_isr_glue.c: initial version concocted
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
194 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
|
195 "MODEM", |
a74230436958
gsm-fw/L1/glue/l1_isr_glue.c: initial version concocted
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
196 api_modem_hisr, |
a74230436958
gsm-fw/L1/glue/l1_isr_glue.c: initial version concocted
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
197 1, |
a74230436958
gsm-fw/L1/glue/l1_isr_glue.c: initial version concocted
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
198 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
|
199 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
|
200 #endif |
a74230436958
gsm-fw/L1/glue/l1_isr_glue.c: initial version concocted
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
201 |
a74230436958
gsm-fw/L1/glue/l1_isr_glue.c: initial version concocted
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
202 assert (status == 0); |
a74230436958
gsm-fw/L1/glue/l1_isr_glue.c: initial version concocted
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
203 } |
a74230436958
gsm-fw/L1/glue/l1_isr_glue.c: initial version concocted
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
204 |
a74230436958
gsm-fw/L1/glue/l1_isr_glue.c: initial version concocted
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
205 /* |
a74230436958
gsm-fw/L1/glue/l1_isr_glue.c: initial version concocted
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
206 * 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
|
207 * 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
|
208 * 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
|
209 * 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
|
210 * hisr() function. |
a74230436958
gsm-fw/L1/glue/l1_isr_glue.c: initial version concocted
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
211 */ |
a74230436958
gsm-fw/L1/glue/l1_isr_glue.c: initial version concocted
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
212 |
a74230436958
gsm-fw/L1/glue/l1_isr_glue.c: initial version concocted
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
213 /*-------------------------------------------------------*/ |
a74230436958
gsm-fw/L1/glue/l1_isr_glue.c: initial version concocted
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
214 /* 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
|
215 /*-------------------------------------------------------*/ |
a74230436958
gsm-fw/L1/glue/l1_isr_glue.c: initial version concocted
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
216 /* Parameters : */ |
a74230436958
gsm-fw/L1/glue/l1_isr_glue.c: initial version concocted
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
217 /* Return : */ |
a74230436958
gsm-fw/L1/glue/l1_isr_glue.c: initial version concocted
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
218 /* 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
|
219 /*-------------------------------------------------------*/ |
a74230436958
gsm-fw/L1/glue/l1_isr_glue.c: initial version concocted
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
220 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
|
221 { |
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 #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
|
224 |
a74230436958
gsm-fw/L1/glue/l1_isr_glue.c: initial version concocted
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
225 #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
|
226 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
|
227 { |
a74230436958
gsm-fw/L1/glue/l1_isr_glue.c: initial version concocted
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
228 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
|
229 TM_StartTimer (2); |
a74230436958
gsm-fw/L1/glue/l1_isr_glue.c: initial version concocted
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
230 } |
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==6) |
a74230436958
gsm-fw/L1/glue/l1_isr_glue.c: initial version concocted
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
234 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
|
235 TM_StartTimer (2); |
a74230436958
gsm-fw/L1/glue/l1_isr_glue.c: initial version concocted
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
236 #endif |
a74230436958
gsm-fw/L1/glue/l1_isr_glue.c: initial version concocted
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
237 |
a74230436958
gsm-fw/L1/glue/l1_isr_glue.c: initial version concocted
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
238 #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
|
239 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
|
240 #endif |
a74230436958
gsm-fw/L1/glue/l1_isr_glue.c: initial version concocted
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
241 |
a74230436958
gsm-fw/L1/glue/l1_isr_glue.c: initial version concocted
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
242 #else |
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 (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
|
245 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
|
246 TM_StartTimer (2); |
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 (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
|
250 /* 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
|
251 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
|
252 #endif |
a74230436958
gsm-fw/L1/glue/l1_isr_glue.c: initial version concocted
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
253 |
a74230436958
gsm-fw/L1/glue/l1_isr_glue.c: initial version concocted
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
254 #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
|
255 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
|
256 #endif |
a74230436958
gsm-fw/L1/glue/l1_isr_glue.c: initial version concocted
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
257 |
a74230436958
gsm-fw/L1/glue/l1_isr_glue.c: initial version concocted
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
258 #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
|
259 |
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(&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
|
261 |
a74230436958
gsm-fw/L1/glue/l1_isr_glue.c: initial version concocted
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
262 #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
|
263 #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
|
264 #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
|
265 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
|
266 #endif |
a74230436958
gsm-fw/L1/glue/l1_isr_glue.c: initial version concocted
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
267 #endif |
a74230436958
gsm-fw/L1/glue/l1_isr_glue.c: initial version concocted
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
268 #endif |
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 } |
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 * 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
|
274 * |
a74230436958
gsm-fw/L1/glue/l1_isr_glue.c: initial version concocted
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
275 * 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
|
276 */ |
a74230436958
gsm-fw/L1/glue/l1_isr_glue.c: initial version concocted
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
277 |
a74230436958
gsm-fw/L1/glue/l1_isr_glue.c: initial version concocted
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
278 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
|
279 { |
a74230436958
gsm-fw/L1/glue/l1_isr_glue.c: initial version concocted
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
280 // Call Synchronous Layer1 |
a74230436958
gsm-fw/L1/glue/l1_isr_glue.c: initial version concocted
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
281 hisr(); |
a74230436958
gsm-fw/L1/glue/l1_isr_glue.c: initial version concocted
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
282 } |