FreeCalypso > hg > freecalypso-sw
annotate gsm-fw/L1/cust0/l1_cust.c @ 865:f5affe83ba2d
lldbg hack (poor girl's substitute for JTAG) implemented
author | Space Falcon <falcon@ivan.Harhan.ORG> |
---|---|
date | Fri, 15 May 2015 00:02:03 +0000 |
parents | a60b375014e3 |
children | 452a4aea3fc5 |
rev | line source |
---|---|
523
b92febec14aa
started FC version of l1_cust.c
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
517
diff
changeset
|
1 /* |
b92febec14aa
started FC version of l1_cust.c
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
517
diff
changeset
|
2 * This FreeCalypso version of l1_cust.c is based on the LoCosto version; |
b92febec14aa
started FC version of l1_cust.c
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
517
diff
changeset
|
3 * see ../cust1/l1_cust.c for the original. |
b92febec14aa
started FC version of l1_cust.c
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
517
diff
changeset
|
4 */ |
517
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
5 |
523
b92febec14aa
started FC version of l1_cust.c
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
517
diff
changeset
|
6 #include <string.h> |
528
1affe428bf72
getting closer to compiling l1_cust.c
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
523
diff
changeset
|
7 #include "config.h" |
1affe428bf72
getting closer to compiling l1_cust.c
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
523
diff
changeset
|
8 #include "sys_types.h" |
517
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
9 |
528
1affe428bf72
getting closer to compiling l1_cust.c
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
523
diff
changeset
|
10 #include "../../riviera/rv/general.h" |
523
b92febec14aa
started FC version of l1_cust.c
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
517
diff
changeset
|
11 #include "../../nucleus/nucleus.h" |
b92febec14aa
started FC version of l1_cust.c
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
517
diff
changeset
|
12 #include "../../nucleus/tm_defs.h" |
528
1affe428bf72
getting closer to compiling l1_cust.c
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
523
diff
changeset
|
13 #include "../../gpf/inc/cust_os.h" |
1affe428bf72
getting closer to compiling l1_cust.c
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
523
diff
changeset
|
14 |
1affe428bf72
getting closer to compiling l1_cust.c
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
523
diff
changeset
|
15 #include "l1_confg.h" |
1affe428bf72
getting closer to compiling l1_cust.c
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
523
diff
changeset
|
16 #include "l1_const.h" |
1affe428bf72
getting closer to compiling l1_cust.c
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
523
diff
changeset
|
17 #include "../../bsp/ulpd.h" |
1affe428bf72
getting closer to compiling l1_cust.c
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
523
diff
changeset
|
18 #include "l1_types.h" |
1affe428bf72
getting closer to compiling l1_cust.c
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
523
diff
changeset
|
19 #include "l1_time.h" |
1affe428bf72
getting closer to compiling l1_cust.c
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
523
diff
changeset
|
20 #include "l1_trace.h" |
1affe428bf72
getting closer to compiling l1_cust.c
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
523
diff
changeset
|
21 #include "l1_macro.h" |
523
b92febec14aa
started FC version of l1_cust.c
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
517
diff
changeset
|
22 #include "../../serial/serialswitch.h" |
b92febec14aa
started FC version of l1_cust.c
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
517
diff
changeset
|
23 #include "../../bsp/abb+spi/abb.h" |
517
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
24 |
647
a60b375014e3
gsm-fw/L1/cust0/l1_cust.c: s/CONFIG_GSM/CONFIG_INCLUDE_SIM/
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
626
diff
changeset
|
25 #if CONFIG_INCLUDE_SIM |
528
1affe428bf72
getting closer to compiling l1_cust.c
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
523
diff
changeset
|
26 #include "../../bsp/sim.h" |
517
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
27 #endif |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
28 |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
29 #if TESTMODE |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
30 #include "l1tm_defty.h" |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
31 #endif |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
32 |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
33 #if (AUDIO_TASK == 1) |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
34 #include "l1audio_const.h" |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
35 #include "l1audio_cust.h" |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
36 #include "l1audio_defty.h" |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
37 #endif |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
38 |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
39 #if (L1_GTT == 1) |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
40 #include "l1gtt_const.h" |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
41 #include "l1gtt_defty.h" |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
42 #endif |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
43 |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
44 #if (L1_MP3 == 1) |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
45 #include "l1mp3_defty.h" |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
46 #endif |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
47 |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
48 #if (L1_MIDI == 1) |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
49 #include "l1midi_defty.h" |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
50 #endif |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
51 |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
52 #include "l1_defty.h" |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
53 #include "l1_msgty.h" |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
54 #include "l1_tabs.h" |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
55 #include "l1_varex.h" |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
56 #include "l1_proto.h" |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
57 #if (VCXO_ALGO == 1) |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
58 #include "l1_ctl.h" |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
59 #endif |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
60 |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
61 |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
62 #if (RF_FAM == 61) |
528
1affe428bf72
getting closer to compiling l1_cust.c
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
523
diff
changeset
|
63 #include "drp_drive.h" |
517
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
64 #include "tpudrv61.h" |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
65 #include "l1_rf61.h" |
528
1affe428bf72
getting closer to compiling l1_cust.c
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
523
diff
changeset
|
66 //#include "l1_rf61.c" |
517
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
67 #endif |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
68 |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
69 |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
70 #if (RF_FAM == 60 ) |
528
1affe428bf72
getting closer to compiling l1_cust.c
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
523
diff
changeset
|
71 #include "drp_drive.h" |
517
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
72 #include "tpudrv60.h" |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
73 #include "l1_rf60.h" |
528
1affe428bf72
getting closer to compiling l1_cust.c
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
523
diff
changeset
|
74 //#include "l1_rf60.c" |
517
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
75 //#include "rf60.h" |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
76 #endif |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
77 |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
78 #if (RF_FAM == 43) |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
79 #include "tpudrv43.h" |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
80 #include "l1_rf43.h" |
528
1affe428bf72
getting closer to compiling l1_cust.c
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
523
diff
changeset
|
81 //#include "l1_rf43.c" |
517
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
82 #endif |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
83 |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
84 #if (RF_FAM == 35) |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
85 #include "tpudrv35.h" |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
86 #include "l1_rf35.h" |
528
1affe428bf72
getting closer to compiling l1_cust.c
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
523
diff
changeset
|
87 //#include "l1_rf35.c" |
517
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
88 #endif |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
89 |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
90 #if (RF_FAM == 12) |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
91 #include "tpudrv12.h" |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
92 #include "l1_rf12.h" |
528
1affe428bf72
getting closer to compiling l1_cust.c
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
523
diff
changeset
|
93 //#include "l1_rf12.c" |
517
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
94 #endif |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
95 |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
96 #if (RF_FAM == 10) |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
97 #include "tpudrv10.h" |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
98 #include "l1_rf10.h" |
528
1affe428bf72
getting closer to compiling l1_cust.c
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
523
diff
changeset
|
99 //#include "l1_rf10.c" |
517
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
100 #endif |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
101 |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
102 #if (RF_FAM == 8) |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
103 #include "tpudrv8.h" |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
104 #include "l1_rf8.h" |
528
1affe428bf72
getting closer to compiling l1_cust.c
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
523
diff
changeset
|
105 //#include "l1_rf8.c" |
517
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
106 #endif |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
107 |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
108 #if (RF_FAM == 2) |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
109 #include "l1_rf2.h" |
528
1affe428bf72
getting closer to compiling l1_cust.c
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
523
diff
changeset
|
110 //#include "l1_rf2.c" |
517
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
111 #endif |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
112 |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
113 #if (DRP_FW_EXT == 1) |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
114 #include "l1_drp_inc.h" |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
115 #include "l1_ver.h" |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
116 #endif |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
117 |
528
1affe428bf72
getting closer to compiling l1_cust.c
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
523
diff
changeset
|
118 /* |
1affe428bf72
getting closer to compiling l1_cust.c
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
523
diff
changeset
|
119 * FreeCalypso change: l1_rf12.c is now a separate compilation unit, |
1affe428bf72
getting closer to compiling l1_cust.c
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
523
diff
changeset
|
120 * so we need to extern the data objects defined therein. |
1affe428bf72
getting closer to compiling l1_cust.c
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
523
diff
changeset
|
121 */ |
1affe428bf72
getting closer to compiling l1_cust.c
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
523
diff
changeset
|
122 extern T_RF rf; |
1affe428bf72
getting closer to compiling l1_cust.c
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
523
diff
changeset
|
123 extern T_RF_BAND rf_band[GSM_BANDS]; |
1affe428bf72
getting closer to compiling l1_cust.c
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
523
diff
changeset
|
124 extern const T_RF_BAND rf_850, rf_900, rf_1800, rf_1900; |
1affe428bf72
getting closer to compiling l1_cust.c
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
523
diff
changeset
|
125 extern UWORD16 abb[ABB_TABLE_SIZE]; |
1affe428bf72
getting closer to compiling l1_cust.c
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
523
diff
changeset
|
126 extern UWORD16 AGC_TABLE[AGC_TABLE_SIZE]; |
1affe428bf72
getting closer to compiling l1_cust.c
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
523
diff
changeset
|
127 extern T_ADC adc; |
1affe428bf72
getting closer to compiling l1_cust.c
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
523
diff
changeset
|
128 extern T_ADCCAL adc_cal; |
1affe428bf72
getting closer to compiling l1_cust.c
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
523
diff
changeset
|
129 extern T_TEMP temperature[TEMP_TABLE_SIZE]; |
517
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
130 |
541
9c91a1f670bd
gsm-fw/L1/cust0 compiles!
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
528
diff
changeset
|
131 /* FreeCalypso configuration */ |
9c91a1f670bd
gsm-fw/L1/cust0 compiles!
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
528
diff
changeset
|
132 #define STD DUALEXT |
9c91a1f670bd
gsm-fw/L1/cust0 compiles!
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
528
diff
changeset
|
133 |
517
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
134 // Nucleus functions |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
135 extern INT TMD_Timer_State; |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
136 extern UWORD32 TMD_Timer; // for big sleep |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
137 extern UWORD32 TCD_Priority_Groups; |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
138 extern VOID *TCD_Current_Thread; |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
139 extern TC_HCB *TCD_Active_HISR_Heads[TC_HISR_PRIORITIES]; |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
140 extern TC_HCB *TCD_Active_HISR_Tails[TC_HISR_PRIORITIES]; |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
141 extern TC_PROTECT TCD_System_Protect; |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
142 |
528
1affe428bf72
getting closer to compiling l1_cust.c
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
523
diff
changeset
|
143 #define FFS_WORKAROUND 0 |
1affe428bf72
getting closer to compiling l1_cust.c
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
523
diff
changeset
|
144 |
1affe428bf72
getting closer to compiling l1_cust.c
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
523
diff
changeset
|
145 #if 1 // (FFS_WORKAROUND == 1) |
1affe428bf72
getting closer to compiling l1_cust.c
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
523
diff
changeset
|
146 #include "../../services/ffs/ffs.h" |
517
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
147 #else |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
148 /* typedef signed int int32; |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
149 typedef signed char effs_t;*/ |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
150 typedef signed int filesize_t; |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
151 effs_t ffs_fwrite(const char *name, void *addr, filesize_t size); |
528
1affe428bf72
getting closer to compiling l1_cust.c
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
523
diff
changeset
|
152 #if (DRP_FW_EXT == 0) |
517
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
153 effs_t ffs_fread(const char *name, void *addr, filesize_t size); |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
154 #endif |
528
1affe428bf72
getting closer to compiling l1_cust.c
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
523
diff
changeset
|
155 #endif |
517
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
156 |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
157 // Import band configuration from Flash module (need to replace by an access function) |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
158 //extern UWORD8 std; |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
159 extern T_L1_CONFIG l1_config; |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
160 extern T_L1S_GLOBAL l1s; |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
161 |
528
1affe428bf72
getting closer to compiling l1_cust.c
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
523
diff
changeset
|
162 #if 0 //(OP_L1_STANDALONE == 0) |
517
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
163 extern SYS_BOOL cama_sleep_status(void); |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
164 #endif |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
165 |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
166 #if (CODE_VERSION != SIMULATION) |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
167 // Import serial switch configuration |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
168 #if (CHIPSET == 12) |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
169 extern char ser_cfg_info[3]; |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
170 #else |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
171 extern char ser_cfg_info[2]; |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
172 #endif |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
173 #endif |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
174 |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
175 #if(REL99 && FF_PRF) |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
176 T_TX_LEVEL *Cust_get_uplink_apc_power_reduction(UWORD8 band, |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
177 UWORD8 number_uplink_timeslot, |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
178 T_TX_LEVEL *p_tx_level); |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
179 #endif |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
180 |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
181 |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
182 void get_cal_from_nvmem (UWORD8 *ptr, UWORD16 len, UWORD8 id); |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
183 UWORD8 save_cal_in_nvmem (UWORD8 *ptr, UWORD16 len, UWORD8 id); |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
184 void config_rf_rw_band(char type, UWORD8 read); |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
185 void config_rf_read(char type); |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
186 void config_rf_write(char type); |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
187 |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
188 #if (RF_FAM == 61) |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
189 #include "drp_api.h" |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
190 |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
191 extern T_DRP_SW_DATA drp_sw_data_init; |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
192 extern T_DRP_SW_DATA drp_sw_data_calib; |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
193 extern T_DRP_SW_DATA drp_sw_data_calib_saved; |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
194 #endif |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
195 |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
196 enum { |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
197 RF_ID = 0, |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
198 ADC_ID = 1 |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
199 }; |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
200 |
542
9dd6ca16f13d
gsm-fw/L1/cust0: split between IRAM and XIP code
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
541
diff
changeset
|
201 #if (L1_FF_MULTIBAND == 0) && !defined(RUN_INT_RAM) |
517
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
202 /*-------------------------------------------------------*/ |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
203 /* Parameters: none */ |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
204 /* Return: none */ |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
205 /* Functionality: Defines the location of rf-struct */ |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
206 /* for each std. */ |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
207 /*-------------------------------------------------------*/ |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
208 //omaps00090550 #83 warinng removal |
542
9dd6ca16f13d
gsm-fw/L1/cust0: split between IRAM and XIP code
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
541
diff
changeset
|
209 const T_BAND_CONFIG band_config[] = |
517
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
210 { /*ffs name, default addr, max carrier, min tx pwr */ |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
211 {"",(T_RF_BAND *) 0,0,0},//undefined |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
212 {"900", (T_RF_BAND *)&rf_900, 174, 19 },//EGSM |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
213 {"1800",(T_RF_BAND *)&rf_1800, 374, 15 },//DCS |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
214 {"1900",(T_RF_BAND *)&rf_1900, 299, 15 },//PCS |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
215 {"850", (T_RF_BAND *)&rf_850, 124, 19 },//GSM850 |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
216 #if (RF_FAM == 10) |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
217 {"1900_us",(T_RF_BAND *)&rf_1900, 299, 15 },//usdual 1900 rf tables are the same as 3band 1900 rf tables at the moment |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
218 #endif |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
219 {"900", (T_RF_BAND *)&rf_900, 124, 19 } //GSM, this should be last entry |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
220 }; |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
221 |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
222 /*-------------------------------------------------------*/ |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
223 /* Parameters: none */ |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
224 /* Return: none */ |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
225 /* Functionality: Defines the indices into band_config */ |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
226 /* for each std. */ |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
227 /*-------------------------------------------------------*/ |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
228 const T_STD_CONFIG std_config[] = |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
229 { |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
230 /* band1 index, band2 index, txpwr turning point, first arfcn*/ |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
231 { 0, 0, 0, 0 }, // std = 0 not used |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
232 { BAND_GSM900, BAND_NONE, 0, 1 }, // std = 1 GSM |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
233 { BAND_EGSM900, BAND_NONE, 0, 1 }, // std = 2 EGSM |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
234 { BAND_PCS1900, BAND_NONE, 21, 512 }, // std = 3 PCS |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
235 { BAND_DCS1800, BAND_NONE, 28, 512 }, // std = 4 DCS |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
236 { BAND_GSM900, BAND_DCS1800, 28, 1 }, // std = 5 DUAL |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
237 { BAND_EGSM900, BAND_DCS1800, 28, 1 }, // std = 6 DUALEXT |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
238 { BAND_GSM850, BAND_NONE, 0, 128 }, // std = 7 850 |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
239 #if (RF_FAM == 10) |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
240 { BAND_GSM850, BAND_PCS1900_US, 21, 1 } // std = 8 850/1900 |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
241 #else |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
242 { BAND_GSM850, BAND_PCS1900, 21, 1 } // std = 8 850/1900 |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
243 #endif |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
244 }; |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
245 #endif //if (L1_FF_MULTIBAND == 0) |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
246 |
542
9dd6ca16f13d
gsm-fw/L1/cust0: split between IRAM and XIP code
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
541
diff
changeset
|
247 #if (L1_FF_MULTIBAND == 0) && defined(RUN_INT_RAM) |
9dd6ca16f13d
gsm-fw/L1/cust0: split between IRAM and XIP code
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
541
diff
changeset
|
248 extern const T_BAND_CONFIG band_config[]; |
9dd6ca16f13d
gsm-fw/L1/cust0: split between IRAM and XIP code
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
541
diff
changeset
|
249 extern const T_STD_CONFIG std_config[]; |
9dd6ca16f13d
gsm-fw/L1/cust0: split between IRAM and XIP code
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
541
diff
changeset
|
250 #endif |
9dd6ca16f13d
gsm-fw/L1/cust0: split between IRAM and XIP code
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
541
diff
changeset
|
251 |
517
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
252 /*-------------------------------------------------------*/ |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
253 /* Prototypes of external functions used in this file. */ |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
254 /*-------------------------------------------------------*/ |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
255 void l1_initialize(T_MMI_L1_CONFIG *mmi_l1_config); |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
256 #if (L1_FF_MULTIBAND == 0) |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
257 WORD16 Convert_l1_radio_freq (UWORD16 radio_freq); |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
258 #endif |
542
9dd6ca16f13d
gsm-fw/L1/cust0: split between IRAM and XIP code
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
541
diff
changeset
|
259 |
9dd6ca16f13d
gsm-fw/L1/cust0: split between IRAM and XIP code
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
541
diff
changeset
|
260 #ifndef RUN_FLASH |
517
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
261 /*-------------------------------------------------------*/ |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
262 /* Cust_recover_Os() */ |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
263 /*-------------------------------------------------------*/ |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
264 /* */ |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
265 /* Description: adjust OS from sleep duration */ |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
266 /* ------------ */ |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
267 /* This function fix the : */ |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
268 /* - system clock */ |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
269 /* - Nucleus timers */ |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
270 /* - xxxxxx (customer dependant) */ |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
271 /*-------------------------------------------------------*/ |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
272 |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
273 UWORD8 Cust_recover_Os(void) |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
274 { |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
275 #if (CODE_VERSION != SIMULATION) |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
276 if (l1_config.pwr_mngt == PWR_MNGT) |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
277 { |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
278 UWORD32 current_system_clock; |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
279 |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
280 /***************************************************/ |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
281 // Fix System clock and Nucleus Timers if any.... */ |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
282 /***************************************************/ |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
283 // Fix System clock .... |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
284 current_system_clock = NU_Retrieve_Clock(); |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
285 current_system_clock += l1s.pw_mgr.sleep_duration; |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
286 NU_Set_Clock(current_system_clock); |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
287 |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
288 // Fix Nucleus timer (if needed) .... |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
289 if (TMD_Timer_State == TM_ACTIVE) |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
290 { |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
291 TMD_Timer -= l1s.pw_mgr.sleep_duration; |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
292 if (!TMD_Timer) TMD_Timer_State = TM_EXPIRED; |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
293 } |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
294 |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
295 /***************************************************/ |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
296 // Cust dependant part ... */ |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
297 /***************************************************/ |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
298 //............. |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
299 //............. |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
300 //.............. |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
301 return(TRUE); |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
302 |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
303 } |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
304 #endif |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
305 return(TRUE); //omaps00090550 |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
306 } |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
307 |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
308 |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
309 |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
310 /*-------------------------------------------------------*/ |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
311 /* Cust_check_system() */ |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
312 /*-------------------------------------------------------*/ |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
313 /* */ |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
314 /* Description: */ |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
315 /* ------------ */ |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
316 /* GSM 1.5 : */ |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
317 /* - authorize UWIRE clock to be stopped */ |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
318 /* and write value in l1s.pw_mgr.modules_status. */ |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
319 /* - authorize ARMIO clock to be stopped if the light is */ |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
320 /* off and write value in l1s.pw_mgr.modules_status. */ |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
321 /* - check if SIM clock have been stopped */ |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
322 /* before allowing DEEP SLEEP. */ |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
323 /* - check if UARTs are ready to enter deep sleep */ |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
324 /* - choose the sleep mode */ |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
325 /* */ |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
326 /* Return: */ |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
327 /* ------- */ |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
328 /* DO_NOT_SLEEP, FRAME_STOP or CLOCK_STOP */ |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
329 /*-------------------------------------------------------*/ |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
330 UWORD8 Cust_check_system(void) |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
331 { |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
332 |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
333 #if (CODE_VERSION != SIMULATION) |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
334 if (l1_config.pwr_mngt == PWR_MNGT) |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
335 { |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
336 |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
337 #if (L2_L3_SIMUL == 0) |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
338 // Forbid deep sleep if the light is on |
528
1affe428bf72
getting closer to compiling l1_cust.c
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
523
diff
changeset
|
339 /* FreeCalypso change: this LT_Status() function is defunct */ |
1affe428bf72
getting closer to compiling l1_cust.c
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
523
diff
changeset
|
340 #if 0 |
517
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
341 if(LT_Status()) |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
342 { |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
343 //cut ARMIO and UWIRE clocks in big sleep |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
344 l1s.pw_mgr.modules_status = ARMIO_CLK_CUT | UWIRE_CLK_CUT ; |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
345 l1s.pw_mgr.why_big_sleep = BIG_SLEEP_DUE_TO_LIGHT_ON; |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
346 return(FRAME_STOP); // BIG sleep |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
347 } |
528
1affe428bf72
getting closer to compiling l1_cust.c
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
523
diff
changeset
|
348 #endif |
517
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
349 |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
350 #if (OP_L1_STANDALONE == 0) |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
351 // Forbid deep sleep if the camera is working |
528
1affe428bf72
getting closer to compiling l1_cust.c
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
523
diff
changeset
|
352 /* FreeCalypso change: no camera */ |
1affe428bf72
getting closer to compiling l1_cust.c
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
523
diff
changeset
|
353 #if 0 |
517
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
354 if(!cama_sleep_status()) |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
355 { |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
356 l1s.pw_mgr.why_big_sleep = BIG_SLEEP_DUE_TO_CAMERA; |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
357 return(FRAME_STOP); // BIG sleep |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
358 } |
528
1affe428bf72
getting closer to compiling l1_cust.c
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
523
diff
changeset
|
359 #endif |
517
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
360 |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
361 // Forbid deep sleep if the SIM and UARTs not ready |
528
1affe428bf72
getting closer to compiling l1_cust.c
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
523
diff
changeset
|
362 // FC note: this call to SIM_SleepStatus() *is* present in the Leonardo object |
647
a60b375014e3
gsm-fw/L1/cust0/l1_cust.c: s/CONFIG_GSM/CONFIG_INCLUDE_SIM/
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
626
diff
changeset
|
363 #if CONFIG_INCLUDE_SIM //(REQUIRED_FOR_ESAMPLE_LOCOSTO) |
517
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
364 // Forbid deep sleep if the SIM and UARTs not ready |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
365 if(SIM_SleepStatus()) |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
366 #endif |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
367 { |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
368 #endif |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
369 #endif |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
370 if(SER_UartSleepStatus()) |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
371 { |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
372 return(CLOCK_STOP); // DEEP sleep |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
373 } |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
374 else l1s.pw_mgr.why_big_sleep = BIG_SLEEP_DUE_TO_UART; |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
375 #if (L2_L3_SIMUL == 0) |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
376 #if (OP_L1_STANDALONE == 0) |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
377 } |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
378 // Forbid deep sleep if the SIM and UARTs not ready |
647
a60b375014e3
gsm-fw/L1/cust0/l1_cust.c: s/CONFIG_GSM/CONFIG_INCLUDE_SIM/
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
626
diff
changeset
|
379 #if CONFIG_INCLUDE_SIM //(REQUIRED_FOR_ESAMPLE_LOCOSTO) |
517
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
380 else l1s.pw_mgr.why_big_sleep = BIG_SLEEP_DUE_TO_SIM; |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
381 #endif |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
382 #endif |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
383 #endif |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
384 // cut ARMIO and UWIRE clocks in big sleep |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
385 l1s.pw_mgr.modules_status = ARMIO_CLK_CUT | UWIRE_CLK_CUT ; |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
386 return(FRAME_STOP); // BIG sleep |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
387 } |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
388 #else // Simulation part |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
389 return(CLOCK_STOP); // DEEP sleep |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
390 #endif |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
391 return(CLOCK_STOP); // omaps00090550 |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
392 } |
542
9dd6ca16f13d
gsm-fw/L1/cust0: split between IRAM and XIP code
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
541
diff
changeset
|
393 #endif /* !RUN_FLASH */ |
517
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
394 |
542
9dd6ca16f13d
gsm-fw/L1/cust0: split between IRAM and XIP code
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
541
diff
changeset
|
395 #ifndef RUN_INT_RAM |
517
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
396 /*-------------------------------------------------------*/ |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
397 /* Parameters: none */ |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
398 /* Return: none */ |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
399 /* Functionality: Read the RF configuration, tables etc. */ |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
400 /* from FFS files. */ |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
401 /*-------------------------------------------------------*/ |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
402 //omaps00090550 #83-d warnimg removal |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
403 static const T_CONFIG_FILE config_files_common[] = |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
404 { |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
405 #if (CODE_VERSION != SIMULATION) |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
406 |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
407 // The first char is NOT part of the filename. It is used for |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
408 // categorizing the ffs file contents: |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
409 // f=rf-cal, F=rf-config, |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
410 // t=tx-cal, T=tx-config, |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
411 // r=rx-cal, R=rx-config, |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
412 // s=sys-cal, S=sys-config, |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
413 "f/gsm/rf/afcdac", &rf.afc.eeprom_afc, sizeof(rf.afc.eeprom_afc), |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
414 "F/gsm/rf/stdmap", &rf.radio_band_support, sizeof(rf.radio_band_support), |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
415 #if (VCXO_ALGO == 1) |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
416 "F/gsm/rf/afcparams", &rf.afc.psi_sta_inv, 4 * sizeof(UWORD32) + 4 * sizeof(WORD16), |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
417 #else |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
418 "F/gsm/rf/afcparams", &rf.afc.psi_sta_inv, 4 * sizeof(UWORD32), |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
419 #endif |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
420 |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
421 "R/gsm/rf/rx/agcglobals", &rf.rx.agc, 4 * sizeof(UWORD16), |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
422 "R/gsm/rf/rx/il2agc", &rf.rx.agc.il2agc_pwr[0], 3 * sizeof(rf.rx.agc.il2agc_pwr), |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
423 "R/gsm/rf/rx/agcwords", &AGC_TABLE, sizeof(AGC_TABLE), |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
424 |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
425 "s/sys/adccal", &adc_cal, sizeof(adc_cal), |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
426 |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
427 "S/sys/abb", &abb, sizeof(abb), |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
428 "S/sys/uartswitch", &ser_cfg_info, sizeof(ser_cfg_info), |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
429 |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
430 #if (RF_FAM ==61) |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
431 "S/sys/drp_wrapper", & drp_wrapper, sizeof(drp_wrapper), |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
432 #if (DRP_FW_EXT == 0) |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
433 "S/sys/drp_calibration", & drp_sw_data_calib, sizeof(drp_sw_data_calib), |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
434 #endif |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
435 #endif |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
436 |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
437 #endif |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
438 NULL, 0, 0 // terminator |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
439 }; |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
440 |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
441 /*-------------------------------------------------------*/ |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
442 /* Parameters: none */ |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
443 /* Return: none */ |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
444 /* Functionality: Read the RF configurations for */ |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
445 /* each band from FFS files. These files */ |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
446 /* are defined for one band, and and used */ |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
447 /* for all bands. */ |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
448 /*-------------------------------------------------------*/ |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
449 //omaps00090550 #83 warning removal |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
450 static const T_CONFIG_FILE config_files_band[] = |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
451 { |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
452 // The first char is NOT part of the filename. It is used for |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
453 // categorizing the ffs file contents: |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
454 // f=rf-cal, F=rf-config, |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
455 // t=tx-cal, T=tx-config, |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
456 // r=rx-cal, R=rx-config, |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
457 // s=sys-cal, S=sys-config, |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
458 |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
459 // generic for all bands |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
460 // band[0] is used as template for all bands. |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
461 "t/gsm/rf/tx/ramps", &rf_band[0].tx.ramp_tables, sizeof(rf_band[0].tx.ramp_tables), |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
462 "t/gsm/rf/tx/levels", &rf_band[0].tx.levels, sizeof(rf_band[0].tx.levels), |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
463 "t/gsm/rf/tx/calchan", &rf_band[0].tx.chan_cal_table, sizeof(rf_band[0].tx.chan_cal_table), |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
464 "T/gsm/rf/tx/caltemp", &rf_band[0].tx.temp, sizeof(rf_band[0].tx.temp), |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
465 |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
466 "r/gsm/rf/rx/calchan", &rf_band[0].rx.agc_bands, sizeof(rf_band[0].rx.agc_bands), |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
467 "R/gsm/rf/rx/caltemp", &rf_band[0].rx.temp, sizeof(rf_band[0].rx.temp), |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
468 "r/gsm/rf/rx/agcparams", &rf_band[0].rx.rx_cal_params, sizeof(rf_band[0].rx.rx_cal_params), |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
469 NULL, 0, 0 // terminator |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
470 }; |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
471 |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
472 void config_ffs_read(char type) |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
473 { |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
474 config_rf_read(type); |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
475 config_rf_rw_band(type, 1); |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
476 } |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
477 |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
478 void config_ffs_write(char type) |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
479 { |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
480 config_rf_write(type); |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
481 config_rf_rw_band(type, 0); |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
482 } |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
483 |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
484 void config_rf_read(char type) |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
485 { |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
486 const T_CONFIG_FILE *file = config_files_common; |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
487 |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
488 while (file->name != NULL) |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
489 { |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
490 if (type == '*' || type == file->name[0]) { |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
491 ffs_fread(&file->name[1], file->addr, file->size); |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
492 } |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
493 file++; |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
494 } |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
495 } |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
496 |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
497 void config_rf_write(char type) |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
498 { |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
499 const T_CONFIG_FILE *file = config_files_common; |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
500 |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
501 while (file->name != NULL) |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
502 { |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
503 if (type == '*' || type == file->name[0]) { |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
504 ffs_fwrite(&file->name[1], file->addr, file->size); |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
505 } |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
506 file++; |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
507 } |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
508 } |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
509 |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
510 void config_rf_rw_band(char type, UWORD8 read) |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
511 { |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
512 const T_CONFIG_FILE *f1 = config_files_band; |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
513 UWORD8 i; |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
514 WORD32 offset; |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
515 char name[64]; |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
516 char *p; |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
517 #if (L1_FF_MULTIBAND == 0) |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
518 UWORD8 std = l1_config.std.id; |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
519 #endif |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
520 |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
521 #if FFS_WORKAROUND == 1 |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
522 struct stat_s stat; |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
523 UWORD16 time; |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
524 #endif |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
525 #if (L1_FF_MULTIBAND == 0) |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
526 for (i=0; i< GSM_BANDS; i++) |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
527 { |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
528 if(std_config[std].band[i] !=0 ) |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
529 { |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
530 #else |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
531 for (i = 0; i < RF_NB_SUPPORTED_BANDS; i++) |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
532 { |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
533 #endif /*if (L1_FF_MULTIBAND == 0) */ |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
534 f1 = &config_files_band[0]; |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
535 while (f1->name != NULL) |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
536 { |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
537 offset = (WORD32) f1->addr - (WORD32) &rf_band[0]; //offset in bytes |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
538 p = ((char *) &rf_band[i]) + offset; |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
539 if (type == '*' || type == f1->name[0]) |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
540 { |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
541 strcpy(name, &f1->name[1]); |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
542 strcat(name, "."); |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
543 #if (L1_FF_MULTIBAND == 0) |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
544 strcat(name, band_config[std_config[std].band[i]].name); |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
545 #else |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
546 strcat(name, multiband_rf[i].name); |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
547 #endif /*if (L1_FF_MULTIBAND == 0)*/ |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
548 |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
549 if (read == 1) |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
550 ffs_fread(name, p, f1->size); |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
551 else //write == 0 |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
552 { |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
553 ffs_fwrite(name, p, f1->size); |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
554 |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
555 // wait until ffs write has finished |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
556 #if FFS_WORKAROUND == 1 |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
557 stat.inode = 0; |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
558 time = 0; |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
559 |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
560 do { |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
561 rvf_delay(10); // in milliseconds |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
562 time += 10; |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
563 ffs_stat(name, &stat); |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
564 } while (stat.inode == 0 && time < 500); |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
565 #endif |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
566 } |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
567 } |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
568 f1++; |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
569 } |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
570 } |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
571 #if (L1_FF_MULTIBAND == 0) |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
572 } |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
573 #endif |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
574 } |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
575 |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
576 |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
577 /*-------------------------------------------------------*/ |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
578 /* Cust_init_std() */ |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
579 /*-------------------------------------------------------*/ |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
580 /* Parameters : */ |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
581 /* Return : */ |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
582 /* Functionality : Init Standard variable configuration */ |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
583 /*-------------------------------------------------------*/ |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
584 void Cust_init_std(void) |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
585 #if (L1_FF_MULTIBAND == 0) |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
586 { |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
587 UWORD8 std = l1_config.std.id; |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
588 UWORD8 band1, band2; |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
589 T_RF_BAND *pt1, *pt2; |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
590 |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
591 band1 = std_config[std].band[0]; |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
592 band2 = std_config[std].band[1]; |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
593 |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
594 //get these from std |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
595 pt1 = band_config[band1].addr; |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
596 pt2 = band_config[band2].addr; |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
597 |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
598 // copy rf-struct from default flash to ram |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
599 memcpy(&rf_band[0], pt1, sizeof(T_RF_BAND)); |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
600 |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
601 if(std_config[std].band[1] != BAND_NONE ) |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
602 memcpy(&rf_band[1], pt2, sizeof(T_RF_BAND)); |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
603 |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
604 // Read all RF and system configuration from FFS *before* we copy any of |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
605 // the rf structure variables to other places, like L1. |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
606 |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
607 config_ffs_read('*'); |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
608 |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
609 l1_config.std.first_radio_freq = std_config[std].first_arfcn; |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
610 |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
611 if(band2!=0) |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
612 l1_config.std.first_radio_freq_band2 = band_config[band1].max_carrier + 1; |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
613 else |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
614 l1_config.std.first_radio_freq_band2 = 0; //band1 carrier + 1 else 0 |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
615 |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
616 // if band2 is not used it is initialised with zeros |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
617 l1_config.std.nbmax_carrier = band_config[band1].max_carrier; |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
618 if(band2!=0) |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
619 l1_config.std.nbmax_carrier += band_config[band2].max_carrier; |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
620 |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
621 l1_config.std.max_txpwr_band1 = band_config[band1].max_txpwr; |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
622 l1_config.std.max_txpwr_band2 = band_config[band2].max_txpwr; |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
623 l1_config.std.txpwr_turning_point = std_config[std].txpwr_tp; |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
624 l1_config.std.cal_freq1_band1 = 0; |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
625 l1_config.std.cal_freq1_band2 = 0; |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
626 |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
627 l1_config.std.g_magic_band1 = rf_band[MULTI_BAND1].rx.rx_cal_params.g_magic; |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
628 l1_config.std.lna_att_band1 = rf_band[MULTI_BAND1].rx.rx_cal_params.lna_att; |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
629 l1_config.std.lna_switch_thr_low_band1 = rf_band[MULTI_BAND1].rx.rx_cal_params.lna_switch_thr_low; |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
630 l1_config.std.lna_switch_thr_high_band1 = rf_band[MULTI_BAND1].rx.rx_cal_params.lna_switch_thr_high; |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
631 l1_config.std.swap_iq_band1 = rf_band[MULTI_BAND1].swap_iq; |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
632 |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
633 l1_config.std.g_magic_band2 = rf_band[MULTI_BAND2].rx.rx_cal_params.g_magic; |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
634 l1_config.std.lna_att_band2 = rf_band[MULTI_BAND2].rx.rx_cal_params.lna_att; |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
635 l1_config.std.lna_switch_thr_low_band2 = rf_band[MULTI_BAND2].rx.rx_cal_params.lna_switch_thr_low; |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
636 l1_config.std.lna_switch_thr_high_band2 = rf_band[MULTI_BAND2].rx.rx_cal_params.lna_switch_thr_high; |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
637 l1_config.std.swap_iq_band2 = rf_band[MULTI_BAND2].swap_iq; |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
638 |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
639 l1_config.std.radio_freq_index_offset = l1_config.std.first_radio_freq-1; |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
640 |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
641 // init variable indicating which radio bands are supported by the chosen RF |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
642 l1_config.std.radio_band_support = rf.radio_band_support; |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
643 |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
644 //TBD: DRP Calib: Currently the Calib Data are only used for the routines, TBD add to l1_config. from saved Calibration |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
645 // on a need basis ? |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
646 } |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
647 #else |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
648 { |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
649 UWORD8 i; |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
650 |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
651 for (i = 0; i < RF_NB_SUPPORTED_BANDS; i++) |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
652 { |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
653 switch(multiband_rf[i].gsm_band_identifier) |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
654 { |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
655 case RF_GSM900: |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
656 rf_band[i]=rf_900; |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
657 break; |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
658 case RF_GSM850: |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
659 rf_band[i]=rf_850; |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
660 break; |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
661 case RF_DCS1800: |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
662 rf_band[i]=rf_1800; |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
663 break; |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
664 case RF_PCS1900: |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
665 rf_band[i]=rf_1900; |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
666 break; |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
667 default: |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
668 break; |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
669 } |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
670 } |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
671 config_ffs_read('*'); |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
672 } |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
673 #endif // if (L1_FF_MULTIBAND == 0) |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
674 |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
675 |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
676 /*-------------------------------------------------------*/ |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
677 /* Cust_init_params() */ |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
678 /*-------------------------------------------------------*/ |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
679 /* Parameters : */ |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
680 /* Return : */ |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
681 /* Functionality : Init RF dependent paramters (AGC, TX) */ |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
682 /*-------------------------------------------------------*/ |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
683 void Cust_init_params(void) |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
684 { |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
685 |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
686 #if (CODE_VERSION==SIMULATION) |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
687 extern UWORD16 simu_RX_SYNTH_SETUP_TIME; // set in xxx.txt l3 scenario file |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
688 extern UWORD16 simu_TX_SYNTH_SETUP_TIME; // set in xxx.txt l3 scenario file |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
689 |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
690 l1_config.params.rx_synth_setup_time = simu_RX_SYNTH_SETUP_TIME; |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
691 l1_config.params.tx_synth_setup_time = simu_TX_SYNTH_SETUP_TIME; |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
692 #else |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
693 l1_config.params.rx_synth_setup_time = RX_SYNTH_SETUP_TIME; |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
694 l1_config.params.tx_synth_setup_time = TX_SYNTH_SETUP_TIME; |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
695 #endif |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
696 |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
697 |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
698 // Convert SYNTH_SETUP_TIME into SPLIT. |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
699 // We have kept a margin of 20qbit (EPSILON_MEAS) to cover offset change and Scenario closing time + margin. |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
700 l1_config.params.rx_synth_load_split = 1L + (l1_config.params.rx_synth_setup_time + EPSILON_MEAS) / (BP_DURATION/BP_SPLIT); |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
701 l1_config.params.tx_synth_load_split = 1L + (l1_config.params.tx_synth_setup_time + EPSILON_MEAS) / (BP_DURATION/BP_SPLIT); |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
702 |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
703 l1_config.params.rx_synth_start_time = TPU_CLOCK_RANGE + PROVISION_TIME - l1_config.params.rx_synth_setup_time; |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
704 l1_config.params.tx_synth_start_time = TPU_CLOCK_RANGE - l1_config.params.tx_synth_setup_time; |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
705 |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
706 l1_config.params.rx_change_synchro_time = l1_config.params.rx_synth_start_time - EPSILON_SYNC; |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
707 l1_config.params.rx_change_offset_time = l1_config.params.rx_synth_start_time - EPSILON_OFFS; |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
708 |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
709 l1_config.params.tx_change_offset_time = TIME_OFFSET_TX - |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
710 TA_MAX - |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
711 l1_config.params.tx_synth_setup_time - |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
712 EPSILON_OFFS; |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
713 |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
714 // TX duration = ramp up time + burst duration (data + tail bits) |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
715 l1_config.params.tx_nb_duration = UL_ABB_DELAY + rf.tx.guard_bits*4 + NB_BURST_DURATION_UL; |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
716 l1_config.params.tx_ra_duration = UL_ABB_DELAY + rf.tx.guard_bits*4 + RA_BURST_DURATION; |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
717 |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
718 l1_config.params.tx_nb_load_split = 1L + (l1_config.params.tx_nb_duration - rf.tx.prg_tx - NB_MARGIN) / (BP_DURATION/BP_SPLIT); |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
719 l1_config.params.tx_ra_load_split = 1L + (l1_config.params.tx_ra_duration - rf.tx.prg_tx - NB_MARGIN) / (BP_DURATION/BP_SPLIT); |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
720 |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
721 // time for the end of RX and TX TPU scenarios |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
722 l1_config.params.rx_tpu_scenario_ending = RX_TPU_SCENARIO_ENDING; |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
723 l1_config.params.tx_tpu_scenario_ending = TX_TPU_SCENARIO_ENDING; |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
724 |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
725 // FB26 anchoring time is computed backward to leave only 6 qbit margin between |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
726 // FB26 window and next activity (RX time tracking). |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
727 // This margin is used as follow: |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
728 // Serving offset restore: 1 qbit (SERV_OFFS_REST_LOAD) |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
729 // Tpu Sleep: 2 qbit (TPU_SLEEP_LOAD) |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
730 // --------- |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
731 // Total: 3 qbit |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
732 |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
733 l1_config.params.fb26_anchoring_time = (l1_config.params.rx_synth_start_time - |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
734 #if (CODE_VERSION == SIMULATION) |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
735 // simulator: end of scenario not included in window (no serialization) |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
736 1 - |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
737 #else |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
738 // RF dependent end of RX TPU scenario |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
739 l1_config.params.rx_tpu_scenario_ending - |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
740 #endif |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
741 EPSILON_SYNC - |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
742 TPU_SLEEP_LOAD - |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
743 SERV_OFFS_REST_LOAD - |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
744 FB26_ACQUIS_DURATION - |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
745 PROVISION_TIME + |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
746 TPU_CLOCK_RANGE) % TPU_CLOCK_RANGE; |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
747 |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
748 l1_config.params.fb26_change_offset_time = l1_config.params.fb26_anchoring_time + |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
749 PROVISION_TIME - |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
750 l1_config.params.rx_synth_setup_time - |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
751 EPSILON_OFFS; |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
752 |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
753 l1_config.params.guard_bits = rf.tx.guard_bits; |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
754 |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
755 l1_config.params.prg_tx_gsm = rf.tx.prg_tx; |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
756 l1_config.params.prg_tx_dcs = rf.tx.prg_tx; //delay for dual band not implemented yet |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
757 |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
758 l1_config.params.low_agc_noise_thr = rf.rx.agc.low_agc_noise_thr; |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
759 l1_config.params.high_agc_sat_thr = rf.rx.agc.high_agc_sat_thr; |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
760 l1_config.params.low_agc = rf.rx.agc.low_agc; |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
761 l1_config.params.high_agc = rf.rx.agc.high_agc; |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
762 l1_config.params.il_min = IL_MIN; |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
763 |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
764 l1_config.params.fixed_txpwr = FIXED_TXPWR; |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
765 l1_config.params.eeprom_afc = rf.afc.eeprom_afc; |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
766 l1_config.params.setup_afc_and_rf = SETUP_AFC_AND_RF; |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
767 l1_config.params.rf_wakeup_tpu_scenario_duration = l1_config.params.setup_afc_and_rf + 1; //directly dependent of l1dmacro_RF_wakeup implementation |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
768 |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
769 l1_config.params.psi_sta_inv = rf.afc.psi_sta_inv; |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
770 l1_config.params.psi_st = rf.afc.psi_st; |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
771 l1_config.params.psi_st_32 = rf.afc.psi_st_32; |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
772 l1_config.params.psi_st_inv = rf.afc.psi_st_inv; |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
773 |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
774 #if (CODE_VERSION == SIMULATION) |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
775 #if (VCXO_ALGO == 1) |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
776 l1_config.params.afc_algo = ALGO_AFC_LQG_PREDICTOR; // VCXO|VCTCXO - Choosing AFC algorithm |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
777 #endif |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
778 #else |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
779 #if (VCXO_ALGO == 1) |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
780 l1_config.params.afc_dac_center = rf.afc.dac_center; // VCXO - assuming DAC linearity |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
781 l1_config.params.afc_dac_min = rf.afc.dac_min; // VCXO - assuming DAC linearity |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
782 l1_config.params.afc_dac_max = rf.afc.dac_max; // VCXO - assuming DAC linearity |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
783 #if (NEW_SNR_THRESHOLD == 0) |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
784 l1_config.params.afc_snr_thr = rf.afc.snr_thr; // VCXO - SNR threshold |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
785 #else |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
786 l1_config.params.afc_snr_thr = L1_TOA_SNR_THRESHOLD; |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
787 #endif /* NEW_SNR_THRESHOLD */ |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
788 l1_config.params.afc_algo = ALGO_AFC_LQG_PREDICTOR; // VCXO|VCTCXO - Choosing AFC algorithm |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
789 l1_config.params.afc_win_avg_size_M = C_WIN_AVG_SIZE_M; // VCXO - Average psi values with this value |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
790 l1_config.params.rgap_algo = ALGO_AFC_RXGAP; // VCXO - Choosing Reception Gap algorithm |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
791 l1_config.params.rgap_bad_snr_count_B = C_RGAP_BAD_SNR_COUNT_B; // VCXO - Prediction SNR count |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
792 #endif |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
793 #endif |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
794 |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
795 #if DCO_ALGO |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
796 #if (RF_FAM == 10) |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
797 // Enable DCO algorithm for direct conversion RFs |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
798 l1_config.params.dco_enabled = TRUE; |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
799 #else |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
800 l1_config.params.dco_enabled = FALSE; |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
801 #endif |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
802 #endif |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
803 |
528
1affe428bf72
getting closer to compiling l1_cust.c
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
523
diff
changeset
|
804 #if (ANALOG == 1) |
517
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
805 l1_config.params.debug1 = C_DEBUG1; // Enable f_tx delay of 400000 cyc DEBUG |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
806 l1_config.params.afcctladd = abb[ABB_AFCCTLADD]; // Value at reset |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
807 l1_config.params.vbuctrl = abb[ABB_VBUCTRL]; // Uplink gain amp 0dB, Sidetone gain to mute |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
808 l1_config.params.vbdctrl = abb[ABB_VBDCTRL]; // Downlink gain amp 0dB, Volume control 0 dB |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
809 l1_config.params.bbctrl = abb[ABB_BBCTRL]; // value at reset |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
810 l1_config.params.apcoff = abb[ABB_APCOFF]; // value at reset |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
811 l1_config.params.bulioff = abb[ABB_BULIOFF]; // value at reset |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
812 l1_config.params.bulqoff = abb[ABB_BULQOFF]; // value at reset |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
813 l1_config.params.dai_onoff = abb[ABB_DAI_ON_OFF]; // value at reset |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
814 l1_config.params.auxdac = abb[ABB_AUXDAC]; // value at reset |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
815 l1_config.params.vbctrl = abb[ABB_VBCTRL]; // VULSWITCH=0, VDLAUX=1, VDLEAR=1 |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
816 l1_config.params.apcdel1 = abb[ABB_APCDEL1]; // value at reset |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
817 #endif |
528
1affe428bf72
getting closer to compiling l1_cust.c
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
523
diff
changeset
|
818 #if (ANALOG == 2) |
517
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
819 l1_config.params.debug1 = C_DEBUG1; // Enable f_tx delay of 400000 cyc DEBUG |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
820 l1_config.params.afcctladd = abb[ABB_AFCCTLADD]; // Value at reset |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
821 l1_config.params.vbuctrl = abb[ABB_VBUCTRL]; // Uplink gain amp 0dB, Sidetone gain to mute |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
822 l1_config.params.vbdctrl = abb[ABB_VBDCTRL]; // Downlink gain amp 0dB, Volume control 0 dB |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
823 l1_config.params.bbctrl = abb[ABB_BBCTRL]; // value at reset |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
824 l1_config.params.bulgcal = abb[ABB_BULGCAL]; // value at reset |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
825 l1_config.params.apcoff = abb[ABB_APCOFF]; // value at reset |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
826 l1_config.params.bulioff = abb[ABB_BULIOFF]; // value at reset |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
827 l1_config.params.bulqoff = abb[ABB_BULQOFF]; // value at reset |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
828 l1_config.params.dai_onoff = abb[ABB_DAI_ON_OFF]; // value at reset |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
829 l1_config.params.auxdac = abb[ABB_AUXDAC]; // value at reset |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
830 l1_config.params.vbctrl1 = abb[ABB_VBCTRL1]; // VULSWITCH=0, VDLAUX=1, VDLEAR=1 |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
831 l1_config.params.vbctrl2 = abb[ABB_VBCTRL2]; // MICBIASEL=0, VDLHSO=0, MICAUX=0 |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
832 l1_config.params.apcdel1 = abb[ABB_APCDEL1]; // value at reset |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
833 l1_config.params.apcdel2 = abb[ABB_APCDEL2]; // value at reset |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
834 #endif |
528
1affe428bf72
getting closer to compiling l1_cust.c
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
523
diff
changeset
|
835 #if (ANALOG == 3) |
517
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
836 l1_config.params.debug1 = C_DEBUG1; // Enable f_tx delay of 400000 cyc DEBUG |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
837 l1_config.params.afcctladd = abb[ABB_AFCCTLADD]; // Value at reset |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
838 l1_config.params.vbuctrl = abb[ABB_VBUCTRL]; // Uplink gain amp 0dB, Sidetone gain to mute |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
839 l1_config.params.vbdctrl = abb[ABB_VBDCTRL]; // Downlink gain amp 0dB, Volume control 0 dB |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
840 l1_config.params.bbctrl = abb[ABB_BBCTRL]; // value at reset |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
841 l1_config.params.bulgcal = abb[ABB_BULGCAL]; // value at reset |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
842 l1_config.params.apcoff = abb[ABB_APCOFF]; // X2 Slope 128 and APCSWP disabled |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
843 l1_config.params.bulioff = abb[ABB_BULIOFF]; // value at reset |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
844 l1_config.params.bulqoff = abb[ABB_BULQOFF]; // value at reset |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
845 l1_config.params.dai_onoff = abb[ABB_DAI_ON_OFF]; // value at reset |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
846 l1_config.params.auxdac = abb[ABB_AUXDAC]; // value at reset |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
847 l1_config.params.vbctrl1 = abb[ABB_VBCTRL1]; // VULSWITCH=0 |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
848 l1_config.params.vbctrl2 = abb[ABB_VBCTRL2]; // MICBIASEL=0, VDLHSO=0, MICAUX=0 |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
849 l1_config.params.apcdel1 = abb[ABB_APCDEL1]; // value at reset |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
850 l1_config.params.apcdel2 = abb[ABB_APCDEL2]; // value at reset |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
851 l1_config.params.vbpop = abb[ABB_VBPOP]; // HSOAUTO enabled |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
852 l1_config.params.vau_delay_init = abb[ABB_VAUDINITD]; // 2 TDMA Frames between VDL "ON" and VDLHSO "ON" |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
853 l1_config.params.vaud_cfg = abb[ABB_VAUDCTRL]; // value at reset |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
854 l1_config.params.vauo_onoff = abb[ABB_VAUOCTRL]; // speech on AUX and EAR |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
855 l1_config.params.vaus_vol = abb[ABB_VAUSCTRL]; // value at reset |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
856 l1_config.params.vaud_pll = abb[ABB_VAUDPLL]; // value at reset |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
857 #endif |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
858 |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
859 #if (RF_FAM == 61) |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
860 l1_config.params.apcctrl2 = drp_wrapper[DRP_WRAPPER_APCCTRL2]; |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
861 l1_config.params.apcdel1 = drp_wrapper[DRP_WRAPPER_APCDEL1]; |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
862 l1_config.params.apcdel2 = drp_wrapper[DRP_WRAPPER_APCDEL2]; |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
863 #endif |
528
1affe428bf72
getting closer to compiling l1_cust.c
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
523
diff
changeset
|
864 #if (ANALOG == 11) |
517
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
865 l1_config.params.vulgain = abb[ABB_VULGAIN]; |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
866 l1_config.params.vdlgain = abb[ABB_VDLGAIN]; |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
867 l1_config.params.sidetone = abb[ABB_SIDETONE]; |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
868 l1_config.params.ctrl1 = abb[ABB_CTRL1]; |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
869 l1_config.params.ctrl2 = abb[ABB_CTRL2]; |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
870 l1_config.params.ctrl3 = abb[ABB_CTRL3]; |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
871 l1_config.params.ctrl4 = abb[ABB_CTRL4]; |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
872 l1_config.params.ctrl5 = abb[ABB_CTRL5]; |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
873 l1_config.params.ctrl6 = abb[ABB_CTRL6]; |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
874 l1_config.params.popauto = abb[ABB_POPAUTO]; |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
875 l1_config.params.outen1 = abb[ABB_OUTEN1]; |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
876 l1_config.params.outen2 = abb[ABB_OUTEN2]; |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
877 l1_config.params.outen3 = abb[ABB_OUTEN3]; |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
878 l1_config.params.aulga = abb[ABB_AULGA]; |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
879 l1_config.params.aurga = abb[ABB_AURGA]; |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
880 #endif |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
881 } |
542
9dd6ca16f13d
gsm-fw/L1/cust0: split between IRAM and XIP code
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
541
diff
changeset
|
882 #endif /* !RUN_INT_RAM */ |
517
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
883 |
542
9dd6ca16f13d
gsm-fw/L1/cust0: split between IRAM and XIP code
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
541
diff
changeset
|
884 #ifndef RUN_FLASH |
517
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
885 /************************************/ |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
886 /* Automatic Gain Control */ |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
887 /************************************/ |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
888 |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
889 /*-------------------------------------------------------*/ |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
890 /* Cust_get_agc_from_IL() */ |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
891 /*-------------------------------------------------------*/ |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
892 /* Parameters : */ |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
893 /* Return : */ |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
894 /* Functionality : returns agc value */ |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
895 /*-------------------------------------------------------*/ |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
896 WORD8 Cust_get_agc_from_IL(UWORD16 radio_freq, UWORD16 agc_index, UWORD8 table_id,UWORD8 lna_off_val) |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
897 { |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
898 |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
899 UWORD16 agc_index_temp; |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
900 |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
901 // radio_freq currently not used |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
902 // this parameter is passed in order to allow band dependent tables for specific RFs |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
903 // (e.g. dual band RF with separate AGC H/W blocks for GSM and DCS) |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
904 |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
905 agc_index_temp = (agc_index<<1) + (lna_off_val * l1ctl_get_lna_att(radio_freq)); |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
906 agc_index= agc_index_temp>>1; |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
907 if (agc_index > 120) |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
908 agc_index = 120; // Clip agc_index |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
909 |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
910 switch (table_id) |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
911 { |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
912 case MAX_ID: return(rf.rx.agc.il2agc_max[agc_index]); |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
913 case AV_ID: return(rf.rx.agc.il2agc_av[agc_index]); |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
914 case PWR_ID: return(rf.rx.agc.il2agc_pwr[agc_index]); |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
915 } |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
916 return (0);//omaps00090550 |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
917 } |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
918 |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
919 /*-------------------------------------------------------*/ |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
920 /* Cust_get_agc_band */ |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
921 /*-------------------------------------------------------*/ |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
922 /* Parameters : radio_freq */ |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
923 /* Return : band number */ |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
924 /* Functionality : Computes the band for RF calibration */ |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
925 /*-------------------------------------------------------*/ |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
926 /*---------------------------------------------*/ |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
927 |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
928 #if (CODE_VERSION == SIMULATION) |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
929 UWORD16 Cust_get_agc_band(UWORD16 arfcn, UWORD8 gsm_band) |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
930 #else |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
931 UWORD16 inline Cust_get_agc_band(UWORD16 arfcn, UWORD8 gsm_band) |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
932 #endif |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
933 { |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
934 // WORD32 i =0 ; //omaps00090550 |
528
1affe428bf72
getting closer to compiling l1_cust.c
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
523
diff
changeset
|
935 UWORD8 band_number; |
517
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
936 |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
937 for (band_number=0;band_number<RF_RX_CAL_CHAN_SIZE;band_number++) |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
938 { |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
939 if (arfcn <= rf_band[gsm_band].rx.agc_bands[band_number].upper_bound) |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
940 return(band_number); |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
941 } |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
942 // Should never happen! |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
943 return(0); |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
944 } |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
945 |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
946 #if (L1_FF_MULTIBAND == 0) |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
947 /*-------------------------------------------------------*/ |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
948 /* Cust_is_band_high */ |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
949 /*-------------------------------------------------------*/ |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
950 /* Parameters : arfcn */ |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
951 /* Return : 0 if low band */ |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
952 /* 1 if high band */ |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
953 /* Functionality : Generic function which return 1 if */ |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
954 /* arfcn is in the high band */ |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
955 /*-------------------------------------------------------*/ |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
956 |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
957 UWORD8 Cust_is_band_high(UWORD16 radio_freq) |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
958 { |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
959 UWORD16 max_carrier; |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
960 UWORD8 std = l1_config.std.id; |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
961 |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
962 max_carrier = band_config[std_config[std].band[0]].max_carrier; |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
963 |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
964 return(((radio_freq >= l1_config.std.first_radio_freq) && |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
965 (radio_freq < (l1_config.std.first_radio_freq + max_carrier))) ? MULTI_BAND1 : MULTI_BAND2); |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
966 } |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
967 #endif |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
968 |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
969 /*-------------------------------------------------------*/ |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
970 /* l1ctl_encode_delta2() */ |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
971 /*-------------------------------------------------------*/ |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
972 /* Parameters : */ |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
973 /* Return : */ |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
974 /* Functionality : */ |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
975 /*-------------------------------------------------------*/ |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
976 WORD8 l1ctl_encode_delta2(UWORD16 radio_freq) |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
977 { |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
978 WORD8 delta2_freq; |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
979 UWORD16 i; |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
980 UWORD16 arfcn; |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
981 #if (L1_FF_MULTIBAND == 0) |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
982 UWORD8 band; |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
983 |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
984 band = Cust_is_band_high(radio_freq); |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
985 arfcn = Convert_l1_radio_freq(radio_freq); |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
986 #else |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
987 WORD8 band; |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
988 // Corrected for input being rf_freq and not l1_freq |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
989 arfcn = rf_convert_l1freq_to_arfcn_rfband(rf_convert_rffreq_to_l1freq(radio_freq), &band); |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
990 #endif |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
991 |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
992 i = Cust_get_agc_band(arfcn,band); // |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
993 delta2_freq = rf_band[band].rx.agc_bands[i].agc_calib; |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
994 |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
995 //temperature compensation |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
996 for (i=0;i<RF_RX_CAL_TEMP_SIZE;i++) |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
997 { |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
998 if ((WORD16)adc.converted[ADC_RFTEMP] <= rf_band[band].rx.temp[i].temperature) |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
999 { |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1000 delta2_freq += rf_band[band].rx.temp[i].agc_calib; |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1001 break; |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1002 } |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1003 } |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1004 |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1005 return(delta2_freq); |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1006 } |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1007 |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1008 #if (L1_FF_MULTIBAND == 0) |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1009 #else |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1010 /*-------------------------------------------------------*/ |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1011 /* l1ctl_get_g_magic() */ |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1012 /*-------------------------------------------------------*/ |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1013 /* Parameters : */ |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1014 /* Return : */ |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1015 /* Functionality : */ |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1016 /*-------------------------------------------------------*/ |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1017 UWORD16 l1ctl_get_g_magic(UWORD16 radio_freq) |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1018 { |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1019 // Corrected for input being rf_freq and not l1_freq |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1020 return (rf_band[rf_subband2band[rf_convert_rffreq_to_l1subband(radio_freq)]].rx.rx_cal_params.g_magic); |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1021 } |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1022 |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1023 |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1024 /*-------------------------------------------------------*/ |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1025 /* l1ctl_get_lna_att() */ |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1026 /*-------------------------------------------------------*/ |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1027 /* Parameters : */ |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1028 /* Return : */ |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1029 /* Functionality : */ |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1030 /*-------------------------------------------------------*/ |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1031 UWORD16 l1ctl_get_lna_att(UWORD16 radio_freq) |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1032 { |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1033 // The function is provided with rf_freq as input so |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1034 // convert rf_freq to l1_subband then convert l1_subband to rf_band and index into rf_band |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1035 return( rf_band[rf_subband2band[rf_convert_rffreq_to_l1subband(radio_freq)]].rx.rx_cal_params.lna_att); |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1036 // return (rf_band[rf_convert_l1freq_to_rf_band_idx(radio_freq)].rx.rx_cal_params.lna_att); |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1037 } |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1038 /*-------------------------------------------------------*/ |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1039 /* l1ctl_encode_delta1() */ |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1040 /*-------------------------------------------------------*/ |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1041 /* Parameters : */ |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1042 /* Return : */ |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1043 /* Functionality : */ |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1044 /*-------------------------------------------------------*/ |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1045 WORD8 l1ctl_encode_delta1(UWORD16 radio_freq) |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1046 { |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1047 return 0; |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1048 } |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1049 /*-------------------------------------------------------*/ |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1050 /* l1ctl_encode_lna() */ |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1051 /*-------------------------------------------------------*/ |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1052 /* Parameters : */ |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1053 /* Return : */ |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1054 /* Functionality : */ |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1055 /*-------------------------------------------------------*/ |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1056 void l1ctl_encode_lna( UWORD8 input_level, |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1057 UWORD8 *lna_state, |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1058 UWORD16 radio_freq) |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1059 { |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1060 |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1061 /*** LNA Hysteresis is implemented as following : |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1062 |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1063 | |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1064 On|---<>----+-------+ |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1065 | | | |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1066 LNA | | | |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1067 | ^ v |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1068 | | | |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1069 | | | |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1070 Off| +-------+----<>----- |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1071 +-------------------------------- |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1072 50 40 30 20 input_level /-dBm |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1073 THR_HIGH THR_LOW ***/ |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1074 WORD8 band; |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1075 // Corrected for input to be rf_freq and not l1_freq |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1076 band = rf_subband2band[rf_convert_rffreq_to_l1subband(radio_freq)]; |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1077 if ( input_level > rf_band[band].rx.rx_cal_params.lna_switch_thr_high) // < -44dBm ? |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1078 { |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1079 *lna_state = LNA_ON; // lna_off = FALSE |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1080 } |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1081 else if ( input_level < rf_band[band].rx.rx_cal_params.lna_switch_thr_low) // > -40dBm ? |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1082 { |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1083 *lna_state = LNA_OFF; // lna off = TRUE |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1084 } |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1085 } |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1086 |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1087 UWORD8 l1ctl_get_iqswap(UWORD16 rf_freq) |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1088 { |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1089 return(rf_band[rf_subband2band[rf_convert_rffreq_to_l1subband(rf_freq)]].swap_iq); |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1090 } |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1091 |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1092 #endif //if L1_FF_MULTIBAND == 0) |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1093 |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1094 /************************************/ |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1095 /* TX Management */ |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1096 /************************************/ |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1097 /*-------------------------------------------------------*/ |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1098 /* Cust_get_ramp_tab */ |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1099 /*-------------------------------------------------------*/ |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1100 /* Parameters : */ |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1101 /* Return : */ |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1102 /* Functionality : |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1103 Notes: |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1104 Cal+ |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1105 APCRAM : Dwn(15:11)Up(10:6)Forced(0) |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1106 Locosto: |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1107 APCRAM: Dwn(15:8)Up(7:0) |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1108 |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1109 */ |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1110 /*-------------------------------------------------------*/ |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1111 |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1112 void Cust_get_ramp_tab(API *a_ramp, UWORD8 txpwr_ramp_up, UWORD8 txpwr_ramp_down, UWORD16 radio_freq) |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1113 { |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1114 UWORD16 index_up, index_down,j, arfcn; |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1115 #if (L1_FF_MULTIBAND == 0) |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1116 UWORD8 band; |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1117 |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1118 band = Cust_is_band_high(radio_freq); |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1119 arfcn = Convert_l1_radio_freq(radio_freq); |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1120 #else |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1121 WORD8 band; |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1122 // Corrected for input being rf_freq and not l1_freq |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1123 arfcn = rf_convert_l1freq_to_arfcn_rfband(rf_convert_rffreq_to_l1freq(radio_freq), &band); |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1124 #endif //if( L1_FF_MULTIBAND == 0) |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1125 |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1126 index_up = rf_band[band].tx.levels[txpwr_ramp_up].ramp_index; |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1127 index_down = rf_band[band].tx.levels[txpwr_ramp_down].ramp_index; |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1128 |
528
1affe428bf72
getting closer to compiling l1_cust.c
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
523
diff
changeset
|
1129 #if ((ANALOG == 1) || (ANALOG == 2) || (ANALOG == 3)) |
517
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1130 for (j=0; j<16; j++) |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1131 { |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1132 a_ramp[j]=((rf_band[band].tx.ramp_tables[index_down].ramp_down[j])<<11) | |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1133 ((rf_band[band].tx.ramp_tables[index_up].ramp_up[j]) << 6) | |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1134 0x14; |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1135 } |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1136 #endif |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1137 |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1138 #if (RF_FAM == 61) |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1139 // 20 Coeff each 8 (RampDown) + 8 (RampUp) |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1140 for (j=0; j<20; j++) |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1141 { |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1142 a_ramp[j]=( (255 - (rf_band[band].tx.ramp_tables[index_down].ramp_down[j]) ) <<8) | |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1143 ((rf_band[band].tx.ramp_tables[index_up].ramp_up[j])) ; |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1144 } |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1145 #endif |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1146 } |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1147 |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1148 /*-------------------------------------------------------*/ |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1149 /* get_pwr_data */ |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1150 /*-------------------------------------------------------*/ |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1151 /* Parameters : */ |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1152 /* Return : */ |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1153 /* Functionality : */ |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1154 /*-------------------------------------------------------*/ |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1155 |
528
1affe428bf72
getting closer to compiling l1_cust.c
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
523
diff
changeset
|
1156 #if ((ANALOG == 1) || (ANALOG == 2) || (ANALOG == 3) || (RF_FAM == 61)) |
517
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1157 UWORD16 Cust_get_pwr_data(UWORD8 txpwr, UWORD16 radio_freq |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1158 #if (REL99 && FF_PRF) |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1159 , UWORD8 number_uplink_timeslot |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1160 #endif |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1161 ) |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1162 { |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1163 |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1164 UWORD16 i,j; |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1165 UWORD16 arfcn; |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1166 |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1167 T_TX_LEVEL *a_tx_levels; |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1168 |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1169 #if (APC_VBAT_COMP == 1) |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1170 static UWORD16 apc_max_value = APC_MAX_VALUE; |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1171 #endif |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1172 |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1173 #if(ORDER2_TX_TEMP_CAL==1) |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1174 WORD16 pwr_data; |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1175 #else |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1176 UWORD16 pwr_data; |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1177 #endif |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1178 |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1179 #if (L1_FF_MULTIBAND == 0) |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1180 UWORD8 band; |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1181 band = Cust_is_band_high(radio_freq); |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1182 arfcn = Convert_l1_radio_freq(radio_freq); |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1183 #else |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1184 WORD8 band; |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1185 // Corrected for input being rf_freq and not l1_freq |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1186 arfcn = rf_convert_l1freq_to_arfcn_rfband(rf_convert_rffreq_to_l1freq(radio_freq), &band); |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1187 #endif //if( L1_FF_MULTIBAND == 0) |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1188 |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1189 // band = Cust_is_band_high(radio_freq); |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1190 // arfcn = Convert_l1_radio_freq(radio_freq); |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1191 |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1192 a_tx_levels = &(rf_band[band].tx.levels[txpwr]); // get pointer to rf tx structure |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1193 |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1194 #if REL99 |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1195 #if FF_PRF |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1196 // uplink power reduction feature which decrease power level in case of uplink multislot |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1197 a_tx_levels = Cust_get_uplink_apc_power_reduction(band, number_uplink_timeslot, a_tx_levels); |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1198 #endif |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1199 #endif |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1200 |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1201 // get uncalibrated apc |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1202 pwr_data = a_tx_levels->apc; |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1203 |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1204 i = a_tx_levels->chan_cal_index; // get index for channel compensation |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1205 j=0; |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1206 |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1207 while (arfcn > rf_band[band].tx.chan_cal_table[i][j].arfcn_limit) |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1208 j++; |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1209 |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1210 // channel calibrate apc |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1211 pwr_data = ((UWORD32) (pwr_data * rf_band[band].tx.chan_cal_table[i][j].chan_cal))/128; |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1212 |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1213 // temperature compensate apc |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1214 { |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1215 T_TX_TEMP_CAL *pt; |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1216 |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1217 pt = rf_band[band].tx.temp; |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1218 while (((WORD16)adc.converted[ADC_RFTEMP] > pt->temperature) && ((pt-rf_band[band].tx.temp) < (RF_TX_CAL_TEMP_SIZE-1))) |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1219 pt++; |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1220 #if(ORDER2_TX_TEMP_CAL==1) |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1221 pwr_data += (txpwr*(pt->a*txpwr + pt->b) + pt->c) / 64; //delta apc = ax^2+bx+c |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1222 if(pwr_data < 0) pwr_data = 0; |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1223 #else |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1224 pwr_data += pt->apc_calib; |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1225 #endif |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1226 } |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1227 |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1228 // Vbat compensate apc |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1229 #if (APC_VBAT_COMP == 1) |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1230 |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1231 if (adc.converted[ADC_VBAT] < VBAT_LOW_THRESHOLD) |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1232 apc_max_value = APC_MAX_VALUE_LOW_BAT; |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1233 |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1234 else if (adc.converted[ADC_VBAT] > VBAT_HIGH_THRESHOLD) |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1235 apc_max_value = APC_MAX_VALUE; |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1236 |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1237 // else do nothing as Vbat is staying between VBAT_LOW_THRESHOLD and |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1238 // VBAT_HIGH_THRESHOLD -> max APC value is still the same than previous one |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1239 |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1240 if (pwr_data > apc_max_value) |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1241 pwr_data = apc_max_value; |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1242 #endif // APC_VBAT_COMP == 1 |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1243 |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1244 return(pwr_data); |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1245 } |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1246 #endif |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1247 |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1248 |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1249 #if(REL99 && FF_PRF) |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1250 |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1251 /*-------------------------------------------------------*/ |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1252 /* Cust_get_uplink_apc_power_reduction */ |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1253 /*-------------------------------------------------------*/ |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1254 /* Parameters : */ |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1255 /* - frenquency band */ |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1256 /* - modulation type */ |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1257 /* - number of uplink timeslot */ |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1258 /* - pointer to radio power control structure */ |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1259 /* Return : */ |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1260 /* - pointer to radio power control structure */ |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1261 /* */ |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1262 /* Functionality : This function returns a pointer to */ |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1263 /* the radio power control structure after power */ |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1264 /* reduction processing. */ |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1265 /* Depending of the number of uplink timeslot, the */ |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1266 /* analogue power control (apc) value can be reduced */ |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1267 /* in order to limit effect of terminal heat */ |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1268 /* dissipation due to power amplifier. */ |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1269 /*-------------------------------------------------------*/ |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1270 |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1271 T_TX_LEVEL *Cust_get_uplink_apc_power_reduction(UWORD8 band, |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1272 UWORD8 number_uplink_timeslot, |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1273 T_TX_LEVEL *p_tx_level) |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1274 { |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1275 T_TX_LEVEL *p_power_reduction_tx_level; |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1276 |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1277 #if TESTMODE |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1278 if ((l1_config.TestMode == TRUE) && (l1_config.tmode.tx_params.power_reduction_enable == FALSE)) |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1279 return p_tx_level ; // return without any power reduction |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1280 #endif |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1281 |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1282 if ((number_uplink_timeslot >= 1) && (number_uplink_timeslot <= MAX_UPLINK_TIME_SLOT)) |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1283 { |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1284 number_uplink_timeslot--; // index start from 0 |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1285 } |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1286 else |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1287 { |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1288 return p_tx_level; // abnormal case we do not apply any power reduction |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1289 } |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1290 |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1291 p_power_reduction_tx_level = &(rf_band[band].tx.levels_power_reduction[number_uplink_timeslot]); |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1292 |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1293 // We select the lowest power level in order to apply power reduction |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1294 #if (CODE_VERSION != SIMULATION) |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1295 if (p_tx_level->apc > p_power_reduction_tx_level->apc) // higher apc value means higher transmit power |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1296 #else |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1297 if (p_tx_level->apc < p_power_reduction_tx_level->apc) // ! for simulation rf apc tables are inverted so comparaison is the reverse |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1298 #endif |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1299 return p_power_reduction_tx_level; |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1300 else |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1301 return p_tx_level; |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1302 } |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1303 |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1304 #endif |
542
9dd6ca16f13d
gsm-fw/L1/cust0: split between IRAM and XIP code
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
541
diff
changeset
|
1305 #endif /* !RUN_FLASH */ |
517
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1306 |
542
9dd6ca16f13d
gsm-fw/L1/cust0: split between IRAM and XIP code
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
541
diff
changeset
|
1307 #ifndef RUN_INT_RAM |
517
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1308 /*-------------------------------------------------------*/ |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1309 /* Cust_Init_Layer1 */ |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1310 /*-------------------------------------------------------*/ |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1311 /* Parameters : */ |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1312 /* Return : */ |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1313 /* Functionality : Load and boot the DSP */ |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1314 /* Initialize shared memory and L1 data structures */ |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1315 /*-------------------------------------------------------*/ |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1316 |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1317 void Cust_Init_Layer1(void) |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1318 { |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1319 T_MMI_L1_CONFIG cfg; |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1320 |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1321 // Get the current band configuration from the flash |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1322 #if (OP_WCP==1) && (OP_L1_STANDALONE!=1) |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1323 extern unsigned char ffs_GetBand(); |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1324 cfg.std = ffs_GetBand(); |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1325 #else // NO OP_WCP |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1326 // cfg.std = std; |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1327 cfg.std = STD; |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1328 #endif // OP_WCP |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1329 |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1330 cfg.tx_pwr_code = 1; |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1331 |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1332 // sleep management configuration |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1333 |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1334 #if(L1_POWER_MGT == 0) |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1335 cfg.pwr_mngt = 0; |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1336 cfg.pwr_mngt_mode_authorized = NO_SLEEP; //Sleep mode |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1337 cfg.pwr_mngt_clocks = 0x5ff; // list of clocks cut in Big Sleep |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1338 #endif |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1339 #if(L1_POWER_MGT == 1) |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1340 cfg.pwr_mngt = 1; |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1341 cfg.pwr_mngt_mode_authorized = ALL_SLEEP; //Sleep mode |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1342 cfg.pwr_mngt_clocks = 0x5ff; // list of clocks cut in Big Sleep |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1343 #endif |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1344 |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1345 #if (CODE_VERSION != SIMULATION) |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1346 cfg.dwnld = DWNLD; //external define from makefile |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1347 #endif |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1348 |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1349 l1_initialize(&cfg); |
626
d1df7544f102
L1: reverting malicious LoCosto change that disables all useful L1 traces
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
561
diff
changeset
|
1350 |
d1df7544f102
L1: reverting malicious LoCosto change that disables all useful L1 traces
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
561
diff
changeset
|
1351 /* |
d1df7544f102
L1: reverting malicious LoCosto change that disables all useful L1 traces
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
561
diff
changeset
|
1352 * The following conditioned-out line appears in the LoCosto version, |
d1df7544f102
L1: reverting malicious LoCosto change that disables all useful L1 traces
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
561
diff
changeset
|
1353 * but not in the Leonardo binary object. Investigation has revealed |
d1df7544f102
L1: reverting malicious LoCosto change that disables all useful L1 traces
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
561
diff
changeset
|
1354 * that the change is malicious: it disables ALL useful L1 traces. |
d1df7544f102
L1: reverting malicious LoCosto change that disables all useful L1 traces
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
561
diff
changeset
|
1355 */ |
d1df7544f102
L1: reverting malicious LoCosto change that disables all useful L1 traces
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
561
diff
changeset
|
1356 #if 0 |
517
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1357 //add below line for CSR 174476 |
528
1affe428bf72
getting closer to compiling l1_cust.c
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
523
diff
changeset
|
1358 trace_info.current_config->l1_dyn_trace = 0; //disable L1 trace after L1 init |
626
d1df7544f102
L1: reverting malicious LoCosto change that disables all useful L1 traces
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
561
diff
changeset
|
1359 #endif |
517
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1360 |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1361 get_cal_from_nvmem((UWORD8 *)&rf, sizeof(rf), RF_ID); |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1362 get_cal_from_nvmem((UWORD8 *)&adc_cal, sizeof(adc_cal), ADC_ID); |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1363 |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1364 } |
542
9dd6ca16f13d
gsm-fw/L1/cust0: split between IRAM and XIP code
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
541
diff
changeset
|
1365 #endif /* !RUN_INT_RAM */ |
517
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1366 |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1367 /*****************************************************************************************/ |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1368 /*************************** TESTMODE functions **********************************/ |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1369 /*****************************************************************************************/ |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1370 |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1371 |
542
9dd6ca16f13d
gsm-fw/L1/cust0: split between IRAM and XIP code
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
541
diff
changeset
|
1372 #ifndef RUN_FLASH |
517
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1373 /*------------------------------------------------------*/ |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1374 /* madc_hex_2_physical */ |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1375 /*------------------------------------------------------*/ |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1376 /* Parameters : */ |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1377 /* Return : */ |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1378 /* Functionality : Function to convert MAD hexadecimal */ |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1379 /* values into physical values */ |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1380 /*------------------------------------------------------*/ |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1381 |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1382 void madc_hex_2_physical (UWORD16 *adc_hex, T_ADC *adc_phy) |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1383 { |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1384 WORD16 i; |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1385 UWORD16 y; |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1386 WORD16 Smin = 0, Smax = TEMP_TABLE_SIZE-1; |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1387 WORD16 index = (TEMP_TABLE_SIZE-1)/2; /* y is the adc code after compensation of ADC slope error introduced by VREF error */ |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1388 |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1389 //store raw ADC values |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1390 memcpy(&adc.raw[0], adc_hex, sizeof(adc.raw)); |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1391 |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1392 // Convert Vbat [mV] : direct equation with slope and offset compensation |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1393 for (i = ADC_VBAT; i<ADC_RFTEMP; i++) |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1394 adc.converted[i] = (((UWORD32)(adc_cal.a[i] * adc.raw[i])) >>10) + adc_cal.b[i]; |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1395 |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1396 /*Convert RF Temperature [Celsius]: binsearch into a table*/ |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1397 y = ((UWORD32)(adc_cal.a[ADC_RFTEMP] * adc.raw[ADC_RFTEMP]))>>8; /* rf.tempcal is the calibration of VREF*/ |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1398 while((Smax-Smin) > 1 ) |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1399 { |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1400 if(y < temperature[index].adc) |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1401 Smax=index; |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1402 else |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1403 Smin=index; |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1404 |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1405 index = (Smax+Smin)/2; |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1406 } |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1407 adc.converted[ADC_RFTEMP] = temperature[index].temp; |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1408 |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1409 for (i = ADC_RFTEMP+1; i<ADC_INDEX_END; i++) |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1410 adc.converted[i] = (((UWORD32)(adc_cal.a[i] * adc.raw[i])) >>10) + adc_cal.b[i]; |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1411 |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1412 //store converted ADC values |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1413 memcpy(adc_phy, &adc.converted[0], sizeof(adc.raw)); |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1414 } |
542
9dd6ca16f13d
gsm-fw/L1/cust0: split between IRAM and XIP code
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
541
diff
changeset
|
1415 #endif /* !RUN_FLASH */ |
517
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1416 |
542
9dd6ca16f13d
gsm-fw/L1/cust0: split between IRAM and XIP code
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
541
diff
changeset
|
1417 #ifndef RUN_INT_RAM |
517
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1418 /*------------------------------------------------------*/ |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1419 /* get_cal_from_nvmem */ |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1420 /*------------------------------------------------------*/ |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1421 /* Parameters : */ |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1422 /* Return : */ |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1423 /* Functionality : Copy calibrated parameter to */ |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1424 /* calibration structure in RAM */ |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1425 /*------------------------------------------------------*/ |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1426 |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1427 void get_cal_from_nvmem (UWORD8 *ptr, UWORD16 len, UWORD8 id) |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1428 { |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1429 |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1430 } |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1431 |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1432 /*------------------------------------------------------*/ |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1433 /* save_cal_from_nvmem */ |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1434 /*------------------------------------------------------*/ |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1435 /* Parameters : */ |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1436 /* Return : */ |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1437 /* Functionality : Copy calibrated structure from RAM */ |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1438 /* into NV memory */ |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1439 /*------------------------------------------------------*/ |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1440 |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1441 UWORD8 save_cal_in_nvmem (UWORD8 *ptr, UWORD16 len, UWORD8 id) |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1442 { |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1443 return (0); |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1444 } |
542
9dd6ca16f13d
gsm-fw/L1/cust0: split between IRAM and XIP code
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
541
diff
changeset
|
1445 #endif /* !RUN_INT_RAM */ |
517
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1446 |
542
9dd6ca16f13d
gsm-fw/L1/cust0: split between IRAM and XIP code
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
541
diff
changeset
|
1447 #if (TRACE_TYPE == 4) && !defined(RUN_FLASH) |
517
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1448 |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1449 /*------------------------------------------------------*/ |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1450 /* l1_cst_l1_parameters */ |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1451 /*------------------------------------------------------*/ |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1452 /* Parameters : s: pointer on configuration string */ |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1453 /* Return : nothing: global var are set */ |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1454 /* Functionality : Set global L1 vars for dynamic trace */ |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1455 /* and configuration */ |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1456 /* */ |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1457 /* This function is called when a CST message is sent */ |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1458 /* from the Condat Panel. */ |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1459 /*------------------------------------------------------*/ |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1460 void l1_cst_l1_parameters(char *s) |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1461 { |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1462 /* |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1463 a sample command string can be: |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1464 L1_PARAMS=<1,2,3,4,5> or |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1465 L1_PARAMS=<1,23,3E32,4,5> |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1466 with n parameters (here: 5 params); n>=1 |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1467 parameters are decoded as hexadecimal unsigned integers (UWORD16) |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1468 */ |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1469 |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1470 UWORD8 uNParams = 0; /* Number of parameters */ |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1471 UWORD32 aParam[10]; /* Parameters array */ |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1472 UWORD8 uIndex = 0; |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1473 |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1474 /* *** retrieve all parameters *** */ |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1475 while (s[uIndex] != '<') uIndex++; |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1476 uIndex++; |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1477 aParam[0] = 0; |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1478 |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1479 /* uIndex points on 1st parameter */ |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1480 |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1481 while (s[uIndex] != '>') |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1482 { |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1483 if (s[uIndex] == ',') |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1484 { |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1485 uNParams++; |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1486 aParam[uNParams] = 0; |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1487 } |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1488 else |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1489 { |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1490 /* uIndex points on a parameter char */ |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1491 UWORD8 uChar = s[uIndex]; |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1492 aParam[uNParams] = aParam[uNParams] << 4; /* shift 4 bits left */ |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1493 if ((uChar>='0') && (uChar<='9')) |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1494 aParam[uNParams] += (uChar - '0'); /* retrieve value */ |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1495 else if ((uChar>='A') && (uChar<='F')) |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1496 aParam[uNParams] += (10 + uChar - 'A'); /* retrieve value */ |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1497 else if ((uChar>='a') && (uChar<='f')) |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1498 aParam[uNParams] += (10 + uChar - 'a'); /* retrieve value */ |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1499 } |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1500 |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1501 uIndex++; /* go to next char */ |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1502 } |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1503 |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1504 /* increment number of params */ |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1505 uNParams++; |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1506 |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1507 /* *** handle parameters *** */ |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1508 /* |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1509 1st param: command type |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1510 2nd param: argument for command type |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1511 */ |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1512 switch (aParam[0]) |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1513 { |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1514 case 0: /* Trace setting */ |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1515 /* The 2nd parameter contains the trace bitmap*/ |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1516 if (uNParams >=2) |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1517 trace_info.current_config->l1_dyn_trace = aParam[1]; |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1518 else |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1519 trace_info.current_config->l1_dyn_trace = 0; /* error case: disable all trace */ |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1520 Trace_dyn_trace_change(); |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1521 break; |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1522 default: /* ignore it */ |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1523 break; |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1524 } // switch |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1525 } |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1526 |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1527 #endif |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1528 |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1529 #if ((CHIPSET == 2) || (CHIPSET == 3) || (CHIPSET == 4) || \ |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1530 (CHIPSET == 5) || (CHIPSET == 6) || (CHIPSET == 7) || \ |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1531 (CHIPSET == 8) || (CHIPSET == 9) || (CHIPSET == 10) || \ |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1532 (CHIPSET == 11) || (CHIPSET == 12)) |
542
9dd6ca16f13d
gsm-fw/L1/cust0: split between IRAM and XIP code
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
541
diff
changeset
|
1533 #ifndef RUN_FLASH |
517
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1534 /*-------------------------------------------------------*/ |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1535 /* power_down_config() : temporary implementation !!! */ |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1536 /*-------------------------------------------------------*/ |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1537 /* Parameters : sleep_mode (NO, SMALL, BIG, DEEP or ALL) */ |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1538 /* clocks to be cut in BIG sleep */ |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1539 /* Return : */ |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1540 /* Functionality : set the l1s variables */ |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1541 /* l1s.pw_mgr.mode_authorized and l1s.pw_mgr.clocks */ |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1542 /* according to the desired mode. */ |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1543 /*-------------------------------------------------------*/ |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1544 void power_down_config(UWORD8 sleep_mode, UWORD16 clocks) |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1545 { |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1546 #if (OP_L1_STANDALONE == 1) |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1547 if(sleep_mode != NO_SLEEP) |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1548 #endif |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1549 { |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1550 l1_config.pwr_mngt = PWR_MNGT; |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1551 l1s.pw_mgr.mode_authorized = sleep_mode; |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1552 l1s.pw_mgr.clocks = clocks; |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1553 } |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1554 |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1555 #if (OP_L1_STANDALONE == 0) |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1556 l1s.pw_mgr.enough_gaug = FALSE; |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1557 #endif |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1558 } |
eafadfee35b2
gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1559 #endif |
542
9dd6ca16f13d
gsm-fw/L1/cust0: split between IRAM and XIP code
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
541
diff
changeset
|
1560 #endif |