FreeCalypso > hg > tcs211-l1-reconst
annotate chipsetsw/layer1/cfile/l1_init.c @ 112:ecea132f1ac3
l1_init.c: l1_dsp_init() reconstructed
author | Mychaela Falconia <falcon@ivan.Harhan.ORG> |
---|---|
date | Fri, 08 Apr 2016 20:37:10 +0000 |
parents | ba0b349e718e |
children | 50187ed1cd7d |
rev | line source |
---|---|
108
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1 /************ Revision Controle System Header ************* |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
2 * GSM Layer 1 software |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
3 * L1_INIT.C |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
4 * |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
5 * Filename l1_init.c |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
6 * Copyright 2003 (C) Texas Instruments |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
7 * |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
8 ************* Revision Controle System Header *************/ |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
9 |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
10 #define L1_INIT_C |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
11 |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
12 #include "l1_confg.h" |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
13 |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
14 #if (CODE_VERSION == SIMULATION) |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
15 #include <string.h> |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
16 #include "l1_types.h" |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
17 #include "sys_types.h" |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
18 #include "l1_const.h" |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
19 #include "l1_time.h" |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
20 #include "l1_signa.h" |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
21 |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
22 #if TESTMODE |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
23 #include "l1tm_defty.h" |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
24 #endif |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
25 #if (AUDIO_TASK == 1) |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
26 #include "l1audio_const.h" |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
27 #include "l1audio_cust.h" |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
28 #include "l1audio_defty.h" |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
29 #endif |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
30 #if (L1_GTT == 1) |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
31 #include "l1gtt_const.h" |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
32 #include "l1gtt_defty.h" |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
33 #endif |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
34 |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
35 #if (L1_MP3 == 1) |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
36 #include "l1mp3_defty.h" |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
37 #endif |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
38 |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
39 #if (L1_MIDI == 1) |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
40 #include "l1midi_defty.h" |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
41 #endif |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
42 //ADDED FOR AAC |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
43 #if (L1_AAC == 1) |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
44 #include "l1aac_defty.h" |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
45 #endif |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
46 #if (L1_DYN_DSP_DWNLD == 1) |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
47 #include "l1_dyn_dwl_proto.h" |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
48 #endif |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
49 |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
50 #include "l1_defty.h" |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
51 #include "cust_os.h" |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
52 #include "l1_msgty.h" |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
53 #include "l1_varex.h" |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
54 #include "l1_proto.h" |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
55 #include "l1_mftab.h" |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
56 #include "l1_tabs.h" |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
57 #include "l1_ver.h" |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
58 #include "ulpd.h" |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
59 |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
60 #include "l1_proto.h" |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
61 |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
62 #if L1_GPRS |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
63 #include "l1p_cons.h" |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
64 #include "l1p_msgt.h" |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
65 #include "l1p_deft.h" |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
66 #include "l1p_vare.h" |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
67 #include "l1p_tabs.h" |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
68 #include "l1p_macr.h" |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
69 #include "l1p_ver.h" |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
70 #endif |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
71 |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
72 #if TESTMODE |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
73 #include "l1tm_ver.h" |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
74 #endif |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
75 |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
76 #include <stdio.h> |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
77 #include "sim_cfg.h" |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
78 #include "sim_cons.h" |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
79 #include "sim_def.h" |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
80 #include "sim_var.h" |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
81 |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
82 #else // NO SIMULATION |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
83 |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
84 #include <string.h> |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
85 #include "tm_defs.h" |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
86 #include "l1_types.h" |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
87 #include "sys_types.h" |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
88 #include "leadapi.h" |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
89 #include "l1_const.h" |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
90 #include "l1_macro.h" |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
91 #include "l1_time.h" |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
92 #include "l1_signa.h" |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
93 #if (AUDIO_TASK == 1) |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
94 #include "l1audio_const.h" |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
95 #include "l1audio_cust.h" |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
96 #include "l1audio_defty.h" |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
97 #endif |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
98 |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
99 |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
100 #include "spi_drv.h" |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
101 #include "abb.h" |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
102 #if (ANLG_FAM != 11) |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
103 #include "abb_core_inth.h" |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
104 #endif |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
105 |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
106 #if TESTMODE |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
107 #include "l1tm_defty.h" |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
108 #endif |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
109 |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
110 #if (L1_GTT == 1) |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
111 #include "l1gtt_const.h" |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
112 #include "l1gtt_defty.h" |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
113 #endif |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
114 |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
115 #if (L1_MP3 == 1) |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
116 #include "l1mp3_defty.h" |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
117 #endif |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
118 |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
119 #if (L1_MIDI == 1) |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
120 #include "l1midi_defty.h" |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
121 #endif |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
122 //ADDED FOR AAC |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
123 #if (L1_AAC == 1) |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
124 #include "l1aac_defty.h" |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
125 #endif |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
126 #if (L1_DYN_DSP_DWNLD == 1) |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
127 #include "l1_dyn_dwl_proto.h" |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
128 #endif |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
129 |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
130 #include "l1_defty.h" |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
131 #include "cust_os.h" |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
132 #include "l1_msgty.h" |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
133 #include "l1_varex.h" |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
134 #include "l1_proto.h" |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
135 #include "l1_mftab.h" |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
136 #include "l1_tabs.h" |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
137 #include "l1_ver.h" |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
138 #include "tpudrv.h" |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
139 |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
140 #if (CHIPSET == 12) || (CHIPSET == 15) |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
141 #include "sys_inth.h" |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
142 #else |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
143 #include "mem.h" |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
144 #include "inth.h" |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
145 #include "dma.h" |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
146 #include "iq.h" |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
147 #endif |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
148 |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
149 #include "clkm.h" |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
150 #include "rhea_arm.h" |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
151 #include "ulpd.h" |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
152 |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
153 #include "l1_proto.h" |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
154 |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
155 #if L1_GPRS |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
156 #include "l1p_cons.h" |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
157 #include "l1p_msgt.h" |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
158 #include "l1p_deft.h" |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
159 #include "l1p_vare.h" |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
160 #include "l1p_tabs.h" |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
161 #include "l1p_macr.h" |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
162 #include "l1p_ver.h" |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
163 #endif |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
164 |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
165 #if TESTMODE |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
166 #include "l1tm_ver.h" |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
167 #endif |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
168 |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
169 #endif // NOT SIMULATION |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
170 |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
171 |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
172 |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
173 #if (RF_FAM == 61) |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
174 #if (DRP_FW_EXT==0) |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
175 #include "drp_drive.h" |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
176 #include "drp_api.h" |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
177 #include "l1_rf61.h" |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
178 #include "apc.h" |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
179 #else |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
180 #include "l1_rf61.h" |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
181 #include "l1_drp_inc.h" |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
182 #endif |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
183 #endif |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
184 |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
185 |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
186 #if (RF_FAM == 60) |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
187 #include "drp_drive.h" |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
188 #include "drp_api.h" |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
189 #include "l1_rf60.h" |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
190 #endif |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
191 |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
192 #if (TRACE_TYPE == 1)||(TRACE_TYPE == 4) |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
193 #include "l1_trace.h" |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
194 #endif |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
195 |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
196 #include <string.h> |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
197 #include <stdio.h> |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
198 |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
199 #if (ANLG_FAM == 11) |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
200 #include "bspTwl3029_I2c.h" |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
201 #include "bspTwl3029_Aud_Map.h" |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
202 #include "bspTwl3029_Madc.h" |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
203 #endif |
109
a038d8cd9647
l1_init.c: fixes from the freecalypso-sw/gsm-fw version, doesn't compile yet
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
108
diff
changeset
|
204 |
a038d8cd9647
l1_init.c: fixes from the freecalypso-sw/gsm-fw version, doesn't compile yet
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
108
diff
changeset
|
205 #if (RF_FAM == 61) |
108
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
206 //OMAPS148175 |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
207 #include "l1_drp_if.h" |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
208 #include "drp_main.h" |
109
a038d8cd9647
l1_init.c: fixes from the freecalypso-sw/gsm-fw version, doesn't compile yet
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
108
diff
changeset
|
209 #endif |
a038d8cd9647
l1_init.c: fixes from the freecalypso-sw/gsm-fw version, doesn't compile yet
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
108
diff
changeset
|
210 |
108
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
211 #if (ANLG_FAM == 11) |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
212 #if (L1_MADC_ON == 1) |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
213 extern BspTwl3029_MadcResults l1_madc_results; |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
214 extern void l1a_madc_callback(void); |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
215 #if(OP_L1_STANDALONE == 1 || L1_NAVC == 1 )//NAVC |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
216 extern UWORD32 Cust_navc_ctrl_status(UWORD8 d_navc_start_stop_read);//NAVC |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
217 #endif |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
218 #endif |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
219 |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
220 #if (AUDIO_DEBUG == 1) |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
221 extern UWORD8 audio_reg_read_status; |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
222 #endif |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
223 |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
224 #endif |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
225 |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
226 #if (AUDIO_TASK == 1) |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
227 /**************************************/ |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
228 /* External audio prototypes */ |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
229 /**************************************/ |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
230 extern void l1audio_initialize_var (void); |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
231 #endif |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
232 |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
233 extern void l1audio_dsp_init (void); |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
234 extern void initialize_wait_loop(void); |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
235 |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
236 #if (L1_GPRS) |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
237 // external functions from GPRS implementation |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
238 void initialize_l1pvar(void); |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
239 void l1pa_reset_cr_freq_list(void); |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
240 #endif // L1_GPRS |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
241 #if ((OP_L1_STANDALONE == 1) && ((DSP == 38)|| (DSP == 39))&& (CODE_VERSION != SIMULATION)) |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
242 extern void l1_api_dump(void); |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
243 #endif |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
244 |
109
a038d8cd9647
l1_init.c: fixes from the freecalypso-sw/gsm-fw version, doesn't compile yet
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
108
diff
changeset
|
245 #if (TRACE_TYPE==3) |
108
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
246 void reset_stats(); |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
247 #endif // TRACE_TYPE |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
248 |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
249 #if (L1_GTT == 1) |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
250 extern void l1gtt_initialize_var(void); |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
251 #endif |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
252 |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
253 #if (L1_MP3 == 1) |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
254 extern void l1mp3_initialize_var(void); |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
255 #endif |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
256 |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
257 #if (L1_MIDI == 1) |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
258 extern void l1midi_initialize_var(void); |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
259 #endif |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
260 //ADDED FOR AAC |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
261 #if (L1_AAC == 1) |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
262 extern void l1aac_initialize_var(void); |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
263 #endif |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
264 |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
265 #if ((TRACE_TYPE==1) || (TRACE_TYPE==2) || (TRACE_TYPE==3) || (TRACE_TYPE==4) || (TRACE_TYPE==7)) |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
266 extern void L1_trace_string(char *s); |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
267 #endif |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
268 |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
269 #if (RF_FAM == 60 || RF_FAM == 61) |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
270 extern const UWORD8 drp_ref_sw[] ; |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
271 extern T_DRP_REGS_STR *drp_regs; |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
272 extern T_DRP_SRM_API* drp_srm_api; |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
273 |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
274 extern T_DRP_SW_DATA drp_sw_data_calib; |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
275 extern T_DRP_SW_DATA drp_sw_data_init; |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
276 |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
277 #endif |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
278 |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
279 /*-------------------------------------------------------*/ |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
280 /* l1_dsp_init() */ |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
281 /*-------------------------------------------------------*/ |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
282 /* Parameters : */ |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
283 /* Return : */ |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
284 /* Functionality : */ |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
285 /*-------------------------------------------------------*/ |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
286 void l1_dsp_init(void) |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
287 { |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
288 //int i;-OMAPS90550- new |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
289 #if (CODE_VERSION == SIMULATION) |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
290 // L1S <-> DSP communication... |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
291 //==================================================== |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
292 l1s_dsp_com.dsp_ndb_ptr = &(buf.ndb); |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
293 l1s_dsp_com.dsp_db_r_ptr = &(buf.mcu_rd[0]); |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
294 l1s_dsp_com.dsp_db_w_ptr = &(buf.mcu_wr[0]); |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
295 l1s_dsp_com.dsp_param_ptr = &(buf.param); |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
296 l1s_dsp_com.dsp_w_page = 0; |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
297 l1s_dsp_com.dsp_r_page = 0; |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
298 l1s_dsp_com.dsp_r_page_used = 0; |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
299 |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
300 #if (L1_GPRS) |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
301 l1ps_dsp_com.pdsp_ndb_ptr = &(buf.ndb_gprs); |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
302 l1ps_dsp_com.pdsp_db_r_ptr = &(buf.mcu_rd_gprs[0]); |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
303 l1ps_dsp_com.pdsp_db_w_ptr = &(buf.mcu_wr_gprs[0]); |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
304 l1ps_dsp_com.pdsp_param_ptr = &(buf.param_gprs); |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
305 #endif |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
306 |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
307 // Reset DSP page bit and DSP enable bit... |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
308 //==================================================== |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
309 l1s_tpu_com.reg_cmd->dsp_enb_bit = OFF; |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
310 l1s_tpu_com.reg_cmd->dsp_pag_bit = 0; |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
311 |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
312 // Set EOTD bit if required |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
313 //==================================================== |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
314 #if (L1_EOTD ==1) |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
315 l1s_dsp_com.dsp_ndb_ptr->d_tch_mode |= B_EOTD; |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
316 #endif |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
317 |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
318 |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
319 #else // NO SIMULATION |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
320 |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
321 // L1S <-> DSP communication... |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
322 //==================================================== |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
323 l1s_dsp_com.dsp_ndb_ptr = (T_NDB_MCU_DSP *) NDB_ADR; |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
324 l1s_dsp_com.dsp_db_r_ptr = (T_DB_DSP_TO_MCU *) DB_R_PAGE_0; |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
325 l1s_dsp_com.dsp_db_w_ptr = (T_DB_MCU_TO_DSP *) DB_W_PAGE_0; |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
326 l1s_dsp_com.dsp_param_ptr = (T_PARAM_MCU_DSP *) PARAM_ADR; |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
327 l1s_dsp_com.dsp_w_page = 0; |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
328 l1s_dsp_com.dsp_r_page = 0; |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
329 l1s_dsp_com.dsp_r_page_used = 0; |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
330 |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
331 #if (DSP == 38) || (DSP == 39) |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
332 l1s_dsp_com.dsp_db_common_w_ptr = (T_DB_COMMON_MCU_TO_DSP *)DB_COMMON_W_PAGE_0; |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
333 #endif |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
334 |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
335 /* DSP CPU load measurement */ |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
336 #if (DSP == 38) || (DSP == 39) |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
337 l1s_dsp_com.dsp_cpu_load_db_w_ptr = (T_DB_MCU_TO_DSP_CPU_LOAD *)DSP_CPU_LOAD_DB_W_PAGE_0; |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
338 (*((volatile UWORD16 *)(DSP_CPU_LOAD_MCU_W_CTRL))) = (API)0x0001; // enable DSP CPU load measurement |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
339 #endif |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
340 |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
341 #if (L1_GPRS) |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
342 l1ps_dsp_com.pdsp_ndb_ptr = (T_NDB_MCU_DSP_GPRS *) NDB_ADR_GPRS; |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
343 l1ps_dsp_com.pdsp_db_r_ptr = (T_DB_DSP_TO_MCU_GPRS *) DB_R_PAGE_0_GPRS; |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
344 l1ps_dsp_com.pdsp_db_w_ptr = (T_DB_MCU_TO_DSP_GPRS *) DB_W_PAGE_0_GPRS; |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
345 l1ps_dsp_com.pdsp_param_ptr = (T_PARAM_MCU_DSP_GPRS *) PARAM_ADR_GPRS; |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
346 #endif |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
347 |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
348 #if (DSP_DEBUG_TRACE_ENABLE == 1) |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
349 l1s_dsp_com.dsp_db2_current_r_ptr = (T_DB2_DSP_TO_MCU *) DB2_R_PAGE_0; |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
350 l1s_dsp_com.dsp_db2_other_r_ptr = (T_DB2_DSP_TO_MCU *) DB2_R_PAGE_1; |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
351 #endif |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
352 |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
353 // Reset DSP page bit and DSP enable bit... |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
354 //==================================================== |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
355 |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
356 (*(volatile UWORD16 *)l1s_tpu_com.reg_cmd) &= ~TPU_CTRL_D_ENBL; |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
357 |
109
a038d8cd9647
l1_init.c: fixes from the freecalypso-sw/gsm-fw version, doesn't compile yet
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
108
diff
changeset
|
358 #if (DSP >= 33) |
108
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
359 l1s_dsp_com.dsp_ndb_ptr->d_dsp_page = l1s_dsp_com.dsp_w_page; |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
360 #else |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
361 l1s_dsp_com.dsp_param_ptr->d_dsp_page = l1s_dsp_com.dsp_w_page; |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
362 #endif |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
363 |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
364 // NDB init : Reset buffers and set flags... |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
365 //==================================================== |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
366 l1s_dsp_com.dsp_ndb_ptr->d_fb_mode = FB_MODE_1; |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
367 l1s_dsp_com.dsp_ndb_ptr->d_fb_det = FALSE; // D_FB_DET =0 |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
368 l1s_dsp_com.dsp_ndb_ptr->a_cd[0] = (1<<B_FIRE1); // B_FIRE1 =1, B_FIRE0 =0 , BLUD =0 |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
369 l1s_dsp_com.dsp_ndb_ptr->a_dd_0[0] = 0; // BLUD = 0 |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
370 l1s_dsp_com.dsp_ndb_ptr->a_dd_0[2] = 0xffff; // NERR = 0xffff |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
371 l1s_dsp_com.dsp_ndb_ptr->a_dd_1[0] = 0; // BLUD = 0 |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
372 l1s_dsp_com.dsp_ndb_ptr->a_dd_1[2] = 0xffff; // NERR = 0xffff |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
373 l1s_dsp_com.dsp_ndb_ptr->a_du_0[0] = 0; // BLUD = 0 |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
374 l1s_dsp_com.dsp_ndb_ptr->a_du_0[2] = 0xffff; // NERR = 0xffff |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
375 l1s_dsp_com.dsp_ndb_ptr->a_du_1[0] = 0; // BLUD = 0 |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
376 l1s_dsp_com.dsp_ndb_ptr->a_du_1[2] = 0xffff; // NERR = 0xffff |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
377 l1s_dsp_com.dsp_ndb_ptr->a_fd[0] = (1<<B_FIRE1); // B_FIRE1 =1, B_FIRE0 =0 , BLUD =0 |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
378 l1s_dsp_com.dsp_ndb_ptr->a_fd[2] = 0xffff; // NERR = 0xffff |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
379 l1s_dsp_com.dsp_ndb_ptr->d_a5mode = 0; |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
380 |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
381 #if ((ANLG_FAM == 1) || (ANLG_FAM == 2) || (ANLG_FAM == 3) || (ANLG_FAM == 11)) |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
382 l1s_dsp_com.dsp_ndb_ptr->d_tch_mode = 0x0800; // Analog base band selected = Nausica, Iota, Syren (bit 11) |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
383 #endif |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
384 |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
385 #if ((ANLG_FAM == 1) || (ANLG_FAM == 2) || (ANLG_FAM == 3)) |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
386 l1s_dsp_com.dsp_ndb_ptr->d_tch_mode |= (((l1_config.params.guard_bits - 4) & 0x000F) << 7); //Bit 7..10: guard bits |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
387 #endif |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
388 #if (ANLG_FAM == 11) |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
389 l1s_dsp_com.dsp_ndb_ptr->d_tch_mode |= (((l1_config.params.guard_bits) & 0x000F) << 7); //Bit 7..10: guard bits |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
390 #endif |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
391 |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
392 #if (DSP == 32) |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
393 l1s_dsp_com.dsp_ndb_ptr->d_tch_mode |= 0x2; |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
394 #endif // OP_WCP |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
395 |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
396 l1s_dsp_com.dsp_ndb_ptr->a_sch26[0] = (1<<B_SCH_CRC);// B_SCH_CRC =1, BLUD =0 |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
397 l1audio_dsp_init(); |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
398 |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
399 #if IDS |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
400 l1s_dsp_com.dsp_ndb_ptr->d_ra_conf = 0; // IDS |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
401 l1s_dsp_com.dsp_ndb_ptr->d_ra_act = 0; // IDS |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
402 l1s_dsp_com.dsp_ndb_ptr->d_ra_test = 0; // IDS |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
403 l1s_dsp_com.dsp_ndb_ptr->d_ra_statu = 0; // IDS |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
404 l1s_dsp_com.dsp_ndb_ptr->d_ra_statd = 0; // IDS |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
405 l1s_dsp_com.dsp_ndb_ptr->d_fax = 0; // IDS |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
406 #endif |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
407 |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
408 #if(RF_FAM != 61) |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
409 // interrupt rif TX on FIFO <= threshold with threshold = 0 |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
410 l1s_dsp_com.dsp_ndb_ptr->d_spcx_rif = 0x179; |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
411 #else |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
412 // l1s_dsp_com.dsp_ndb_ptr->d_spcx_rif = 0x179; TBD put hte replacement here... Danny |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
413 |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
414 #endif |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
415 |
109
a038d8cd9647
l1_init.c: fixes from the freecalypso-sw/gsm-fw version, doesn't compile yet
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
108
diff
changeset
|
416 #if (DSP >= 33) |
108
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
417 // Initialize V42b variables |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
418 l1s_dsp_com.dsp_ndb_ptr->d_v42b_nego0 = 0; |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
419 l1s_dsp_com.dsp_ndb_ptr->d_v42b_nego1 = 0; |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
420 l1s_dsp_com.dsp_ndb_ptr->d_v42b_control = 0; |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
421 l1s_dsp_com.dsp_ndb_ptr->d_v42b_ratio_ind = 0; |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
422 l1s_dsp_com.dsp_ndb_ptr->d_mcu_control = 0; |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
423 l1s_dsp_com.dsp_ndb_ptr->d_mcu_control_sema = 0; |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
424 |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
425 #if !(W_A_DSP_SR_BGD) |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
426 // Initialize background control variable to No background. Background tasks can be launch in GPRS |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
427 // as in GSM. |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
428 l1s_dsp_com.dsp_ndb_ptr->d_max_background = 0; |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
429 #endif |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
430 |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
431 #if (L1_GPRS) |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
432 #if (DSP == 36) || (DSP == 37) |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
433 // Initialize GEA module |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
434 l1ps_dsp_com.pdsp_ndb_ptr->d_gea_mode = 0; |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
435 #endif |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
436 #endif |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
437 |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
438 #else |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
439 #if (L1_GPRS) |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
440 // Initialize background control variable to No background |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
441 l1ps_dsp_com.pdsp_ndb_ptr->d_max_background = 0; |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
442 #endif |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
443 #endif |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
444 |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
445 #if (L1_GPRS) |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
446 l1ps_dsp_com.pdsp_ndb_ptr->d_sched_mode_gprs = GSM_SCHEDULER; |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
447 |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
448 // Initialize the poll response buffer to "no poll request" |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
449 l1ps_dsp_com.pdsp_ndb_ptr->a_pu_gprs[0][0] = CS_NONE_TYPE; |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
450 #else // L1_GPRS |
109
a038d8cd9647
l1_init.c: fixes from the freecalypso-sw/gsm-fw version, doesn't compile yet
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
108
diff
changeset
|
451 #if (DSP >= 31) |
108
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
452 l1s_dsp_com.dsp_ndb_ptr->d_sched_mode_gprs_ovly = GSM_SCHEDULER; |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
453 #endif |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
454 #endif // L1_GPRS |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
455 |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
456 // Set EOTD bit if required |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
457 //============================================= |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
458 #if (L1_EOTD ==1) |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
459 l1s_dsp_com.dsp_ndb_ptr->d_tch_mode |= B_EOTD; |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
460 #endif // L1_EOTD |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
461 |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
462 #if (DSP == 33) |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
463 #if DCO_ALGO |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
464 // Set DCO bit |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
465 if (l1_config.params.dco_enabled == TRUE) |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
466 l1s_dsp_com.dsp_ndb_ptr->d_tch_mode |= B_DCO_ON; |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
467 #endif |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
468 #endif |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
469 |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
470 // DCO algo in case of DSP 17/32 |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
471 #if (DCO_ALGO == 1) |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
472 #if ((DSP == 17)||(DSP == 32)) |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
473 l1s_dsp_com.dsp_ndb_ptr->d_tch_mode |= B_DCO_ON; |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
474 #endif // DSP |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
475 #endif // DCO_ALGO |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
476 |
109
a038d8cd9647
l1_init.c: fixes from the freecalypso-sw/gsm-fw version, doesn't compile yet
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
108
diff
changeset
|
477 #if (DSP >= 34) |
108
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
478 l1s_dsp_com.dsp_ndb_ptr->a_amr_config[0] = 0; |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
479 l1s_dsp_com.dsp_ndb_ptr->a_amr_config[1] = 0; |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
480 l1s_dsp_com.dsp_ndb_ptr->a_amr_config[2] = 0; |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
481 l1s_dsp_com.dsp_ndb_ptr->a_amr_config[3] = 0; |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
482 #endif |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
483 |
109
a038d8cd9647
l1_init.c: fixes from the freecalypso-sw/gsm-fw version, doesn't compile yet
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
108
diff
changeset
|
484 #if (DSP >= 35) |
108
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
485 l1s_dsp_com.dsp_ndb_ptr->d_thr_onset_afs = 400; // thresh detection ONSET AFS |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
486 l1s_dsp_com.dsp_ndb_ptr->d_thr_sid_first_afs = 150; // thresh detection SID_FIRST AFS |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
487 l1s_dsp_com.dsp_ndb_ptr->d_thr_ratscch_afs = 450; // thresh detection RATSCCH AFS |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
488 l1s_dsp_com.dsp_ndb_ptr->d_thr_update_afs = 300; // thresh detection SID_UPDATE AFS |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
489 l1s_dsp_com.dsp_ndb_ptr->d_thr_onset_ahs = 200; // thresh detection ONSET AHS |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
490 l1s_dsp_com.dsp_ndb_ptr->d_thr_sid_ahs = 150; // thresh detection SID frames AHS |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
491 l1s_dsp_com.dsp_ndb_ptr->d_thr_ratscch_marker = 500; // thresh detection RATSCCH MARKER |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
492 l1s_dsp_com.dsp_ndb_ptr->d_thr_sp_dgr = 3; // thresh detection SPEECH DEGRADED/NO_DATA |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
493 l1s_dsp_com.dsp_ndb_ptr->d_thr_soft_bits = 0; // thresh detection SPEECH DEGRADED/NO_DATA |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
494 #endif |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
495 |
112
ecea132f1ac3
l1_init.c: l1_dsp_init() reconstructed
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
111
diff
changeset
|
496 #if ((DSP >= 36) && (AMR_THRESHOLDS_WORKAROUND == 1)) |
108
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
497 // init of the afs thresholds parameters |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
498 l1s_dsp_com.dsp_ndb_ptr->a_d_macc_thr_afs[0]=0; |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
499 l1s_dsp_com.dsp_ndb_ptr->a_d_macc_thr_afs[1]=0; |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
500 l1s_dsp_com.dsp_ndb_ptr->a_d_macc_thr_afs[2]=0; |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
501 l1s_dsp_com.dsp_ndb_ptr->a_d_macc_thr_afs[3]=0; |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
502 l1s_dsp_com.dsp_ndb_ptr->a_d_macc_thr_afs[4]=0; |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
503 l1s_dsp_com.dsp_ndb_ptr->a_d_macc_thr_afs[5]=0; |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
504 l1s_dsp_com.dsp_ndb_ptr->a_d_macc_thr_afs[6]=0; |
112
ecea132f1ac3
l1_init.c: l1_dsp_init() reconstructed
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
111
diff
changeset
|
505 l1s_dsp_com.dsp_ndb_ptr->a_d_macc_thr_afs[7]=1500; |
108
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
506 |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
507 // init of the ahs thresholds parameters |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
508 l1s_dsp_com.dsp_ndb_ptr->a_d_macc_thr_ahs[0]=1500; |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
509 l1s_dsp_com.dsp_ndb_ptr->a_d_macc_thr_ahs[1]=1500; |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
510 l1s_dsp_com.dsp_ndb_ptr->a_d_macc_thr_ahs[2]=1500; |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
511 l1s_dsp_com.dsp_ndb_ptr->a_d_macc_thr_ahs[3]=1500; |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
512 l1s_dsp_com.dsp_ndb_ptr->a_d_macc_thr_ahs[4]=1500; |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
513 l1s_dsp_com.dsp_ndb_ptr->a_d_macc_thr_ahs[5]=1500; |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
514 #endif |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
515 |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
516 // init of of the threshold for USF detection |
112
ecea132f1ac3
l1_init.c: l1_dsp_init() reconstructed
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
111
diff
changeset
|
517 #if 1 /* match TCS211 object */ |
ecea132f1ac3
l1_init.c: l1_dsp_init() reconstructed
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
111
diff
changeset
|
518 l1s_dsp_com.dsp_ndb_ptr->d_thr_usf_detect = 2140; |
ecea132f1ac3
l1_init.c: l1_dsp_init() reconstructed
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
111
diff
changeset
|
519 #elif (L1_FALSE_USF_DETECTION == 1) |
108
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
520 l1s_dsp_com.dsp_ndb_ptr->d_thr_usf_detect = 2300; |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
521 #else |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
522 l1s_dsp_com.dsp_ndb_ptr->d_thr_usf_detect = 0; |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
523 #endif |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
524 |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
525 #if (CHIPSET == 12) || (CHIPSET == 15) |
109
a038d8cd9647
l1_init.c: fixes from the freecalypso-sw/gsm-fw version, doesn't compile yet
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
108
diff
changeset
|
526 #if (DSP >= 35) |
108
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
527 l1s_dsp_com.dsp_ndb_ptr->d_cport_init = 0; |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
528 #endif |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
529 #endif |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
530 |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
531 #if ((CHIPSET == 15) || (CHIPSET == 12) || (CHIPSET == 4) || ((CHIPSET == 10) && (OP_WCP == 1))) // Calypso+ or Perseus2 or locosto |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
532 #if (DSP == 36) || (DSP == 37) || (DSP == 38) || (DSP == 39) |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
533 // Note: for locosto there is only one MCSI port |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
534 l1s_dsp_com.dsp_ndb_ptr->d_mcsi_select = MCSI_PORT1; |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
535 #endif |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
536 |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
537 #if(DSP == 36) || (DSP == 37) |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
538 l1s_dsp_com.dsp_ndb_ptr->d_vol_ul_level = 0x1000; |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
539 l1s_dsp_com.dsp_ndb_ptr->d_vol_dl_level = 0x1000; |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
540 l1s_dsp_com.dsp_ndb_ptr->d_vol_speed = 0x68; |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
541 l1s_dsp_com.dsp_ndb_ptr->d_sidetone_level = 0; |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
542 #endif |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
543 #endif // ((CHIPSET == 15) || (CHIPSET == 12) || (CHIPSET == 4) || ((CHIPSET == 10) && (OP_WCP == 1))) |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
544 |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
545 // DB Init DB : Reset all pages, set TX power and reset SCH buffer... |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
546 //==================================================== |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
547 l1s_reset_db_mcu_to_dsp((T_DB_MCU_TO_DSP *) DB_W_PAGE_0); |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
548 l1s_reset_db_mcu_to_dsp((T_DB_MCU_TO_DSP *) DB_W_PAGE_1); |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
549 l1s_reset_db_dsp_to_mcu((T_DB_DSP_TO_MCU *) DB_R_PAGE_0); |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
550 l1s_reset_db_dsp_to_mcu((T_DB_DSP_TO_MCU *) DB_R_PAGE_1); |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
551 #if (DSP == 38) || (DSP == 39) |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
552 l1s_reset_db_common_mcu_to_dsp((T_DB_COMMON_MCU_TO_DSP *) DB_COMMON_W_PAGE_0); |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
553 l1s_reset_db_common_mcu_to_dsp((T_DB_COMMON_MCU_TO_DSP *) DB_COMMON_W_PAGE_1); |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
554 #endif |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
555 |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
556 #endif // NO_SIMULATION |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
557 |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
558 #if ((DSP==17)||(DSP == 32)) |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
559 // init the DC offset values |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
560 l1s_dsp_com.dsp_ndb_ptr->d_dco_type = 0x0000; // Tide off |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
561 l1s_dsp_com.dsp_ndb_ptr->p_start_IQ = 0x0000; |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
562 l1s_dsp_com.dsp_ndb_ptr->d_level_off = 0x0000; |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
563 l1s_dsp_com.dsp_ndb_ptr->d_dco_dbg = 0x0000; |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
564 l1s_dsp_com.dsp_ndb_ptr->d_tide_resa = 0x0000; |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
565 #endif |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
566 |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
567 //Initialize DSP DCO |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
568 #if (((DSP == 38) || (DSP == 39)) && (RF_FAM == 61)) |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
569 l1s_dsp_com.dsp_ndb_ptr->d_dco_samples_per_symbol = C_DCO_SAMPLES_PER_SYMBOL; |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
570 l1s_dsp_com.dsp_ndb_ptr->d_dco_fcw = C_DCO_FCW; |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
571 |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
572 // APCDEL1 will be initialized on rach only .... |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
573 l1s_dsp_com.dsp_ndb_ptr->d_apcdel1 = l1_config.params.apcdel1; |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
574 l1s_dsp_com.dsp_ndb_ptr->d_apcdel2 = l1_config.params.apcdel2; |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
575 // APCCTRL2 alone initialize on the next TDMA frame possible |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
576 l1ddsp_apc_load_apcctrl2(l1_config.params.apcctrl2); |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
577 |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
578 l1dapc_init_ramp_tables(); |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
579 |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
580 #if ((FF_REPEATED_SACCH == 1) || (FF_REPEATED_DL_FACCH == 1 )) |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
581 |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
582 /* Chase combining feature flag Initialise */ |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
583 l1s_dsp_com.dsp_ndb_ptr->d_chase_comb_ctrl |= 0x0001; |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
584 #endif /* FF_REPEATED_SACCH or FF_REPEATED_DL_FACCH */ |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
585 |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
586 #endif // DSP == 38 |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
587 |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
588 // Intialize the AFC |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
589 #if (DSP == 38) || (DSP == 39) |
109
a038d8cd9647
l1_init.c: fixes from the freecalypso-sw/gsm-fw version, doesn't compile yet
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
108
diff
changeset
|
590 #if (CODE_VERSION != SIMULATION) |
a038d8cd9647
l1_init.c: fixes from the freecalypso-sw/gsm-fw version, doesn't compile yet
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
108
diff
changeset
|
591 l1s_dsp_com.dsp_ndb_ptr->d_drp_afc_add_api = C_DRP_DCXO_XTAL_DSP_ADDRESS; |
a038d8cd9647
l1_init.c: fixes from the freecalypso-sw/gsm-fw version, doesn't compile yet
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
108
diff
changeset
|
592 #endif |
108
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
593 |
109
a038d8cd9647
l1_init.c: fixes from the freecalypso-sw/gsm-fw version, doesn't compile yet
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
108
diff
changeset
|
594 #if (L1_DRP_IQ_SCALING == 1) |
108
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
595 l1s_dsp_com.dsp_ndb_ptr->d_dsp_iq_scaling_factor = 1; |
109
a038d8cd9647
l1_init.c: fixes from the freecalypso-sw/gsm-fw version, doesn't compile yet
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
108
diff
changeset
|
596 #else |
108
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
597 l1s_dsp_com.dsp_ndb_ptr->d_dsp_iq_scaling_factor = 0; |
109
a038d8cd9647
l1_init.c: fixes from the freecalypso-sw/gsm-fw version, doesn't compile yet
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
108
diff
changeset
|
598 #endif |
108
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
599 #endif |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
600 |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
601 } |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
602 |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
603 /*-------------------------------------------------------*/ |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
604 /* l1_tpu_init() */ |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
605 /*-------------------------------------------------------*/ |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
606 /* Parameters : */ |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
607 /* Return : */ |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
608 /* Functionality : */ |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
609 /*-------------------------------------------------------*/ |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
610 void l1_tpu_init(void) |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
611 { |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
612 #if (CODE_VERSION == SIMULATION) |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
613 // L1S -> TPU communication... |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
614 //============================= |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
615 l1s_tpu_com.tpu_w_page = 0; |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
616 l1s_tpu_com.tpu_page_ptr = &(tpu.buf[l1s_tpu_com.tpu_w_page].line[0]); |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
617 l1s_tpu_com.reg_cmd = (T_reg_cmd*) &(hw.reg_cmd); |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
618 l1s_tpu_com.reg_com_int = &(hw.reg_com_int); |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
619 l1s_tpu_com.offset = &(hw.offset); |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
620 |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
621 // Reset TPU. |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
622 //============================= |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
623 *(l1s_tpu_com.offset) = 0; |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
624 *(l1s_tpu_com.reg_com_int) = 0; |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
625 l1s_tpu_com.reg_cmd->tpu_idle_bit = OFF; |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
626 l1s_tpu_com.reg_cmd->tpu_enb_bit = OFF; |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
627 l1s_tpu_com.reg_cmd->tpu_stat_bit = OFF; |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
628 l1s_tpu_com.reg_cmd->tpu_reset_bit = OFF; |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
629 l1s_tpu_com.reg_cmd->tpu_pag_bit = 0; |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
630 |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
631 // Init. OFFSET and SYNC registers |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
632 //================================ |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
633 l1s_tpu_com.reg_cmd->tpu_reset_bit = ON; // bit TPU_RESET active |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
634 l1dmacro_synchro(IMM, 0); // OFFSET=SYNCHRO=0 without any AT |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
635 l1dtpu_end_scenario(); // Close TPU scenario |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
636 |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
637 #else |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
638 // bit TPU_RESET set |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
639 // OFFSET and SYNCHRO initialized at 0 |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
640 // TSP_ACT bits reset |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
641 // Sleep added and TPU_ENABLE set... |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
642 l1dmacro_init_hw(); |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
643 |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
644 l1s_tpu_com.reg_cmd = (UWORD16 *) TPU_CTRL; |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
645 #endif |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
646 } |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
647 |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
648 void l1_tpu_init_light(void) |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
649 { |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
650 #if (CODE_VERSION == SIMULATION) |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
651 // L1S -> TPU communication... |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
652 //============================= |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
653 l1s_tpu_com.tpu_w_page = 0; |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
654 l1s_tpu_com.tpu_page_ptr = &(tpu.buf[l1s_tpu_com.tpu_w_page].line[0]); |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
655 l1s_tpu_com.reg_cmd = (T_reg_cmd*) &(hw.reg_cmd); |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
656 l1s_tpu_com.reg_com_int = &(hw.reg_com_int); |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
657 l1s_tpu_com.offset = &(hw.offset); |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
658 |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
659 // Reset TPU. |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
660 //============================= |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
661 *(l1s_tpu_com.offset) = 0; |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
662 *(l1s_tpu_com.reg_com_int) = 0; |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
663 l1s_tpu_com.reg_cmd->tpu_idle_bit = OFF; |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
664 l1s_tpu_com.reg_cmd->tpu_enb_bit = OFF; |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
665 l1s_tpu_com.reg_cmd->tpu_stat_bit = OFF; |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
666 l1s_tpu_com.reg_cmd->tpu_reset_bit = OFF; |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
667 l1s_tpu_com.reg_cmd->tpu_pag_bit = 0; |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
668 |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
669 // Init. OFFSET and SYNC registers |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
670 //================================ |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
671 l1s_tpu_com.reg_cmd->tpu_reset_bit = ON; // bit TPU_RESET active |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
672 l1dmacro_synchro(IMM, 0); // OFFSET=SYNCHRO=0 without any AT |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
673 l1dtpu_end_scenario(); // Close TPU scenario |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
674 |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
675 #else |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
676 // bit TPU_RESET set |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
677 // OFFSET and SYNCHRO initialized at 0 |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
678 // TSP_ACT bits reset |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
679 // Sleep added and TPU_ENABLE set... |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
680 l1dmacro_init_hw_light(); |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
681 |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
682 l1s_tpu_com.reg_cmd = (UWORD16 *) TPU_CTRL; |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
683 #endif |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
684 } |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
685 |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
686 /*-------------------------------------------------------*/ |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
687 /* l1_abb_power_on() */ |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
688 /*-------------------------------------------------------*/ |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
689 /* Parameters : */ |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
690 /* Return : */ |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
691 /* Functionality : */ |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
692 /* Initialize the global structure for spi communication */ |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
693 /* with ABB. */ |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
694 /* Set up ABB connection (CLK 13M free) */ |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
695 /* Aknowledge the ABB status register */ |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
696 /* Configure ABB modules */ |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
697 /* Program the ramp parameters into the NDB */ |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
698 /* Load in the NDB registers' value to be programmed in */ |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
699 /* ABB at first communication it */ |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
700 /*-------------------------------------------------------*/ |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
701 |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
702 //Locosto This funciton would change drastically due to Triton introduction and instead of SPI we have i2c |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
703 void l1_abb_power_on(void) |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
704 { |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
705 #if (CODE_VERSION != SIMULATION) |
109
a038d8cd9647
l1_init.c: fixes from the freecalypso-sw/gsm-fw version, doesn't compile yet
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
108
diff
changeset
|
706 #if (CHIPSET != 15) |
108
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
707 T_SPI_DEV *Abb; |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
708 T_SPI_DEV init_spi_device; |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
709 UWORD16 Abb_Status; |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
710 T_NDB_MCU_DSP * dsp_ndb_ptr; |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
711 |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
712 Abb = &init_spi_device; /* Pointer initialization to device communication structure */ |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
713 Abb->PrescVal = SPI_CLOCK_DIV_1; /* ABB transmission parameters initialization */ |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
714 Abb->DataTrLength = SPI_WNB_15; |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
715 Abb->DevAddLength = 5; |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
716 Abb->DevId = ABB; |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
717 Abb->ClkEdge = SPI_CLK_EDG_RISE; |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
718 Abb->TspEnLevel = SPI_NTSPEN_NEG_LEV; |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
719 Abb->TspEnForm = SPI_NTSPEN_LEV_TRIG; |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
720 |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
721 SPI_InitDev(Abb); /* Initialize the spi to work with ABB */ |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
722 |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
723 ABB_free_13M(); /* Set up Abb connection (CLK 13M free).*/ |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
724 Abb_Status = ABB_Read_Status(); /* Aknowledge the Abb status register. */ |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
725 |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
726 /*------------------------------------------------------------------*/ |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
727 /* Add here SW to manage Abb VRPCSTS status register informations */ |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
728 /*------------------------------------------------------------------*/ |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
729 |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
730 ABB_Read_Register_on_page(PAGE0,ITSTATREG); /* Aknowledge the interrupt status register */ |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
731 /* to clear any pending interrupt */ |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
732 |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
733 ABB_on(AFC | MADC, l1a_l1s_com.recovery_flag); |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
734 |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
735 // ADC init: Configuration of the channels to be converted and enable the ADC Interrupt |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
736 ABB_Conf_ADC(ALL,EOC_INTENA); |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
737 |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
738 //in case of reset due to a recovery process do not create the HISR |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
739 if (l1a_l1s_com.recovery_flag == FALSE) |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
740 { |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
741 Create_ABB_HISR(); |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
742 } |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
743 |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
744 // Load RAMP up/down in NDB memory... |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
745 dsp_ndb_ptr = (T_NDB_MCU_DSP *) NDB_ADR; |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
746 |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
747 if (l1_config.tx_pwr_code == 0) |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
748 { |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
749 Cust_get_ramp_tab(dsp_ndb_ptr->a_ramp, |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
750 0 /* not used */, |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
751 0 /* not used */, |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
752 1 /* arbitrary value for arfcn*/); |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
753 } |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
754 else |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
755 { |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
756 Cust_get_ramp_tab(dsp_ndb_ptr->a_ramp, |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
757 5 /* arbitrary value working in any case */, |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
758 5 /* arbitrary value working in any case */, |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
759 1 /* arbitrary value for arfcn*/); |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
760 } |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
761 #endif |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
762 |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
763 |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
764 #if (ANLG_FAM == 1) |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
765 // Omega registers values will be programmed at 1st DSP communication interrupt |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
766 |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
767 dsp_ndb_ptr->d_debug1 = l1_config.params.debug1; // Enable f_tx delay of 400000 cyc DEBUG |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
768 dsp_ndb_ptr->d_afcctladd = l1_config.params.afcctladd; // Value at reset |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
769 dsp_ndb_ptr->d_vbuctrl = l1_config.params.vbuctrl; // Uplink gain amp 0dB, Sidetone gain to mute |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
770 dsp_ndb_ptr->d_vbdctrl = l1_config.params.vbdctrl; // Downlink gain amp 0dB, Volume control 0 dB |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
771 dsp_ndb_ptr->d_bbctrl = l1_config.params.bbctrl; // value at reset |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
772 dsp_ndb_ptr->d_apcoff = l1_config.params.apcoff; // value at reset |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
773 dsp_ndb_ptr->d_bulioff = l1_config.params.bulioff; // value at reset |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
774 dsp_ndb_ptr->d_bulqoff = l1_config.params.bulqoff; // value at reset |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
775 dsp_ndb_ptr->d_dai_onoff = l1_config.params.dai_onoff; // value at reset |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
776 dsp_ndb_ptr->d_auxdac = l1_config.params.auxdac; // value at reset |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
777 dsp_ndb_ptr->d_vbctrl = l1_config.params.vbctrl; // VULSWITCH=0, VDLAUX=1, VDLEAR=1. |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
778 |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
779 // APCDEL1 will be initialized on rach only .... |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
780 dsp_ndb_ptr->d_apcdel1 =l1_config.params.apcdel1; |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
781 |
109
a038d8cd9647
l1_init.c: fixes from the freecalypso-sw/gsm-fw version, doesn't compile yet
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
108
diff
changeset
|
782 #if (DSP >= 33) |
108
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
783 // To increase the robustness the IOTA register are reseted to 0 |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
784 // if OMEGA, NAUSICA is used |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
785 dsp_ndb_ptr->d_bulgcal = 0x0000; |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
786 dsp_ndb_ptr->d_vbctrl2 = 0x0000; |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
787 dsp_ndb_ptr->d_apcdel2 = 0x0000; |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
788 #endif |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
789 #endif |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
790 #if (ANLG_FAM == 2) |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
791 // Iota registers values will be programmed at 1st DSP communication interrupt |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
792 |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
793 dsp_ndb_ptr->d_debug1 = l1_config.params.debug1; // Enable f_tx delay of 400000 cyc DEBUG |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
794 dsp_ndb_ptr->d_afcctladd = l1_config.params.afcctladd; // Value at reset |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
795 dsp_ndb_ptr->d_vbuctrl = l1_config.params.vbuctrl; // Uplink gain amp 0dB, Sidetone gain to mute |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
796 dsp_ndb_ptr->d_vbdctrl = l1_config.params.vbdctrl; // Downlink gain amp 0dB, Volume control 0 dB |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
797 dsp_ndb_ptr->d_bbctrl = l1_config.params.bbctrl; // value at reset |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
798 dsp_ndb_ptr->d_bulgcal = l1_config.params.bulgcal; // value at reset |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
799 dsp_ndb_ptr->d_apcoff = l1_config.params.apcoff; // value at reset |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
800 dsp_ndb_ptr->d_bulioff = l1_config.params.bulioff; // value at reset |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
801 dsp_ndb_ptr->d_bulqoff = l1_config.params.bulqoff; // value at reset |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
802 dsp_ndb_ptr->d_dai_onoff = l1_config.params.dai_onoff; // value at reset |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
803 dsp_ndb_ptr->d_auxdac = l1_config.params.auxdac; // value at reset |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
804 dsp_ndb_ptr->d_vbctrl1 = l1_config.params.vbctrl1; // VULSWITCH=0, VDLAUX=1, VDLEAR=1. |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
805 dsp_ndb_ptr->d_vbctrl2 = l1_config.params.vbctrl2; // MICBIASEL=0, VDLHSO=0, MICAUX=0 |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
806 |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
807 // APCDEL1 will be initialized on rach only .... |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
808 dsp_ndb_ptr->d_apcdel1 =l1_config.params.apcdel1; |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
809 dsp_ndb_ptr->d_apcdel2 = l1_config.params.apcdel2; |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
810 #endif |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
811 #if (ANLG_FAM == 3) |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
812 // Syren registers values will be programmed at 1st DSP communication interrupt |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
813 |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
814 dsp_ndb_ptr->d_debug1 = l1_config.params.debug1; // Enable f_tx delay of 400000 cyc DEBUG |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
815 dsp_ndb_ptr->d_afcctladd = l1_config.params.afcctladd; // Value at reset |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
816 dsp_ndb_ptr->d_vbuctrl = l1_config.params.vbuctrl; // Uplink gain amp 0dB, Sidetone gain to mute |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
817 dsp_ndb_ptr->d_vbdctrl = l1_config.params.vbdctrl; // Downlink gain amp 0dB, Volume control 0 dB |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
818 dsp_ndb_ptr->d_bbctrl = l1_config.params.bbctrl; // value at reset |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
819 dsp_ndb_ptr->d_bulgcal = l1_config.params.bulgcal; // value at reset |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
820 dsp_ndb_ptr->d_apcoff = l1_config.params.apcoff; // value at reset |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
821 dsp_ndb_ptr->d_bulioff = l1_config.params.bulioff; // value at reset |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
822 dsp_ndb_ptr->d_bulqoff = l1_config.params.bulqoff; // value at reset |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
823 dsp_ndb_ptr->d_dai_onoff = l1_config.params.dai_onoff; // value at reset |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
824 dsp_ndb_ptr->d_auxdac = l1_config.params.auxdac; // value at reset |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
825 dsp_ndb_ptr->d_vbctrl1 = l1_config.params.vbctrl1; // VULSWITCH=0 |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
826 dsp_ndb_ptr->d_vbctrl2 = l1_config.params.vbctrl2; // MICBIASEL=0, VDLHSO=0, MICAUX=0 |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
827 |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
828 // APCDEL1 will be initialized on rach only .... |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
829 dsp_ndb_ptr->d_apcdel1 = l1_config.params.apcdel1; |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
830 dsp_ndb_ptr->d_apcdel2 = l1_config.params.apcdel2; |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
831 |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
832 // Additional registers management brought by SYREN |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
833 dsp_ndb_ptr->d_vbpop = l1_config.params.vbpop; // HSOAUTO enabled only |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
834 dsp_ndb_ptr->d_vau_delay_init = l1_config.params.vau_delay_init; // vaud_init_delay init 2 frames |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
835 dsp_ndb_ptr->d_vaud_cfg = l1_config.params.vaud_cfg; // Init to zero |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
836 dsp_ndb_ptr->d_vauo_onoff = l1_config.params.vauo_onoff; // Init to zero |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
837 #if ((L1_AUDIO_MCU_ONOFF == 1)&&(OP_L1_STANDALONE == 1)&&(CHIPSET == 12)) |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
838 ABB_Write_Register_on_page(PAGE1, VAUOCTRL, 0x0015A); |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
839 #endif // E Sample testing of audio on off |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
840 dsp_ndb_ptr->d_vaus_vol = l1_config.params.vaus_vol; // Init to zero |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
841 dsp_ndb_ptr->d_vaud_pll = l1_config.params.vaud_pll; // Init to zero |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
842 dsp_ndb_ptr->d_togbr2 = 0; // TOGBR2 initial value handled by the DSP (this value doesn't nake any sense) |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
843 |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
844 #endif |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
845 |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
846 #if (ANLG_FAM == 11) |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
847 // The following settings need to be done only in L1 StandALoen as PSP would |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
848 // do in the case of full PS Build... |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
849 |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
850 //Set the CTRL3 register |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
851 BspTwl3029_I2c_WriteSingle(BSP_TWL3029_I2C_AUD,BSP_TWL_3029_MAP_AUDIO_CTRL3_OFFSET, |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
852 l1_config.params.ctrl3,NULL); |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
853 |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
854 #if (OP_L1_STANDALONE == 1) |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
855 // THESE REGISTERS ARE INITIALIZED IN STANDALONE AND PS BUILDS FOR AUDIO PATH |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
856 |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
857 // ************ START REG INIT FOR PS build/STANDALONE ************* |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
858 BspTwl3029_I2c_WriteSingle(BSP_TWL3029_I2C_AUD,BSP_TWL_3029_MAP_AUDIO_TOGB_OFFSET, |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
859 0x15,NULL); |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
860 BspTwl3029_I2c_WriteSingle(BSP_TWL3029_I2C_AUD,BSP_TWL_3029_MAP_AUDIO_VULGAIN_OFFSET, |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
861 l1_config.params.vulgain,NULL); |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
862 //Set the VDLGAIN register |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
863 BspTwl3029_I2c_WriteSingle(BSP_TWL3029_I2C_AUD,BSP_TWL_3029_MAP_AUDIO_VDLGAIN_OFFSET, |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
864 l1_config.params.vdlgain,NULL); |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
865 //Set the SIDETONE register |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
866 BspTwl3029_I2c_WriteSingle(BSP_TWL3029_I2C_AUD,BSP_TWL_3029_MAP_AUDIO_SIDETONE_OFFSET, |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
867 l1_config.params.sidetone,NULL); |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
868 //Set the CTRL1 register |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
869 BspTwl3029_I2c_WriteSingle(BSP_TWL3029_I2C_AUD,BSP_TWL_3029_MAP_AUDIO_CTRL1_OFFSET, |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
870 l1_config.params.ctrl1,NULL); |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
871 //Set the CTRL2 register |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
872 BspTwl3029_I2c_WriteSingle(BSP_TWL3029_I2C_AUD,BSP_TWL_3029_MAP_AUDIO_CTRL2_OFFSET, |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
873 l1_config.params.ctrl2,NULL); |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
874 |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
875 //Set the CTRL4 register |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
876 BspTwl3029_I2c_WriteSingle(BSP_TWL3029_I2C_AUD,BSP_TWL_3029_MAP_AUDIO_CTRL4_OFFSET, |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
877 l1_config.params.ctrl4,NULL); |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
878 //Set the CTRL5 register |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
879 BspTwl3029_I2c_WriteSingle(BSP_TWL3029_I2C_AUD,BSP_TWL_3029_MAP_AUDIO_CTRL5_OFFSET, |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
880 l1_config.params.ctrl5,NULL); |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
881 //Set the CTRL6 register |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
882 BspTwl3029_I2c_WriteSingle(BSP_TWL3029_I2C_AUD,BSP_TWL_3029_MAP_AUDIO_CTRL6_OFFSET, |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
883 l1_config.params.ctrl6,NULL); |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
884 //Set the POPAUTO register |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
885 BspTwl3029_I2c_WriteSingle(BSP_TWL3029_I2C_AUD,BSP_TWL_3029_MAP_AUDIO_POPAUTO_OFFSET, |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
886 l1_config.params.popauto,NULL); |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
887 |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
888 // ************ END REG INIT FOR PS build/STANDALONE **************** |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
889 |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
890 |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
891 |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
892 BspTwl3029_I2c_WriteSingle(BSP_TWL3029_I2C_AUD,BSP_TWL_3029_MAP_AUDIO_OUTEN1_OFFSET, |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
893 l1_config.params.outen1,NULL); |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
894 //Set the OUTEN2 register |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
895 BspTwl3029_I2c_WriteSingle(BSP_TWL3029_I2C_AUD,BSP_TWL_3029_MAP_AUDIO_OUTEN2_OFFSET, |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
896 l1_config.params.outen2,NULL); |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
897 //Set the OUTEN3 register |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
898 BspTwl3029_I2c_WriteSingle(BSP_TWL3029_I2C_AUD,BSP_TWL_3029_MAP_AUDIO_OUTEN3_OFFSET, |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
899 l1_config.params.outen3,NULL); |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
900 |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
901 |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
902 |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
903 //Set the AUDLGAIN register |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
904 BspTwl3029_I2c_WriteSingle(BSP_TWL3029_I2C_AUD,BSP_TWL_3029_MAP_AUDIO_AUDLGAIN_OFFSET, |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
905 l1_config.params.aulga,NULL); |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
906 //Set the AUDRGAIN register |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
907 BspTwl3029_I2c_WriteSingle(BSP_TWL3029_I2C_AUD,BSP_TWL_3029_MAP_AUDIO_AUDRGAIN_OFFSET, |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
908 l1_config.params.aurga,NULL); |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
909 #endif |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
910 |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
911 |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
912 #if (OP_L1_STANDALONE == 1) |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
913 #if (L1_MADC_ON == 1) |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
914 //MADC Real time initialization for all the 11 ADCs |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
915 bspTwl3029_Madc_enableRt( NULL, 0x7ff, l1a_madc_callback, &l1_madc_results); |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
916 #endif |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
917 #endif |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
918 |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
919 #endif |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
920 #endif //CODE_VERSION != SIMULATION |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
921 } |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
922 |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
923 /*-------------------------------------------------------*/ |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
924 /* l1_pwr_mgt_init() */ |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
925 /*-------------------------------------------------------*/ |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
926 /* Parameters : */ |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
927 /* ------------- */ |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
928 /* Return : */ |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
929 /* ------------- */ |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
930 /* Description : */ |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
931 /* ------------- */ |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
932 /* This routine is used to initialize the gauging */ |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
933 /* related variables. */ |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
934 /*-------------------------------------------------------*/ |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
935 void l1_pwr_mgt_init(void) |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
936 { |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
937 |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
938 //++++++++++++++++++++++++++++++++++++++++++ |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
939 // Power management variables |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
940 //++++++++++++++++++++++++++++++++++++++++++ |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
941 |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
942 // flags for wake-up .... |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
943 l1s.pw_mgr.Os_ticks_required = FALSE; |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
944 l1s.pw_mgr.frame_adjust = FALSE; |
110
86b36d9f4b42
l1_init.c: passes compilation, object diffing begins
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
109
diff
changeset
|
945 #if 0 /* not present in TCS211 */ |
108
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
946 l1s.pw_mgr.wakeup_time = 0; |
110
86b36d9f4b42
l1_init.c: passes compilation, object diffing begins
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
109
diff
changeset
|
947 #endif |
108
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
948 |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
949 // variables for sleep .... |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
950 l1s.pw_mgr.sleep_duration = 0; |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
951 l1s.pw_mgr.sleep_performed = DO_NOT_SLEEP; |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
952 l1s.pw_mgr.modules_status = 0; // all clocks ON |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
953 l1s.pw_mgr.paging_scheduled = FALSE; |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
954 |
109
a038d8cd9647
l1_init.c: fixes from the freecalypso-sw/gsm-fw version, doesn't compile yet
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
108
diff
changeset
|
955 #if 0 /* not present in TCS211 */ |
108
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
956 // variable for afc bypass mode |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
957 l1s.pw_mgr.afc_bypass_mode = AFC_BYPASS_MODE; |
109
a038d8cd9647
l1_init.c: fixes from the freecalypso-sw/gsm-fw version, doesn't compile yet
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
108
diff
changeset
|
958 #endif |
108
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
959 |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
960 // 32 Khz gauging .... |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
961 l1s.pw_mgr.gaug_count = 0; |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
962 l1s.pw_mgr.enough_gaug = FALSE; |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
963 //Nina modify to save power, not forbid deep sleep, only force gauging in next paging |
110
86b36d9f4b42
l1_init.c: passes compilation, object diffing begins
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
109
diff
changeset
|
964 #if 0 /* not present in TCS211 */ |
108
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
965 l1s.force_gauging_next_paging_due_to_CCHR = 0; |
110
86b36d9f4b42
l1_init.c: passes compilation, object diffing begins
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
109
diff
changeset
|
966 #endif |
108
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
967 l1s.pw_mgr.gauging_task = INACTIVE; |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
968 |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
969 // GAUGING duration |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
970 #if (CHIPSET == 7) || (CHIPSET == 8) || (CHIPSET == 10) || (CHIPSET == 11) || (CHIPSET == 12) || (CHIPSET == 15) |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
971 if (l1_config.dpll <8 ) |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
972 l1s.pw_mgr.gaug_duration = 9; // 9 frames (no more CTRL with DSP) |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
973 else // with a dpll >= 104Mhz the HF counter is too small: gauging limitation to 6 frames. |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
974 #if(CHIPSET == 15) |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
975 // Gauging duration could be reduced to 4 frames (from 5 frames) as fast paging (FF_L1_FAST_DECODING) is available |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
976 l1s.pw_mgr.gaug_duration = 4; // 4 frames |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
977 #else |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
978 l1s.pw_mgr.gaug_duration = 6; // 6 frames |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
979 #endif |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
980 #else |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
981 l1s.pw_mgr.gaug_duration = 11; // 1CTRL + 9 frames +1CTRL |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
982 #endif |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
983 |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
984 |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
985 //------------------------------------------------- |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
986 // INIT state: |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
987 // 32.768Khz is in the range [-500 ppm,+100 ppm] |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
988 // due to temperature variation. |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
989 // LF_100PPM = 32.7712768 Khz |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
990 // LF_500PPM = 32.751616 Khz |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
991 // |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
992 // ACQUIS STATE : |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
993 // 32.768Khz variations allowed from INIT value |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
994 // are [-50 ppm,+50ppm]. Same delta on ideal 32khz |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
995 // during 9 frames (gauging duration) represents 1348*T32. |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
996 // LF_50PPM = 32.7696384 Khz |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
997 // 1348/32.768 - 1348/32.7696384 = 0.002056632 ms |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
998 // At 78 Mhz it means : 0.002056632ms/0.000012820513ms= 160 T |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
999 // |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1000 // UPDATE state : |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1001 // allowed variations are [-6 ppm,+6ppm] jitter |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1002 // LF_6PPM = 32.76819661 Khz |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1003 // 1348/32.768 - 1348/32.76819661 = 0.00024691 ms |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1004 // At 78 Mhz it means : 0.00024691 / 0.000012820513ms= 19 T |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1005 // |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1006 // 78 Mhz 65 Mhz 84.5 Mhz |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1007 // =========================== |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1008 // C_CLK_MIN 2380 1983 2578 |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1009 // C_CLK_INIT_MIN 8721 29113 31293 |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1010 // C_CLK_MAX 2381 1984 2580 |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1011 // C_CLK_INIT_MAX 36823 41608 1662 |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1012 // C_DELTA_HF_ACQUIS 160 130 173 |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1013 // C_DELTA_HF_UPDATE 19 15 20 |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1014 //------------------------------------------------- |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1015 #if ((CHIPSET == 2) || (CHIPSET == 3) || (CHIPSET == 5) || (CHIPSET == 6) || (CHIPSET == 9)) |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1016 l1s.pw_mgr.c_clk_min = C_CLK_MIN; |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1017 l1s.pw_mgr.c_clk_init_min = C_CLK_INIT_MIN; |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1018 l1s.pw_mgr.c_clk_max = C_CLK_MAX; |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1019 l1s.pw_mgr.c_clk_init_max = C_CLK_INIT_MAX; |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1020 l1s.pw_mgr.c_delta_hf_acquis = C_DELTA_HF_ACQUIS; |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1021 l1s.pw_mgr.c_delta_hf_update = C_DELTA_HF_UPDATE; |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1022 #elif ((CHIPSET == 4) || (CHIPSET == 7) || (CHIPSET == 8) || (CHIPSET == 10) || (CHIPSET == 11) || (CHIPSET == 12) || (CHIPSET == 15)) |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1023 // 78000/32.7712768 = 2380.13308 |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1024 l1s.pw_mgr.c_clk_min = (UWORD32)((l1_config.dpll*MCUCLK)/LF_100PPM); |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1025 // 0.13308*2^16 |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1026 l1s.pw_mgr.c_clk_init_min =(UWORD32) ((UWORD32)((UWORD32)(((UWORD32)(l1_config.dpll*MCUCLK))- |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1027 (l1s.pw_mgr.c_clk_min*LF_100PPM))* |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1028 65536)/LF_100PPM); //omaps00090550 |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1029 |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1030 // 78000/32.751616 = 2381.561875 |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1031 l1s.pw_mgr.c_clk_max = (UWORD32)((l1_config.dpll*MCUCLK)/LF_500PPM); //omaps00090550 |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1032 // 0.561875*2^16 |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1033 l1s.pw_mgr.c_clk_init_max =(UWORD32)((UWORD32)(((double)(l1_config.dpll*MCUCLK)- |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1034 (double)(l1s.pw_mgr.c_clk_max*LF_500PPM))* |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1035 65536)/LF_500PPM);//omaps00090550 |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1036 |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1037 // remember hf is expressed in nbr of clock in hz (ex 65Mhz,104Mhz) |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1038 l1s.pw_mgr.c_delta_hf_acquis =(UWORD32) (((GAUG_IN_32T/LF)-(GAUG_IN_32T/LF_50PPM))*(l1_config.dpll*MCUCLK));//omaps00090550 |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1039 l1s.pw_mgr.c_delta_hf_update =(UWORD32)( ((GAUG_IN_32T/LF)-(GAUG_IN_32T/LF_6PPM ))*(l1_config.dpll*MCUCLK));//omaps00090550 |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1040 #endif |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1041 |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1042 } /* l1_pwr_mgt_init() */ |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1043 |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1044 /*-------------------------------------------------------*/ |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1045 /* l1_initialize_var() */ |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1046 /*-------------------------------------------------------*/ |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1047 /* Parameters : */ |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1048 /* ------------- */ |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1049 /* Return : */ |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1050 /* ------------- */ |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1051 /* Description : */ |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1052 /* ------------- */ |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1053 /* This routine is used to initialize the l1a, l1s and */ |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1054 /* l1a_l1s_com global structures. */ |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1055 /*-------------------------------------------------------*/ |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1056 void l1_initialize_var(void) |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1057 { |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1058 UWORD32 i; |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1059 UWORD8 task_id; |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1060 |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1061 //++++++++++++++++++++++++++++++++++++++++++ |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1062 // Power management variables |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1063 //++++++++++++++++++++++++++++++++++++++++++ |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1064 l1_pwr_mgt_init(); |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1065 |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1066 //++++++++++++++++++++++++++++++++++++++++++ |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1067 // Reset "l1s" structure. |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1068 //++++++++++++++++++++++++++++++++++++++++++ |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1069 |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1070 // time counter used for debug and by L3 scenario... |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1071 l1s.debug_time = 0; |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1072 |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1073 // L1S tasks management... |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1074 //----------------------------------------- |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1075 for(task_id=0; task_id<NBR_DL_L1S_TASKS; task_id++) |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1076 { |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1077 if (!((task_id == ADC_CSMODE0) && (l1a_l1s_com.recovery_flag != FALSE))) |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1078 { |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1079 l1s.task_status[task_id].new_status = NOT_PENDING; |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1080 l1s.task_status[task_id].current_status = INACTIVE; |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1081 } |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1082 } |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1083 l1s.frame_count = 0; |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1084 l1s.forbid_meas = 0; |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1085 #if L1_GPRS |
110
86b36d9f4b42
l1_init.c: passes compilation, object diffing begins
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
109
diff
changeset
|
1086 #if 0 /* not present in TCS211 */ |
108
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1087 l1s.tcr_prog_done=0; |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1088 #endif |
110
86b36d9f4b42
l1_init.c: passes compilation, object diffing begins
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
109
diff
changeset
|
1089 #endif |
108
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1090 #if (AUDIO_DEBUG == 1) |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1091 audio_reg_read_status=0; |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1092 #endif |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1093 // MFTAB management variables... |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1094 //----------------------------------------- |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1095 l1s.afrm = 0; |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1096 l1s_clear_mftab(l1s.mftab.frmlst); |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1097 |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1098 // Controle parameters... (miscellaneous) |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1099 //----------------------------------------- |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1100 #if (RF_FAM != 61) |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1101 l1s.afc = ((WORD16)l1_config.params.eeprom_afc>>3); //F13.3 -> F16.0 |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1102 #endif |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1103 #if (RF_FAM == 61) |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1104 l1s.afc = ((WORD16)l1_config.params.eeprom_afc>>2); //F13.3 -> F14.0 |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1105 #endif |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1106 |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1107 |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1108 l1s.afc_frame_count = 0; |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1109 |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1110 #if (TOA_ALGO == 2) |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1111 l1s.toa_var.toa_shift = ISH_INVALID; |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1112 l1s.toa_var.toa_snr_mask = 0; |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1113 l1s.toa_var.toa_frames_counter = 0; |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1114 l1s.toa_var.toa_accumul_counter = 0; |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1115 l1s.toa_var.toa_accumul_value = 0; |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1116 l1s.toa_var.toa_update_fn = 0; |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1117 l1s.toa_var.toa_update_flag = FALSE; |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1118 #else |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1119 l1s.toa_shift = ISH_INVALID; |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1120 l1s.toa_snr_mask = 0; |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1121 #if L1_GPRS |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1122 l1s.toa_period_count = 0; |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1123 l1s.toa_update = FALSE; |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1124 #endif |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1125 #endif |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1126 |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1127 #if (L1_GPRS == 1) |
110
86b36d9f4b42
l1_init.c: passes compilation, object diffing begins
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
109
diff
changeset
|
1128 #if 0 /* not present in TCS211 */ |
108
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1129 l1s.algo_change_synchro_active = FALSE; |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1130 #endif |
110
86b36d9f4b42
l1_init.c: passes compilation, object diffing begins
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
109
diff
changeset
|
1131 #endif |
108
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1132 |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1133 #if (L1_RF_KBD_FIX == 1) |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1134 l1s.total_kbd_on_time = 5000; |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1135 l1s.correction_ratio = 1; |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1136 #endif |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1137 /* Initialising the repeated SACCH variables */ |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1138 #if (FF_REPEATED_SACCH == 1 ) |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1139 l1s.repeated_sacch.srr = 0;/* SACCH Repetiton Request */ |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1140 l1s.repeated_sacch.sro = 0;/* SACCH Repetiton Order */ |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1141 l1s.repeated_sacch.buffer_empty = TRUE; |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1142 #endif /* FF_REPEATED_SACCH ==1*/ |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1143 |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1144 #if (FF_REPEATED_DL_FACCH == 1) |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1145 l1s.repeated_facch.pipeline[0].buffer_empty=l1s.repeated_facch.pipeline[1].buffer_empty=TRUE; |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1146 l1s.repeated_facch.counter_candidate=0; |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1147 l1s.repeated_facch.counter=1; |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1148 #endif/* (FF_REPEATED_DL_FACCH == 1) */ |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1149 |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1150 // Init the spurious_fb_detected flag |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1151 l1s.spurious_fb_detected = FALSE; |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1152 |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1153 // Flag registers for RF task controle... |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1154 //----------------------------------------- |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1155 l1s.tpu_ctrl_reg = 0; |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1156 l1s.dsp_ctrl_reg = 0; |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1157 |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1158 // Serving... |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1159 //============ |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1160 |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1161 // Serving frame number management. |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1162 //--------------------------------- |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1163 if (l1a_l1s_com.recovery_flag == FALSE) |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1164 { |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1165 l1s.actual_time.tc = 0; |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1166 l1s.actual_time.fn = 0; |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1167 l1s.actual_time.t1 = 0; |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1168 l1s.actual_time.t2 = 0; |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1169 l1s.actual_time.t3 = 0; |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1170 l1s.actual_time.fn_in_report = 0; |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1171 l1s.actual_time.fn_mod42432 = 0; |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1172 |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1173 l1s.next_time.tc = 0; |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1174 l1s.next_time.fn = 0; |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1175 l1s.next_time.t1 = 0; |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1176 l1s.next_time.t2 = 0; |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1177 l1s.next_time.t3 = 0; |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1178 l1s.next_time.fn_in_report = 0; |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1179 l1s.next_time.fn_mod42432 = 0; |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1180 |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1181 #if L1_GPRS |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1182 l1s.actual_time.block_id = 0; |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1183 l1s.next_time.block_id = 0; |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1184 l1s.next_plus_time = l1s.next_time; |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1185 l1s_increment_time(&(l1s.next_plus_time),1); |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1186 l1s.ctrl_synch_before = FALSE; |
110
86b36d9f4b42
l1_init.c: passes compilation, object diffing begins
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
109
diff
changeset
|
1187 #if 0 /* not present in TCS211 */ |
86b36d9f4b42
l1_init.c: passes compilation, object diffing begins
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
109
diff
changeset
|
1188 l1s.next_gauging_scheduled_for_PNP= 0; |
86b36d9f4b42
l1_init.c: passes compilation, object diffing begins
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
109
diff
changeset
|
1189 #endif |
108
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1190 #endif |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1191 } |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1192 |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1193 // TXPWR management. |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1194 //------------------- |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1195 l1s.reported_txpwr = 0; |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1196 l1s.applied_txpwr = 0; |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1197 |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1198 // Last RXQUAL value. |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1199 //------------------- |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1200 l1s.rxqual = 0; |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1201 |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1202 // Hardware info. |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1203 //--------------- |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1204 l1s.tpu_offset = 0; |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1205 l1s.tpu_offset_hw = 0; |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1206 |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1207 l1s.tpu_win = 0; |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1208 |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1209 // Initialize TXPWR info. |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1210 l1s.last_used_txpwr = NO_TXPWR; |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1211 |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1212 #if (AMR == 1) |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1213 // Reset DTX AMR status |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1214 //--------------------- |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1215 l1s.dtx_amr_dl_on=FALSE; |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1216 #endif |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1217 |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1218 // Code version structure |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1219 //------------------------- |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1220 |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1221 // DSP versions & checksum |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1222 l1s.version.dsp_code_version = 0; |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1223 l1s.version.dsp_patch_version = 0; |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1224 l1s.version.dsp_checksum = 0; // checksum patch+code DSP |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1225 |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1226 l1s.version.mcu_tcs_program_release = PROGRAM_RELEASE_VERSION; |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1227 l1s.version.mcu_tcs_internal = INTERNAL_VERSION; |
110
86b36d9f4b42
l1_init.c: passes compilation, object diffing begins
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
109
diff
changeset
|
1228 l1s.version.mcu_tcs_official = OFFICIAL_VERSION; |
108
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1229 |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1230 #if TESTMODE |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1231 l1s.version.mcu_tm_version = TESTMODEVERSION; |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1232 #else |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1233 l1s.version.mcu_tm_version = 0; |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1234 #endif |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1235 |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1236 //++++++++++++++++++++++++++++++++++++++++++ |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1237 // Reset "l1a" structure. |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1238 //++++++++++++++++++++++++++++++++++++++++++ |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1239 |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1240 // Downlink tasks management... |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1241 // Uplink tasks management... |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1242 // Measurement tasks management... |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1243 //----------------------------------------- |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1244 |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1245 if (l1a_l1s_com.recovery_flag == FALSE) |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1246 { |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1247 for(i=0; i<NBR_L1A_PROCESSES; i++) |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1248 { |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1249 l1a.l1a_en_meas[i] = 0; |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1250 l1a.state[i] = 0; // RESET state. |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1251 } |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1252 } |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1253 else |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1254 { |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1255 // L1A state for full list meas has to be maintained in case of recovery |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1256 for(i=0; i<NBR_L1A_PROCESSES; i++) |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1257 { |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1258 if ((i != FULL_MEAS) && (i!= I_ADC)) |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1259 { |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1260 l1a.l1a_en_meas[i] = 0; |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1261 l1a.state[i] = 0; // RESET state. |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1262 } |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1263 } |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1264 } |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1265 |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1266 l1a.confirm_SignalCode = 0; |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1267 |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1268 // Flag for forward/delete message management. |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1269 //--------------------------------------------- |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1270 if (l1a_l1s_com.recovery_flag == FALSE) |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1271 { |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1272 l1a.l1_msg_forwarded = 0; |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1273 } |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1274 |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1275 #if (L1_VOCODER_IF_CHANGE == 1) |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1276 // Reset new vocoder interface L1A global variables: automatic disabling and vocoder enabling flag. |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1277 l1a.vocoder_state.automatic_disable = FALSE; |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1278 l1a.vocoder_state.enabled = FALSE; |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1279 #endif // if L1_VOCODER_IF_CHANGE == 1 |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1280 //++++++++++++++++++++++++++++++++++++++++++ |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1281 // Reset "l1a_l1s_com" structure. |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1282 //++++++++++++++++++++++++++++++++++++++++++ |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1283 |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1284 l1a_l1s_com.l1a_activity_flag = TRUE; |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1285 l1a_l1s_com.time_to_next_l1s_task = 0; |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1286 |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1287 // Serving Cell... |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1288 //================= |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1289 |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1290 // Serving Cell identity and information. |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1291 //--------------------------------------- |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1292 l1a_reset_cell_info(&(l1a_l1s_com.Scell_info)); |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1293 |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1294 l1a_l1s_com.Smeas_dedic.acc_sub = 0; |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1295 l1a_l1s_com.Smeas_dedic.nbr_meas_sub = 0; |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1296 l1a_l1s_com.Smeas_dedic.qual_acc_full = 0; |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1297 l1a_l1s_com.Smeas_dedic.qual_acc_sub = 0; |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1298 l1a_l1s_com.Smeas_dedic.qual_nbr_meas_full = 0; |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1299 l1a_l1s_com.Smeas_dedic.qual_nbr_meas_sub = 0; |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1300 l1a_l1s_com.Smeas_dedic.dtx_used = 0; |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1301 |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1302 #if REL99 |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1303 #if FF_EMR |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1304 // Serving Cell identity EMR information. |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1305 //--------------------------------------- |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1306 l1a_l1s_com.Smeas_dedic_emr.rxlev_val_acc = 0; |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1307 l1a_l1s_com.Smeas_dedic_emr.rxlev_val_nbr_meas = 0; |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1308 l1a_l1s_com.Smeas_dedic_emr.nbr_rcvd_blocks = 0; |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1309 l1a_l1s_com.Smeas_dedic_emr.mean_bep_block_acc = 0; |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1310 l1a_l1s_com.Smeas_dedic_emr.cv_bep_block_acc = 0; |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1311 l1a_l1s_com.Smeas_dedic_emr.mean_bep_block_num = 0; |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1312 l1a_l1s_com.Smeas_dedic_emr.cv_bep_block_num = 0; |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1313 |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1314 #endif |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1315 #endif |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1316 |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1317 |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1318 l1a_l1s_com.Scell_used_IL.input_level = l1_config.params.il_min; |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1319 l1a_l1s_com.Scell_used_IL_d.input_level = l1_config.params.il_min; |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1320 l1a_l1s_com.Scell_used_IL_dd.input_level = l1_config.params.il_min; |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1321 |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1322 l1a_l1s_com.Scell_used_IL.lna_off = FALSE; |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1323 l1a_l1s_com.Scell_used_IL_d.lna_off = FALSE; |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1324 l1a_l1s_com.Scell_used_IL_dd.lna_off = FALSE; |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1325 |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1326 // Synchro information. |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1327 //--------------------------------------- |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1328 l1a_l1s_com.tn_difference = 0; |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1329 l1a_l1s_com.dl_tn = 0; |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1330 #if L1_FF_WA_OMAPS00099442 |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1331 l1a_l1s_com.change_tpu_offset_flag = FALSE; |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1332 #endif |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1333 |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1334 #if L1_GPRS |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1335 l1a_l1s_com.dsp_scheduler_mode = GSM_SCHEDULER; |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1336 #endif |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1337 |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1338 // Idle parameters. |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1339 //----------------- |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1340 l1a_l1s_com.nbcchs.schedule_array_size=0; |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1341 l1a_l1s_com.ebcchs.schedule_array_size=0; |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1342 l1a_l1s_com.bcchn.current_list_size=0; |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1343 l1a_l1s_com.nsync.current_list_size=0; |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1344 |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1345 #if (GSM_IDLE_RAM != 0) |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1346 l1s.gsm_idle_ram_ctl.l1s_full_exec = TRUE; |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1347 |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1348 #if GSM_IDLE_RAM_DEBUG |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1349 #if (CHIPSET == 10) && (OP_WCP == 1) |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1350 l1s.gsm_idle_ram_ctl.TC_true_control=0; |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1351 #endif // CHIPSET && OP_WCP |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1352 #endif // GSM_IDLE_RAM_DEBUG |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1353 #endif // GSM_IDLE_RAM |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1354 |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1355 #if (L1_12NEIGH ==1) |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1356 for (i=0;i<NBR_NEIGHBOURS+1;i++) |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1357 #else |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1358 for (i=0;i<6;i++) |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1359 #endif |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1360 { |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1361 l1a_l1s_com.nsync.list[i].status=NSYNC_FREE; |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1362 } |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1363 for (i=0;i<6;i++) |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1364 { |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1365 l1a_l1s_com.bcchn.list[i].status=NSYNC_FREE; |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1366 } |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1367 |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1368 // EOTD variables |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1369 #if (L1_EOTD==1) |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1370 l1a_l1s_com.nsync.eotd_meas_session=FALSE; |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1371 l1a_l1s_com.nsync.fn_sb_serv; |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1372 l1a_l1s_com.nsync.ta_sb_serv; |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1373 #endif |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1374 |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1375 // CBCH parameters. |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1376 // ---------------- |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1377 // nothing to reset. |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1378 |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1379 // Random Access information. |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1380 // ---------------------------- |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1381 // nothing to reset. |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1382 |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1383 // ADC management |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1384 //--------------- |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1385 if (l1a_l1s_com.recovery_flag == FALSE) |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1386 l1a_l1s_com.adc_mode = ADC_DISABLED; |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1387 |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1388 // TXPWR management. |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1389 //------------------- |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1390 #if(L1_FF_MULTIBAND == 0) |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1391 l1a_l1s_com.powerclass_band1 = 0; |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1392 l1a_l1s_com.powerclass_band2 = 0; |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1393 #else |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1394 for( i = 0; i< (NB_MAX_SUPPORTED_BANDS); i++) |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1395 { |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1396 l1a_l1s_com.powerclass[i] = 0; |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1397 } |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1398 #endif |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1399 |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1400 // Dedicated parameters. |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1401 //---------------------- |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1402 l1a_l1s_com.dedic_set.aset = NULL; |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1403 l1a_l1s_com.dedic_set.fset = NULL; |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1404 l1a_l1s_com.dedic_set.SignalCode = 0; |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1405 l1a_l1s_com.dedic_set.sync_tch = 0; |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1406 l1a_l1s_com.dedic_set.stop_tch = 0; |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1407 l1a_l1s_com.dedic_set.reset_facch = FALSE; |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1408 #if (FF_L1_TCH_VOCODER_CONTROL) |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1409 l1a_l1s_com.dedic_set.reset_sacch = FALSE; |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1410 #if (L1_VOCODER_IF_CHANGE == 0) |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1411 l1a_l1s_com.dedic_set.vocoder_on = TRUE; |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1412 #if (W_A_DSP_PR20037 == 1) |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1413 l1a_l1s_com.dedic_set.start_vocoder = TCH_VOCODER_ENABLE_REQ; |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1414 #else // W_A_DSP_PR20037 == 0 |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1415 l1a_l1s_com.dedic_set.start_vocoder = FALSE; |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1416 #endif // W_A_DSP_PR20037 |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1417 #else // L1_VOCODER_IF_CHANGE |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1418 l1a_l1s_com.dedic_set.vocoder_on = FALSE; |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1419 l1a_l1s_com.dedic_set.start_vocoder = TCH_VOCODER_RESET_COMMAND; |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1420 #endif // L1_VOCODER_IF_CHANGE |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1421 #endif // FF_L1_TCH_VOCODER_CONTROL |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1422 |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1423 l1a_l1s_com.dedic_set.radio_freq = 0; |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1424 l1a_l1s_com.dedic_set.radio_freq_d = 0; |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1425 l1a_l1s_com.dedic_set.radio_freq_dd = 0; |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1426 #if ((REL99 == 1) && (FF_BHO == 1)) |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1427 // blind handover params in dedic set |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1428 // Initialize the handover type to default value that is Normal Handover. |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1429 l1a_l1s_com.dedic_set.handover_type = 0; |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1430 l1a_l1s_com.dedic_set.long_rem_handover_type = 0; |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1431 l1a_l1s_com.dedic_set.bcch_carrier_of_nbr_cell = 0; |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1432 l1a_l1s_com.dedic_set.fn_offset = 0; |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1433 l1a_l1s_com.dedic_set.time_alignment = 0; |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1434 #endif |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1435 |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1436 #if (L1_12NEIGH ==1) |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1437 for (i=0;i<NBR_NEIGHBOURS+1;i++) |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1438 #else |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1439 for (i=0;i<6;i++) |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1440 #endif |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1441 { |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1442 l1a_l1s_com.nsync.list[i].sb26_offset = 0; |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1443 } |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1444 |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1445 l1a_l1s_com.dedic_set.pwrc = 0; |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1446 l1a_l1s_com.dedic_set.handover_fail_mode = FALSE; |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1447 #if (AMR == 1) |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1448 l1a_l1s_com.dedic_set.sync_amr = FALSE; |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1449 #endif |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1450 |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1451 // Handover parameters. |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1452 //--------------------- |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1453 // nothing to reset. |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1454 |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1455 // Neighbour Cells... |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1456 //==================== |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1457 |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1458 // FULL list. |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1459 //----------- |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1460 l1a_reset_full_list(); |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1461 |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1462 // BA list. |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1463 //--------- |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1464 l1a_reset_ba_list(); |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1465 l1a_l1s_com.ba_list.new_list_present = FALSE; |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1466 |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1467 #if L1_GPRS |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1468 // Packet measurement: Reset of the frequency list. |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1469 //------------------------------------------------- |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1470 l1pa_reset_cr_freq_list(); |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1471 #endif |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1472 |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1473 // L1S scheduler... |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1474 //==================== |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1475 |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1476 // L1S tasks management... |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1477 //----------------------------------------- |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1478 { |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1479 UWORD8 mem; |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1480 mem = l1a_l1s_com.l1s_en_task[ADC_CSMODE0]; |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1481 |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1482 for(i=0; i<NBR_DL_L1S_TASKS; i++) |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1483 { |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1484 l1a_l1s_com.task_param[i] = SEMAPHORE_RESET; |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1485 l1a_l1s_com.l1s_en_task[i] = TASK_DISABLED; |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1486 } |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1487 |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1488 // in case of recovery do not change the ADC initialization |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1489 if (l1a_l1s_com.recovery_flag != FALSE) |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1490 l1a_l1s_com.l1s_en_task[ADC_CSMODE0] = mem; |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1491 } |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1492 |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1493 // Measurement tasks management... |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1494 //----------------------------------------- |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1495 l1a_l1s_com.meas_param = 0; |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1496 l1a_l1s_com.l1s_en_meas = 0; |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1497 |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1498 // L1 mode... |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1499 //----------------------------------------- |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1500 if (l1a_l1s_com.recovery_flag == FALSE) // do not restart from CS_MODE0 after a recovery |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1501 l1a_l1s_com.mode = CS_MODE0; |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1502 |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1503 // Control algo variables. |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1504 //----------------------------------------- |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1505 l1a_l1s_com.fb_mode = 0; |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1506 l1a_l1s_com.toa_reset = FALSE; |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1507 |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1508 #if(L1_FF_MULTIBAND == 0) |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1509 for(i=0; i<=l1_config.std.nbmax_carrier; i++) |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1510 #else |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1511 for(i=0; i<= NBMAX_CARRIER; i++) |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1512 #endif |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1513 { |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1514 l1a_l1s_com.last_input_level[i].input_level = l1_config.params.il_min; |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1515 l1a_l1s_com.last_input_level[i].lna_off = FALSE; |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1516 } |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1517 |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1518 #if FF_L1_IT_DSP_DTX |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1519 // Fast DTX variables. |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1520 //----------------------------------------- |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1521 // Clear DTX interrupt condition |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1522 l1a_apihisr_com.dtx.pending = FALSE; |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1523 // Enable TX activity |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1524 l1a_apihisr_com.dtx.tx_active = TRUE; |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1525 // No DTX status awaited |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1526 l1a_apihisr_com.dtx.dtx_status = DTX_AVAILABLE; |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1527 // Fast DTX service latency timer |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1528 l1a_apihisr_com.dtx.fast_dtx_ready_timer = 0; |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1529 // Fast DTX service available |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1530 l1a_apihisr_com.dtx.fast_dtx_ready = FALSE; |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1531 #endif |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1532 #if L1_RECOVERY |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1533 l1s.recovery.frame_count = 0; |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1534 #endif |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1535 |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1536 #if (AUDIO_TASK == 1) |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1537 l1audio_initialize_var(); |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1538 #endif |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1539 |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1540 #if (L1_GTT == 1) |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1541 l1gtt_initialize_var(); |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1542 #endif |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1543 |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1544 #if (L1_MP3 == 1) |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1545 l1mp3_initialize_var(); |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1546 #endif |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1547 |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1548 #if (L1_MIDI == 1) |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1549 l1midi_initialize_var(); |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1550 #endif |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1551 //ADDED FOR AAC |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1552 #if (L1_AAC == 1) |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1553 l1aac_initialize_var(); |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1554 #endif |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1555 #if (L1_DYN_DSP_DWNLD == 1) |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1556 l1_dyn_dwnld_initialize_var(); |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1557 #endif |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1558 #if (FF_L1_FAST_DECODING == 1) |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1559 l1a_apihisr_com.fast_decoding.pending = FALSE; |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1560 l1a_apihisr_com.fast_decoding.crc_error = FALSE; |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1561 l1a_apihisr_com.fast_decoding.status = 0; |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1562 l1a_apihisr_com.fast_decoding.deferred_control_req = FALSE; |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1563 l1a_apihisr_com.fast_decoding.task = 0; |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1564 l1a_apihisr_com.fast_decoding.burst_id = 0; |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1565 l1a_apihisr_com.fast_decoding.contiguous_decoding = FALSE; |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1566 #endif /* FF_L1_FAST_DECODING */ |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1567 |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1568 |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1569 #if(L1_CHECK_COMPATIBLE == 1) |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1570 l1a.vcr_wait = FALSE; |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1571 l1a.stop_req = FALSE; |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1572 l1a.vcr_msg_param = TRUE; |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1573 l1a.vch_auto_disable = FALSE; |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1574 |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1575 #endif |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1576 |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1577 |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1578 } |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1579 |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1580 |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1581 /*---------------------------------------------------------*/ |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1582 /* l1_dpll_init_var() */ |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1583 /*---------------------------------------------------------*/ |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1584 /* Parameters : None */ |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1585 /* Return : None */ |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1586 /* Functionality : Initialize L1 DPLL variable for gauging */ |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1587 /* processing */ |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1588 /*---------------------------------------------------------*/ |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1589 void l1_dpll_init_var(void) { |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1590 |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1591 #if (CODE_VERSION != SIMULATION) |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1592 // Init DPLL variable |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1593 //=================== |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1594 #if (CHIPSET == 2 || CHIPSET == 3 || CHIPSET == 5 || CHIPSET == 6 || CHIPSET == 9) |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1595 l1_config.dpll=PLL; |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1596 #elif ((CHIPSET == 4) || (CHIPSET == 7) || (CHIPSET == 8) || (CHIPSET == 10) || (CHIPSET == 11) || (CHIPSET == 12) || (CHIPSET == 15)) |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1597 { |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1598 UWORD16 dpll_div; |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1599 UWORD16 dpll_mul; |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1600 #if (CHIPSET == 12) |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1601 // not required for Locosto: There is NO CNTL_CLK_DSP in Locosto |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1602 double dsp_div = CLKM_GET_DSP_DIV_VALUE; |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1603 #endif |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1604 |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1605 dpll_div=DPLL_READ_DPLL_DIV; |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1606 dpll_mul=DPLL_READ_DPLL_MUL; |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1607 |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1608 #if (CHIPSET == 12) |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1609 // Not required for locsto due to the reason mentioned above. |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1610 l1_config.dpll= ((double)(dpll_mul)/(double)(dpll_div+1))/(double)(dsp_div); |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1611 #else |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1612 l1_config.dpll= (double)(dpll_mul)/(double)(dpll_div+1); |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1613 #endif |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1614 } |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1615 #endif |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1616 #endif |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1617 |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1618 } /* l1_dpll_init_var() */ |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1619 |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1620 /*-------------------------------------------------------------*/ |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1621 /* FUNCTION: l1_drp_wrapper_init */ |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1622 |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1623 /*-------------------------------------------------------------*/ |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1624 |
111
ba0b349e718e
l1_init.c: l1_drp_wrapper_init() removed
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
110
diff
changeset
|
1625 #if(RF_FAM == 61) |
108
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1626 void l1_drp_wrapper_init (void) |
111
ba0b349e718e
l1_init.c: l1_drp_wrapper_init() removed
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
110
diff
changeset
|
1627 { |
108
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1628 l1ddsp_apc_load_apcctrl2(l1_config.params.apcctrl2); |
111
ba0b349e718e
l1_init.c: l1_drp_wrapper_init() removed
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
110
diff
changeset
|
1629 } |
ba0b349e718e
l1_init.c: l1_drp_wrapper_init() removed
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
110
diff
changeset
|
1630 #endif |
108
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1631 |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1632 /*-------------------------------------------------------------*/ |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1633 /* FUNCTION: l1_drp_init */ |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1634 /* Params: Void */ |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1635 /* |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1636 Functionality: This function does the following |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1637 1. Initialize Misc variables wrt DRP |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1638 2a Copy the RAMP Tables into the DSP MCU API |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1639 2b. Initialize other APIs wrt DCO |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1640 3. Download Reference Software |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1641 4. Call the function to : Start the REG_ON Script in the DRP |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1642 */ |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1643 /*-------------------------------------------------------------*/ |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1644 |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1645 #if (L1_DRP == 1) |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1646 #if (DRP_FW_EXT==1) |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1647 #pragma DATA_SECTION(l1_drp_int_mem, ".drp_ptr") |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1648 void * l1_drp_int_mem; |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1649 #pragma DATA_SECTION(l1_drp_ext_mem, ".drp_ptr") |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1650 void *l1_drp_ext_mem; |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1651 #endif |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1652 void l1_drp_init() |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1653 { |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1654 //int i;- OMAPS90550-new |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1655 #if (DRP_FW_EXT==1) |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1656 uint32 size_int=0; |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1657 uint32 size_ext=0; |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1658 #endif |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1659 #if (RF_FAM == 61) |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1660 volatile UWORD16 *ptr_drp_init16; |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1661 UWORD16 drp_maj_version; |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1662 UWORD16 drp_min_version; |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1663 |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1664 //Initialize the following SRM_API, REG related address drp_srm_data = DRP_SRM_DATA_ADD, |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1665 //drp_regs = DRP_REGS_BASE_ADD;, drp_srm_api = DRP_SRM_API_ADD |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1666 |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1667 drp_api_addr_init(); |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1668 |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1669 #if (DRP_FW_EXT==1) |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1670 drp_maj_version = (drp_ref_sw_ver >> 8) & 0xFF; |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1671 drp_min_version = (drp_ref_sw_ver & 0xFF); |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1672 #endif |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1673 |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1674 //Initialize the following variables... TBD Danny |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1675 //SRM_CW = 0x00000040, IRQ_CNT= 0x00000040 , TX_PTR_START_END_ADDR = 0X00200025, |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1676 //RX_PTR_START_END_ADDR = 0X0000001F , 0XFFFE0806= 16 |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1677 //The registers are 32 bit since its a RHEA peripheral has to be writtin in 16 bit writes |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1678 // This is done by the DRP script download |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1679 |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1680 // The counter for # of DRP_DBB_RX_IRQs (in the wrapper) to be masked |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1681 ptr_drp_init16 = (UWORD16 *) (DRP_DBB_RX_IRQ_MASK); |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1682 (*ptr_drp_init16) = DRP_DBB_RX_IRQ_COUNT; |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1683 |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1684 #endif //RF_FAM == 61 |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1685 l1s.boot_result=0; |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1686 #if (DRP_FW_EXT==1) |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1687 if(!((drp_min_version >= L1_DRP_COMPAT_MINOR_VER) && (drp_maj_version == L1_DRP_COMPAT_MAJOR_VER))) { |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1688 l1s.boot_result = 1; |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1689 return; |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1690 } |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1691 drp_get_memory_size(&size_int,&size_ext); |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1692 /* FIXME FIXME ERROR handling for memory allocation failure */ |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1693 if(size_int) |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1694 { |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1695 l1_drp_int_mem=os_alloc_sig(size_int); |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1696 if(l1_drp_int_mem==NULL) |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1697 { |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1698 /*FIXME Error Handling Here */ |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1699 l1s.boot_result = 1; |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1700 return; |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1701 } |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1702 } |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1703 if(size_ext) |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1704 { |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1705 l1_drp_ext_mem=os_alloc_sig(size_ext); |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1706 |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1707 if(l1_drp_ext_mem==NULL) |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1708 { |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1709 /*FIXME Error Handling Here */ |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1710 l1s.boot_result = 1; |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1711 return; |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1712 } |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1713 } |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1714 |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1715 // Populate pointers |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1716 if(drpfw_init(&modem_func_jump_table,&modem_var_jump_table)) |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1717 { |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1718 // This condition should not be reached in phase 1 of DRP FW |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1719 // Extraction. DRP and L1 software should always be compatible |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1720 l1s.boot_result = 1; |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1721 return; |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1722 } |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1723 |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1724 ((T_DRP_ENV_INT_BLK *)l1_drp_int_mem)->g_pcb_config = RF_BAND_SYSTEM_INDEX; //OMAPS148175 |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1725 |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1726 #endif // DRP_FW_EXT==1 |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1727 // This function would takes care of drp_ref_sw download till that is in place this would be a dummy function |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1728 // Testing PLD_WriteRegister(0x0440, 0x165c); |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1729 #if (RF_FAM == 60) // PLD board |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1730 // for PLD board script downloading will happen through USP driver |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1731 // load ref_sw_main |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1732 // drp_ref_sw_upload(drp_ref_sw); |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1733 drp_copy_ref_sw_to_drpsrm( (unsigned char *) drp_ref_sw); |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1734 #elif (RF_FAM == 61) // Locosto based board |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1735 // load ref_sw_main |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1736 // drp_ref_sw_upload(drp_ref_sw); // TBD replace with DRP Copy function... |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1737 drp_copy_ref_sw_to_drpsrm( (unsigned char *) drp_ref_sw); |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1738 #endif |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1739 |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1740 #if (L1_DRP_DITHERING == 1) |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1741 (*(volatile UINT8 *)CONF_MUX_VIEW8) = 0x01; |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1742 (*(volatile UINT8 *)CONF_DEBUG_SEL_TST_8) = 0x07; |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1743 (*(volatile UINT8 *)CONF_GPIO_17) = 0x02; |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1744 (*(volatile UINT8 *)CONF_LOCOSTO_DEBUG) = 0x00; |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1745 #endif |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1746 |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1747 } |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1748 #endif // L1_DRP |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1749 |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1750 /*-------------------------------------------------------*/ |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1751 /* l1_initialize() */ |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1752 /*-------------------------------------------------------*/ |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1753 /* Parameters : */ |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1754 /* Return : */ |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1755 /* Functionality : */ |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1756 /*-------------------------------------------------------*/ |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1757 void l1_initialize(T_MMI_L1_CONFIG *mmi_l1_config) |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1758 { |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1759 #if (TRACE_TYPE == 1) || (TRACE_TYPE == 4) || (TRACE_TYPE == 5) |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1760 l1_trace_init(); |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1761 #endif |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1762 |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1763 // this is not a recovery initialization . |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1764 l1a_l1s_com.recovery_flag = FALSE; |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1765 |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1766 // initialize the ratio of the wait loop |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1767 // must be initialized before using the wait_ARM_cycles() function !!! |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1768 #if (CODE_VERSION != SIMULATION) |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1769 initialize_wait_loop(); |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1770 #endif |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1771 |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1772 // Init Layer 1 configuration |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1773 //=========================== |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1774 #if(L1_FF_MULTIBAND == 0) |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1775 l1_config.std.id = mmi_l1_config->std; |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1776 #endif |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1777 |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1778 l1_config.tx_pwr_code = mmi_l1_config->tx_pwr_code; |
110
86b36d9f4b42
l1_init.c: passes compilation, object diffing begins
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
109
diff
changeset
|
1779 #if 0 /* not present in TCS211 */ |
86b36d9f4b42
l1_init.c: passes compilation, object diffing begins
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
109
diff
changeset
|
1780 #if IDS |
86b36d9f4b42
l1_init.c: passes compilation, object diffing begins
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
109
diff
changeset
|
1781 l1_config.ids_enable = mmi_l1_config->ids_enable; |
86b36d9f4b42
l1_init.c: passes compilation, object diffing begins
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
109
diff
changeset
|
1782 #endif |
86b36d9f4b42
l1_init.c: passes compilation, object diffing begins
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
109
diff
changeset
|
1783 l1_config.facch_test.enable = mmi_l1_config->facch_test.enable; |
86b36d9f4b42
l1_init.c: passes compilation, object diffing begins
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
109
diff
changeset
|
1784 l1_config.facch_test.period = mmi_l1_config->facch_test.period; |
108
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1785 #endif |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1786 l1_config.dwnld = mmi_l1_config->dwnld; |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1787 |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1788 #if TESTMODE |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1789 // Initialize TestMode params: must be done after Omega power-on |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1790 l1_config.TestMode = FALSE; |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1791 // Enable control algos and ADC |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1792 l1_config.agc_enable = 1; |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1793 l1_config.afc_enable = 1; |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1794 l1_config.adc_enable = 1; |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1795 #if (FF_REPEATED_SACCH == 1) |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1796 l1_config.repeat_sacch_enable = 1; /* Repeated SACCH mode enabled */ |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1797 #endif /* (FF_REPEATED_SACCH == 1) */ |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1798 #if (FF_REPEATED_DL_FACCH == 1) |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1799 l1_config.repeat_facch_dl_enable = 1; /* Repeated SACCH mode enabled */ |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1800 #endif /* ( FF_REPEATED_DL_FACCH == 1) */ |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1801 #endif |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1802 |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1803 // sleep management configuration |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1804 //=============================== |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1805 l1s.pw_mgr.mode_authorized = mmi_l1_config->pwr_mngt_mode_authorized; |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1806 l1s.pw_mgr.clocks = mmi_l1_config->pwr_mngt_clocks; |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1807 l1_config.pwr_mngt = mmi_l1_config->pwr_mngt; |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1808 |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1809 Cust_init_std(); |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1810 Cust_init_params(); |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1811 |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1812 |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1813 |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1814 // Init DPLL variable |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1815 //=================== |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1816 l1_dpll_init_var(); |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1817 |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1818 // Reset hardware (DSP,Analog Baseband device , TPU) .... |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1819 //======================================================== |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1820 #if (CODE_VERSION != SIMULATION) |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1821 dsp_power_on(); |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1822 l1_abb_power_on(); |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1823 #if (L1_DRP == 1) |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1824 l1_drp_init(); |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1825 //required for interworking with Isample 2.1 and Isample 2.5 |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1826 #if (DRP_FW_EXT == 1) |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1827 if (!l1s.boot_result) |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1828 { |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1829 #endif |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1830 //for DRP Calibration |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1831 Cust_init_params_drp(); |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1832 drp_efuse_init(); |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1833 #if (DRP_FW_EXT == 1) |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1834 } /* end if boot_result != 0 */ |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1835 #endif |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1836 |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1837 #endif |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1838 |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1839 #endif |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1840 |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1841 // Initialize hardware....(DSP, TPU).... |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1842 //================================================= |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1843 l1_tpu_init(); |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1844 l1_dsp_init(); |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1845 |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1846 // Initialize L1 variables (l1a, l1s, l1a_l1s_com). |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1847 //================================================= |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1848 l1_initialize_var(); |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1849 |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1850 // API check function |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1851 #if ((OP_L1_STANDALONE == 1) && ((DSP == 38) || (DSP == 39)) && (CODE_VERSION != SIMULATION)) |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1852 l1_api_dump(); |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1853 #endif |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1854 |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1855 #if (L1_GPRS) |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1856 // Initialize L1 variables used in packet mode (l1pa, l1ps, l1pa_l1ps_com). |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1857 //======================================================================== |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1858 initialize_l1pvar(); |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1859 #endif |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1860 |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1861 // Initialize statistics mode....... |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1862 //================================================= |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1863 #if TRACE_TYPE==3 |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1864 reset_stats(); |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1865 #endif |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1866 #if(OP_L1_STANDALONE == 1 || L1_NAVC == 1 )//NAVC |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1867 Cust_navc_ctrl_status(1);//start - NAVC |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1868 #endif//end of (OP_L1_STANDALONE == 1 || L1_NAVC == 1 ) |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1869 |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1870 } |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1871 |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1872 /*-------------------------------------------------------*/ |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1873 /* l1_initialize_for_recovery */ |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1874 /*-------------------------------------------------------*/ |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1875 /* Parameters : */ |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1876 /* Return : */ |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1877 /* Functionality : This function is called for L1 */ |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1878 /* recovery after a Crash. When there are 100 COM error */ |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1879 /* or if ther are 100 PM =0 from the DSP Successively. */ |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1880 /* The Layer 1 Crashes. The next time the Protocol stack */ |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1881 /* requests for Full Rx Measurement (viz Cell selection) */ |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1882 /* This function gets called and the L1 recovery is */ |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1883 /* initiated. */ |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1884 /*-------------------------------------------------------*/ |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1885 #if L1_RECOVERY |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1886 void l1_initialize_for_recovery(void) |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1887 { |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1888 LA_ResetLead(); // set DSP in reset mode |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1889 initialize_wait_loop(); |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1890 |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1891 dsp_power_on(); // the reset mode is disabled here |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1892 l1_abb_power_on(); |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1893 #if (L1_DRP == 1) |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1894 l1_drp_init(); |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1895 //Required for interworking with Isample 2.1 and Isample 2.5 |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1896 Cust_init_params_drp(); |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1897 drp_efuse_init(); |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1898 #endif |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1899 l1_tpu_init(); |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1900 wait_ARM_cycles(convert_nanosec_to_cycles(11000000)); // wait of 5.5 msec |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1901 l1_dsp_init(); |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1902 l1_initialize_var(); |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1903 |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1904 #if L1_GPRS |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1905 initialize_l1pvar(); |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1906 #endif |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1907 |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1908 l1a_l1s_com.recovery_flag = FALSE; |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1909 |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1910 // clear pending IQ_FRAME it and enable it |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1911 #if (CHIPSET >= 4 ) |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1912 #if (CHIPSET == 12) || (CHIPSET == 15) |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1913 F_INTH_RESET_ONE_IT(C_INTH_FRAME_IT); |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1914 #else |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1915 * (volatile UWORD16 *) INTH_IT_REG1 &= ~(1 << IQ_FRAME); // clear TDMA IRQ |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1916 #endif |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1917 #else |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1918 * (volatile UWORD16 *) INTH_IT_REG &= ~(1 << IQ_FRAME); // clear TDMA IRQ |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1919 #endif |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1920 |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1921 } |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1922 #endif |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1923 |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1924 |
0b78e29313b4
l1_init.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1925 |