annotate gsm-fw/L1/cust0/l1_cust.c @ 523:b92febec14aa

started FC version of l1_cust.c
author Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
date Mon, 14 Jul 2014 05:16:14 +0000
parents gsm-fw/L1/cust1/l1_cust.c@eafadfee35b2
children 1affe428bf72
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
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>
b92febec14aa started FC version of l1_cust.c
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents: 517
diff changeset
7 #include "../../include/config.h"
517
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
8
523
b92febec14aa started FC version of l1_cust.c
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents: 517
diff changeset
9 #include "../include/l1_confg.h"
b92febec14aa started FC version of l1_cust.c
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents: 517
diff changeset
10 #include "../include/l1_const.h"
b92febec14aa started FC version of l1_cust.c
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents: 517
diff changeset
11 #include "../../bsp/ulpd.h"
b92febec14aa started FC version of l1_cust.c
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents: 517
diff changeset
12 #include "../../nucleus/nucleus.h"
b92febec14aa started FC version of l1_cust.c
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents: 517
diff changeset
13 #include "../../nucleus/tm_defs.h"
b92febec14aa started FC version of l1_cust.c
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents: 517
diff changeset
14 #include "../include/l1_types.h"
b92febec14aa started FC version of l1_cust.c
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents: 517
diff changeset
15 #include "../include/l1_time.h"
b92febec14aa started FC version of l1_cust.c
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents: 517
diff changeset
16 #include "../include/l1_trace.h"
b92febec14aa started FC version of l1_cust.c
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents: 517
diff changeset
17 #include "../../include/sys_types.h"
b92febec14aa started FC version of l1_cust.c
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents: 517
diff changeset
18 #include "../include/l1_macro.h"
b92febec14aa started FC version of l1_cust.c
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents: 517
diff changeset
19 #include "../../serial/serialswitch.h"
b92febec14aa started FC version of l1_cust.c
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents: 517
diff changeset
20 #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
21
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
22 #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
23 #include "buzzer/buzzer.h" // for BZ_KeyBeep_OFF function
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
24 #include "sim/sim.h"
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
25 #endif
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
26
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
27 #if TESTMODE
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
28 #include "l1tm_defty.h"
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
29 #endif
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
30
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
31 #if (AUDIO_TASK == 1)
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
32 #include "l1audio_const.h"
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
33 #include "l1audio_cust.h"
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
34 #include "l1audio_defty.h"
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
35 #endif
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
36
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
37 #if (L1_GTT == 1)
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
38 #include "l1gtt_const.h"
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
39 #include "l1gtt_defty.h"
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
40 #endif
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
41
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
42 #if (L1_MP3 == 1)
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
43 #include "l1mp3_defty.h"
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
44 #endif
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
45
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
46 #if (L1_MIDI == 1)
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
47 #include "l1midi_defty.h"
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
48 #endif
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
49
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
50 #include "l1_defty.h"
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
51 #include "l1_msgty.h"
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
52 #include "l1_tabs.h"
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
53 #include "l1_varex.h"
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
54 #include "l1_proto.h"
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
55 #if (VCXO_ALGO == 1)
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
56 #include "l1_ctl.h"
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
57 #endif
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
58
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
59
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
60 #if (RF_FAM == 61)
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
61 #include "drp_drive.h"
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
62 #include "tpudrv61.h"
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
63 #include "l1_rf61.h"
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
64 #include "l1_rf61.c"
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
65 #endif
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
66
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
67
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
68 #if (RF_FAM == 60 )
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
69 #include "drp_drive.h"
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
70 #include "tpudrv60.h"
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
71 #include "l1_rf60.h"
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
72 #include "l1_rf60.c"
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
73 //#include "rf60.h"
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
74 #endif
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
75
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
76 #if (RF_FAM == 43)
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
77 #include "tpudrv43.h"
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
78 #include "l1_rf43.h"
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
79 #include "l1_rf43.c"
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
80 #endif
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
81
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
82 #if (RF_FAM == 35)
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
83 #include "tpudrv35.h"
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
84 #include "l1_rf35.h"
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
85 #include "l1_rf35.c"
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
86 #endif
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
87
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
88 #if (RF_FAM == 12)
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
89 #include "tpudrv12.h"
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
90 #include "l1_rf12.h"
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
91 #include "l1_rf12.c"
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
92 #endif
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
93
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
94 #if (RF_FAM == 10)
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
95 #include "tpudrv10.h"
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
96 #include "l1_rf10.h"
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
97 #include "l1_rf10.c"
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
98 #endif
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
99
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
100 #if (RF_FAM == 8)
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
101 #include "tpudrv8.h"
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
102 #include "l1_rf8.h"
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
103 #include "l1_rf8.c"
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
104 #endif
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
105
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
106 #if (RF_FAM == 2)
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
107 #include "l1_rf2.h"
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
108 #include "l1_rf2.c"
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
109 #endif
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
110
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
111 #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
112 #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
113 #include "l1_ver.h"
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
114 #endif
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
115
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
116
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
117 // Nucleus functions
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
118 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
119 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
120 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
121 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
122 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
123 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
124 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
125
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
126 #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
127 #define FFS_WORKAROUND 0
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
128 #else
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
129 #define FFS_WORKAROUND 0
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
130 #endif
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
131 #if (FFS_WORKAROUND == 1)
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
132 #include "ffs/ffs.h"
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
133 #else
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
134 /* typedef signed int int32;
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
135 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
136 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
137 effs_t ffs_fwrite(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
138 #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
139 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
140 #endif
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
141 #endif
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
142
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
143 // 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
144 //extern UWORD8 std;
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
145 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
146 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
147
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
148 #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
149 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
150 #endif
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
151
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
152 #if (CODE_VERSION != SIMULATION)
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
153 // Import serial switch configuration
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
154 #if (CHIPSET == 12)
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
155 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
156 #else
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
157 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
158 #endif
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
159 #endif
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
160
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
161 #if(REL99 && FF_PRF)
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
162 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
163 UWORD8 number_uplink_timeslot,
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
164 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
165 #endif
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
166
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
167
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
168 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
169 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
170 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
171 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
172 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
173
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
174 #if (RF_FAM == 61)
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
175 #include "drp_api.h"
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
176
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
177
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
178 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
179 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
180 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
181 #endif
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
182
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
183 enum {
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
184 RF_ID = 0,
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
185 ADC_ID = 1
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
186 };
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 (L1_FF_MULTIBAND == 0)
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
189 /*-------------------------------------------------------*/
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
190 /* Parameters: none */
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
191 /* Return: none */
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
192 /* 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
193 /* for each std. */
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
194 /*-------------------------------------------------------*/
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
195 //omaps00090550 #83 warinng removal
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
196 static const T_BAND_CONFIG band_config[] =
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
197 { /*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
198 {"",(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
199 {"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
200 {"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
201 {"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
202 {"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
203 #if (RF_FAM == 10)
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
204 {"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
205 #endif
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
206 {"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
207 };
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
208
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
209 /*-------------------------------------------------------*/
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
210 /* Parameters: none */
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
211 /* Return: none */
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
212 /* 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
213 /* for each std. */
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
214 /*-------------------------------------------------------*/
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
215 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
216 {
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
217 /* 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
218 { 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
219 { 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
220 { 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
221 { 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
222 { 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
223 { 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
224 { 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
225 { 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
226 #if (RF_FAM == 10)
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
227 { 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
228 #else
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
229 { 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
230 #endif
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
231 };
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
232 #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
233
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
234 /*-------------------------------------------------------*/
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
235 /* 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
236 /*-------------------------------------------------------*/
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
237 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
238 #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
239 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
240 #endif
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
241 /*-------------------------------------------------------*/
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
242 /* Cust_recover_Os() */
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
243 /*-------------------------------------------------------*/
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 /* 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
246 /* ------------ */
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
247 /* This function fix the : */
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
248 /* - system clock */
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
249 /* - Nucleus timers */
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
250 /* - xxxxxx (customer dependant) */
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
251 /*-------------------------------------------------------*/
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 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
254 {
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
255 #if (CODE_VERSION != SIMULATION)
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
256 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
257 {
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
258 UWORD32 current_system_clock;
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
259
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
260 /***************************************************/
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
261 // 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
262 /***************************************************/
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
263 // Fix System clock ....
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
264 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
265 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
266 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
267
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
268 // 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
269 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
270 {
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
271 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
272 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
273 }
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 /***************************************************/
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
276 // Cust dependant part ... */
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 //.............
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 return(TRUE);
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 }
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
284 #endif
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
285 return(TRUE); //omaps00090550
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
286 }
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
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
289
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 /* Cust_check_system() */
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
292 /*-------------------------------------------------------*/
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 /* Description: */
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 /* GSM 1.5 : */
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
297 /* - 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
298 /* 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
299 /* - 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
300 /* 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
301 /* - 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
302 /* before allowing DEEP SLEEP. */
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
303 /* - 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
304 /* - choose the sleep mode */
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
305 /* */
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
306 /* Return: */
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 /* 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
309 /*-------------------------------------------------------*/
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
310 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
311 {
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 #if (CODE_VERSION != SIMULATION)
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
314 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
315 {
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
316
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
317 #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
318 // Forbid deep sleep if the light is on
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
319 if(LT_Status())
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
320 {
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
321 //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
322 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
323 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
324 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
325 }
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
326
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
327 #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
328 // Forbid deep sleep if the camera is working
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
329 if(!cama_sleep_status())
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
330 {
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
331 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
332 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
333 }
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
334
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
335 // 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
336 #if (REQUIRED_FOR_ESAMPLE_LOCOSTO)
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
337 // 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
338 if(SIM_SleepStatus())
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
339 #endif
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
340 {
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
341 #endif
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
342 #endif
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
343 if(SER_UartSleepStatus())
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
344 {
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
345 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
346 }
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
347 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
348 #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
349 #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
350 }
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 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
352 #if (REQUIRED_FOR_ESAMPLE_LOCOSTO)
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
353 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
354 #endif
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
355 #endif
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
356 #endif
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
357 // 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
358 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
359 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
360 }
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
361 #else // Simulation part
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
362 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
363 #endif
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
364 return(CLOCK_STOP); // omaps00090550
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
365 }
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
366
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 /*-------------------------------------------------------*/
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
369 /* Parameters: none */
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
370 /* Return: none */
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
371 /* 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
372 /* from FFS files. */
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 //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
375 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
376 {
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
377 #if (CODE_VERSION != SIMULATION)
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
378
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
379 // 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
380 // 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
381 // 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
382 // 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
383 // 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
384 // 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
385 "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
386 "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
387 #if (VCXO_ALGO == 1)
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
388 "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
389 #else
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
390 "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
391 #endif
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
392
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
393 "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
394 "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
395 "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
396
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
397 "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
398
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
399 "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
400 "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
401
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
402 #if (RF_FAM ==61)
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
403 "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
404 #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
405 "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
406 #endif
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
407 #endif
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
408
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
409 #endif
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
410 NULL, 0, 0 // terminator
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
411 };
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
412
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
413 /*-------------------------------------------------------*/
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
414 /* Parameters: none */
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
415 /* Return: none */
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
416 /* 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
417 /* 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
418 /* 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
419 /* for all bands. */
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 //omaps00090550 #83 warning removal
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
422 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
423 {
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
424 // 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
425 // 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
426 // 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
427 // 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
428 // 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
429 // 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
430
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
431 // generic for all bands
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
432 // 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
433 "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
434 "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
435 "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
436 "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
437
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
438 "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
439 "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
440 "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
441 NULL, 0, 0 // terminator
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
442 };
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
443
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
444 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
445 {
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
446 config_rf_read(type);
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
447 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
448 }
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
449
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
450 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
451 {
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
452 config_rf_write(type);
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
453 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
454 }
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
455
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
456 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
457 {
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
458 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
459
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
460 while (file->name != NULL)
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
461 {
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
462 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
463 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
464 }
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
465 file++;
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
466 }
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
467 }
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
468
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
469 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
470 {
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
471 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
472
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
473 while (file->name != NULL)
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
474 {
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
475 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
476 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
477 }
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
478 file++;
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 }
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
481
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
482 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
483 {
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
484 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
485 UWORD8 i;
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
486 WORD32 offset;
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
487 char name[64];
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
488 char *p;
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
489 #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
490 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
491 #endif
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 #if FFS_WORKAROUND == 1
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
494 struct stat_s stat;
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
495 UWORD16 time;
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
496 #endif
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
497 #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
498 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
499 {
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
500 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
501 {
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
502 #else
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
503 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
504 {
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
505 #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
506 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
507 while (f1->name != NULL)
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 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
510 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
511 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
512 {
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
513 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
514 strcat(name, ".");
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
515 #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
516 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
517 #else
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
518 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
519 #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
520
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
521 if (read == 1)
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
522 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
523 else //write == 0
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
524 {
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
525 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
526
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
527 // 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
528 #if FFS_WORKAROUND == 1
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
529 stat.inode = 0;
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
530 time = 0;
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
531
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
532 do {
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
533 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
534 time += 10;
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
535 ffs_stat(name, &stat);
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
536 } 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
537 #endif
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
538 }
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
539 }
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
540 f1++;
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
541 }
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
542 }
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 }
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
545 #endif
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
546 }
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
547
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 /*-------------------------------------------------------*/
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
550 /* Cust_init_std() */
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
551 /*-------------------------------------------------------*/
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
552 /* Parameters : */
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
553 /* Return : */
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
554 /* 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
555 /*-------------------------------------------------------*/
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
556 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
557 #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
558 {
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
559 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
560 UWORD8 band1, band2;
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
561 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
562
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
563 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
564 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
565
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
566 //get these from std
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
567 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
568 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
569
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
570 // 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
571 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
572
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
573 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
574 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
575
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
576 // 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
577 // 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
578
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
579 config_ffs_read('*');
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
580
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
581 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
582
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
583 if(band2!=0)
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
584 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
585 else
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
586 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
587
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
588 // 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
589 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
590 if(band2!=0)
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
591 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
592
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
593 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
594 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
595 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
596 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
597 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
598
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
599 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
600 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
601 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
602 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
603 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
604
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
605 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
606 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
607 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
608 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
609 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
610
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
611 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
612
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
613 // 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
614 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
615
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
616 //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
617 // on a need basis ?
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
618 }
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
619 #else
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 UWORD8 i;
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
622
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
623 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
624 {
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
625 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
626 {
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
627 case RF_GSM900:
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
628 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
629 break;
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
630 case RF_GSM850:
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
631 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
632 break;
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
633 case RF_DCS1800:
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
634 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
635 break;
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
636 case RF_PCS1900:
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
637 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
638 break;
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
639 default:
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
640 break;
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
641 }
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
642 }
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
643 config_ffs_read('*');
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
644 }
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
645 #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
646
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
647
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 /* Cust_init_params() */
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 /* Parameters : */
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
652 /* Return : */
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
653 /* 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
654 /*-------------------------------------------------------*/
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
655 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
656 {
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
657
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
658 #if (CODE_VERSION==SIMULATION)
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
659 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
660 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
661
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
662 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
663 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
664 #else
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
665 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
666 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
667 #endif
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
668
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 // 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
671 // 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
672 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
673 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
674
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
675 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
676 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
677
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
678 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
679 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
680
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
681 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
682 TA_MAX -
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
683 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
684 EPSILON_OFFS;
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 // 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
687 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
688 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
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.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
691 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
692
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
693 // 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
694 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
695 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
696
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
697 // 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
698 // 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
699 // 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
700 // 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
701 // 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
702 // ---------
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
703 // Total: 3 qbit
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
704
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
705 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
706 #if (CODE_VERSION == SIMULATION)
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
707 // 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
708 1 -
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
709 #else
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
710 // 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
711 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
712 #endif
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
713 EPSILON_SYNC -
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
714 TPU_SLEEP_LOAD -
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
715 SERV_OFFS_REST_LOAD -
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
716 FB26_ACQUIS_DURATION -
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
717 PROVISION_TIME +
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
718 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
719
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
720 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
721 PROVISION_TIME -
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_synth_setup_time -
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
723 EPSILON_OFFS;
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 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
726
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
727 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
728 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
729
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
730 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
731 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
732 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
733 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
734 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
735
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
736 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
737 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
738 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
739 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
740
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
741 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
742 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
743 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
744 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
745
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
746 #if (CODE_VERSION == SIMULATION)
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
747 #if (VCXO_ALGO == 1)
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
748 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
749 #endif
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
750 #else
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
751 #if (VCXO_ALGO == 1)
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
752 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
753 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
754 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
755 #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
756 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
757 #else
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
758 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
759 #endif /* NEW_SNR_THRESHOLD */
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
760 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
761 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
762 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
763 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
764 #endif
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
765 #endif
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
766
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
767 #if DCO_ALGO
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
768 #if (RF_FAM == 10)
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
769 // 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
770 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
771 #else
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
772 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
773 #endif
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
774 #endif
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
775
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
776 #if (ANLG_FAM == 1)
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
777 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
778 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
779 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
780 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
781 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
782 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
783 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
784 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
785 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
786 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
787 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
788 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
789 #endif
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
790 #if (ANLG_FAM == 2)
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
791 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
792 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
793 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
794 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
795 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
796 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
797 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
798 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
799 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
800 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
801 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
802 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
803 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
804 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
805 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
806 #endif
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
807 #if (ANLG_FAM == 3)
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
808 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
809 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
810 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
811 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
812 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
813 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
814 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
815 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
816 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
817 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
818 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
819 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
820 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
821 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
822 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
823 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
824 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
825 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
826 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
827 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
828 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
829 #endif
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
830
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
831 #if (RF_FAM == 61)
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
832 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
833 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
834 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
835 #endif
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
836 #if (ANLG_FAM == 11)
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
837 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
838 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
839 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
840 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
841 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
842 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
843 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
844 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
845 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
846 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
847 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
848 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
849 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
850 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
851 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
852 #endif
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
853 }
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
854
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
855
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
856 /************************************/
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
857 /* Automatic Gain Control */
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
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
860 /*-------------------------------------------------------*/
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
861 /* 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
862 /*-------------------------------------------------------*/
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
863 /* Parameters : */
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
864 /* Return : */
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
865 /* Functionality : returns agc value */
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
866 /*-------------------------------------------------------*/
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
867 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
868 {
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
869
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
870 UWORD16 agc_index_temp;
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
871
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
872 // 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
873 // 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
874 // (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
875
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
876 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
877 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
878 if (agc_index > 120)
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
879 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
880
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
881 switch (table_id)
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
882 {
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
883 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
884 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
885 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
886 }
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
887 return (0);//omaps00090550
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 /*-------------------------------------------------------*/
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
891 /* Cust_get_agc_band */
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
892 /*-------------------------------------------------------*/
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
893 /* Parameters : radio_freq */
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
894 /* Return : band number */
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
895 /* 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
896 /*-------------------------------------------------------*/
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 UWORD8 band_number;
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
900 #if (CODE_VERSION == SIMULATION)
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
901 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
902 #else
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
903 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
904 #endif
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
905 {
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
906 // WORD32 i =0 ; //omaps00090550
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
907
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
908 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
909 {
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
910 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
911 return(band_number);
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
912 }
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
913 // Should never happen!
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
914 return(0);
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
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
917 #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
918 /*-------------------------------------------------------*/
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
919 /* Cust_is_band_high */
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
920 /*-------------------------------------------------------*/
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
921 /* Parameters : arfcn */
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
922 /* 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
923 /* 1 if high band */
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
924 /* 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
925 /* 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
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 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
929 {
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
930 UWORD16 max_carrier;
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
931 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
932
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
933 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
934
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
935 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
936 (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
937 }
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
938 #endif
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
939
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
940 /*-------------------------------------------------------*/
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
941 /* l1ctl_encode_delta2() */
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
942 /*-------------------------------------------------------*/
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
943 /* Parameters : */
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
944 /* Return : */
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
945 /* Functionality : */
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
946 /*-------------------------------------------------------*/
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
947 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
948 {
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
949 WORD8 delta2_freq;
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
950 UWORD16 i;
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
951 UWORD16 arfcn;
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
952 #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
953 UWORD8 band;
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
954
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
955 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
956 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
957 #else
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
958 WORD8 band;
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
959 // 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
960 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
961 #endif
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
962
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
963 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
964 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
965
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
966 //temperature compensation
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
967 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
968 {
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
969 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
970 {
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
971 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
972 break;
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
973 }
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
974 }
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 return(delta2_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
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
979 #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
980 #else
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
981 /*-------------------------------------------------------*/
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
982 /* l1ctl_get_g_magic() */
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 /* Parameters : */
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
985 /* Return : */
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
986 /* Functionality : */
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
987 /*-------------------------------------------------------*/
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
988 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
989 {
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
990 // 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
991 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
992 }
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
993
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 /*-------------------------------------------------------*/
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
996 /* l1ctl_get_lna_att() */
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 /* Parameters : */
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
999 /* Return : */
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1000 /* Functionality : */
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1001 /*-------------------------------------------------------*/
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1002 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
1003 {
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1004 // 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
1005 // 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
1006 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
1007 // 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
1008 }
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1009 /*-------------------------------------------------------*/
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1010 /* l1ctl_encode_delta1() */
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1011 /*-------------------------------------------------------*/
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1012 /* Parameters : */
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1013 /* Return : */
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1014 /* Functionality : */
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1015 /*-------------------------------------------------------*/
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1016 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
1017 {
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1018 return 0;
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1019 }
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1020 /*-------------------------------------------------------*/
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1021 /* l1ctl_encode_lna() */
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 /* Parameters : */
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1024 /* Return : */
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1025 /* Functionality : */
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 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
1028 UWORD8 *lna_state,
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1029 UWORD16 radio_freq)
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
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1032 /*** 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
1033
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1034 |
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1035 On|---<>----+-------+
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1036 | | |
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1037 LNA | | |
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1038 | ^ v
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1039 | | |
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 Off| +-------+----<>-----
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1042 +--------------------------------
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1043 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
1044 THR_HIGH THR_LOW ***/
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1045 WORD8 band;
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1046 // 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
1047 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
1048 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
1049 {
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1050 *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
1051 }
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1052 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
1053 {
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1054 *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
1055 }
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1056 }
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1057
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1058 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
1059 {
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1060 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
1061 }
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 #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
1064
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 /* TX Management */
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1067 /************************************/
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 /* Cust_get_ramp_tab */
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1070 /*-------------------------------------------------------*/
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1071 /* Parameters : */
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1072 /* Return : */
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1073 /* Functionality :
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1074 Notes:
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1075 Cal+
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1076 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
1077 Locosto:
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1078 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
1079
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 /*-------------------------------------------------------*/
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 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
1084 {
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1085 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
1086 #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
1087 UWORD8 band;
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 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
1090 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
1091 #else
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1092 WORD8 band;
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1093 // 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
1094 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
1095 #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
1096
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1097 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
1098 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
1099
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1100 #if ((ANLG_FAM == 1) || (ANLG_FAM == 2) || (ANLG_FAM == 3))
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1101 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
1102 {
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1103 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
1104 ((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
1105 0x14;
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1106 }
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1107 #endif
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 #if (RF_FAM == 61)
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1110 // 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
1111 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
1112 {
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1113 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
1114 ((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
1115 }
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1116 #endif
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
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1119 /*-------------------------------------------------------*/
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1120 /* get_pwr_data */
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1121 /*-------------------------------------------------------*/
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1122 /* Parameters : */
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1123 /* Return : */
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1124 /* Functionality : */
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
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1127 #if ((ANLG_FAM == 1) || (ANLG_FAM == 2) || (ANLG_FAM == 3) || (RF_FAM == 61))
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1128 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
1129 #if (REL99 && FF_PRF)
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1130 , UWORD8 number_uplink_timeslot
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1131 #endif
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1132 )
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1133 {
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1134
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1135 UWORD16 i,j;
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1136 UWORD16 arfcn;
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 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
1139
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1140 #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
1141 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
1142 #endif
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1143
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1144 #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
1145 WORD16 pwr_data;
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1146 #else
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1147 UWORD16 pwr_data;
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1148 #endif
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1149
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1150 #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
1151 UWORD8 band;
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1152 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
1153 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
1154 #else
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1155 WORD8 band;
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1156 // 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
1157 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
1158 #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
1159
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1160 // 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
1161 // 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
1162
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1163 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
1164
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1165 #if REL99
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1166 #if FF_PRF
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1167 // 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
1168 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
1169 #endif
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1170 #endif
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1171
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1172 // get uncalibrated apc
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1173 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
1174
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1175 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
1176 j=0;
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1177
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1178 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
1179 j++;
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1180
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1181 // channel calibrate apc
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1182 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
1183
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1184 // temperature compensate apc
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1185 {
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1186 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
1187
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1188 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
1189 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
1190 pt++;
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1191 #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
1192 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
1193 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
1194 #else
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1195 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
1196 #endif
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1197 }
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1198
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1199 // Vbat compensate apc
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1200 #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
1201
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1202 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
1203 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
1204
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1205 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
1206 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
1207
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1208 // 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
1209 // 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
1210
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1211 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
1212 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
1213 #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
1214
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1215 return(pwr_data);
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 #endif
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1218
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1219
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1220 #if(REL99 && FF_PRF)
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1221
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1222 /*-------------------------------------------------------*/
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1223 /* 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
1224 /*-------------------------------------------------------*/
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1225 /* Parameters : */
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1226 /* - frenquency band */
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1227 /* - modulation type */
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1228 /* - number of uplink timeslot */
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1229 /* - 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
1230 /* Return : */
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1231 /* - 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
1232 /* */
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1233 /* 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
1234 /* 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
1235 /* reduction processing. */
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1236 /* 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
1237 /* 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
1238 /* 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
1239 /* 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
1240 /*-------------------------------------------------------*/
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1241
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1242 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
1243 UWORD8 number_uplink_timeslot,
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1244 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
1245 {
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1246 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
1247
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1248 #if TESTMODE
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1249 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
1250 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
1251 #endif
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1252
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1253 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
1254 {
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1255 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
1256 }
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1257 else
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1258 {
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1259 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
1260 }
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 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
1263
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1264 // 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
1265 #if (CODE_VERSION != SIMULATION)
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1266 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
1267 #else
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1268 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
1269 #endif
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1270 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
1271 else
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1272 return p_tx_level;
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1273 }
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 #endif
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 /*-------------------------------------------------------*/
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1278 /* Cust_Init_Layer1 */
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1279 /*-------------------------------------------------------*/
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1280 /* Parameters : */
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1281 /* Return : */
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1282 /* 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
1283 /* 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
1284 /*-------------------------------------------------------*/
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 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
1287 {
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1288 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
1289
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1290 // 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
1291 #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
1292 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
1293 cfg.std = ffs_GetBand();
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1294 #else // NO OP_WCP
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1295 // cfg.std = std;
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1296 cfg.std = STD;
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1297 #endif // OP_WCP
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1298
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1299 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
1300
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1301 // sleep management configuration
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 #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
1304 cfg.pwr_mngt = 0;
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1305 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
1306 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
1307 #endif
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1308 #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
1309 cfg.pwr_mngt = 1;
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1310 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
1311 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
1312 #endif
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1313
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1314
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
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1318 #if (CODE_VERSION != SIMULATION)
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1319 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
1320 #endif
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1321
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1322 l1_initialize(&cfg);
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1323
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1324 //add below line for CSR 174476
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1325 trace_info.current_config->l1_dyn_trace = 0; //disable L1 trace after L1 init
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1326
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1327 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
1328 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
1329
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1330 }
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
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 /*************************** TESTMODE functions **********************************/
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1335 /*****************************************************************************************/
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1336
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1337
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1338
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1339 /*------------------------------------------------------*/
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1340 /* madc_hex_2_physical */
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1341 /*------------------------------------------------------*/
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1342 /* Parameters : */
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1343 /* Return : */
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1344 /* 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
1345 /* values into physical values */
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1346 /*------------------------------------------------------*/
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1347
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1348 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
1349 {
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1350 WORD16 i;
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1351 UWORD16 y;
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1352 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
1353 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
1354
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1355 //store raw ADC values
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1356 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
1357
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1358 // 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
1359 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
1360 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
1361
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1362 /*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
1363 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
1364 while((Smax-Smin) > 1 )
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1365 {
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1366 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
1367 Smax=index;
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1368 else
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1369 Smin=index;
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 index = (Smax+Smin)/2;
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1372 }
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1373 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
1374
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1375 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
1376 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
1377
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1378 //store converted ADC values
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1379 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
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
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 /* get_cal_from_nvmem */
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1385 /*------------------------------------------------------*/
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1386 /* Parameters : */
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1387 /* Return : */
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1388 /* 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
1389 /* calibration structure in RAM */
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1390 /*------------------------------------------------------*/
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 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
1393 {
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1394
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
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1397 /*------------------------------------------------------*/
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1398 /* save_cal_from_nvmem */
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 /* Parameters : */
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1401 /* Return : */
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1402 /* 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
1403 /* into NV memory */
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
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1406 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
1407 {
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1408 return (0);
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1409 }
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1410
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1411 #if (TRACE_TYPE == 4)
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1412
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1413 /*------------------------------------------------------*/
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1414 /* l1_cst_l1_parameters */
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1415 /*------------------------------------------------------*/
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1416 /* 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
1417 /* 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
1418 /* 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
1419 /* and configuration */
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 /* 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
1422 /* from the Condat Panel. */
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1423 /*------------------------------------------------------*/
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1424 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
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 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
1428 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
1429 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
1430 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
1431 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
1432 */
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1433
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1434 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
1435 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
1436 UWORD8 uIndex = 0;
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1437
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1438 /* *** retrieve all parameters *** */
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1439 while (s[uIndex] != '<') uIndex++;
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1440 uIndex++;
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1441 aParam[0] = 0;
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 /* 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
1444
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1445 while (s[uIndex] != '>')
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1446 {
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1447 if (s[uIndex] == ',')
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 uNParams++;
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1450 aParam[uNParams] = 0;
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 else
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1453 {
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1454 /* 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
1455 UWORD8 uChar = s[uIndex];
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1456 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
1457 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
1458 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
1459 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
1460 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
1461 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
1462 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
1463 }
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1464
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1465 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
1466 }
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1467
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1468 /* increment number of params */
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1469 uNParams++;
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1470
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1471 /* *** handle parameters *** */
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1472 /*
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1473 1st param: command type
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1474 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
1475 */
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1476 switch (aParam[0])
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1477 {
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1478 case 0: /* Trace setting */
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1479 /* 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
1480 if (uNParams >=2)
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1481 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
1482 else
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1483 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
1484 Trace_dyn_trace_change();
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1485 break;
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1486 default: /* ignore it */
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1487 break;
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1488 } // switch
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
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1491 #endif
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1492
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1493 #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
1494 (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
1495 (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
1496 (CHIPSET == 11) || (CHIPSET == 12))
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1497 /*-------------------------------------------------------*/
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1498 /* 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
1499 /*-------------------------------------------------------*/
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1500 /* 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
1501 /* 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
1502 /* Return : */
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1503 /* 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
1504 /* 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
1505 /* 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
1506 /*-------------------------------------------------------*/
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1507 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
1508 {
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1509 #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
1510 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
1511 #endif
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1512 {
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1513 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
1514 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
1515 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
1516 }
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1517
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1518 #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
1519 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
1520 #endif
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1521 }
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1522 #endif
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1523 //added for L1 standalone DRP calibration- this will overwrite the previous data
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1524 #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
1525 #pragma DATA_SECTION(drp_l1_standalone_calib_data, ".drp_l1_standalone_calib_data");
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1526 T_DRP_SW_DATA drp_l1_standalone_calib_data;
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1527 #pragma DATA_SECTION(valid_dro_standalone_calib_data_flag , ".valid_dro_standalone_calib_data_flag");
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1528 UWORD32 valid_dro_standalone_calib_data_flag;
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1529 //const T_DRP_SW_DATA drp_sw_data_init = { (UINT16) sizeof(T_DRP_CALIB), } -this needs to be filled by CCS
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1530 //added for L1 standalone DRP calibration- ends
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1531 #endif
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1532 // for DRP Calibration
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1533 /*-------------------------------------------------------*/
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1534 /* Cust_init_params_drp() */
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1535 /*-------------------------------------------------------*/
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1536 /* Parameters : none */
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1537 /* Return : none */
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1538 /* Functionality : Intialization of DRP calibration. */
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1539 /*-------------------------------------------------------*/
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1540 #if (L1_DRP == 1)
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1541 void Cust_init_params_drp(void)
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1542 {
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1543 #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
1544 l1s.boot_result=drp_sw_data_calib_upload_from_ffs(&drp_sw_data_calib);
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1545 drp_copy_sw_data_to_drpsrm(&drp_sw_data_calib);
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1546 #else // DRP_FW_EXT==0
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1547 volatile UINT16 indx, strsize;
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1548 volatile UINT8 *ptrsrc, *ptrdst;
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 #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
1551 if(drp_sw_data_calib.length != drp_sw_data_init.length)
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1552 {
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1553 #endif
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 // For the 1st time FFS might have garbage, if so use the above as check to ensure
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1556 //and copy from the .drp_sw_data_init structure.
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1557
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1558 // Copy drp_sw_data_init into drp_sw_data_calib
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1559 strsize = sizeof(T_DRP_SW_DATA);
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1560 ptrsrc = (UINT8 *)(&drp_sw_data_init);
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1561 ptrdst = (UINT8 *)(&drp_sw_data_calib);
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1562
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1563 for(indx=0;indx < strsize;indx++)
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1564 *ptrdst++ = *ptrsrc++;
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1565
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1566 #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
1567 }
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1568 #endif
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1569
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1570 drp_copy_sw_data_to_drpsrm(&drp_sw_data_calib);
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1571
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1572 //added for L1 standalone DRP calibration- this will overwrite the previous data
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1573 #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
1574 if(valid_dro_standalone_calib_data_flag == 0xDEADBEAF ) //indicates down the data via CCS
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1575 drp_copy_sw_data_to_drpsrm(&drp_l1_standalone_calib_data);
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1576 #endif
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1577 //added for L1 standalone DRP calibration- ends
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1578 #endif // DRP_FW_EXT
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1579 }
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1580 #endif
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1581
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1582
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1583 #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
1584 void l1_get_boot_result_and_version(T_L1_BOOT_VERSION_CODE * p_version)
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1585 {
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1586 if(! p_version)
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1587 {
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1588 return;
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1589 }
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1590 p_version->dsp_code_version = l1s_dsp_com.dsp_ndb_ptr->d_version_number1;
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1591 p_version->dsp_patch_version = l1s_dsp_com.dsp_ndb_ptr->d_version_number2;
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1592 p_version->mcu_tcs_program_release = PROGRAM_RELEASE_VERSION;
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1593 p_version->mcu_tcs_internal = INTERNAL_VERSION;
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1594 p_version->mcu_tcs_official = OFFICIAL_VERSION;
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1595
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1596 p_version->drp_maj_ver = drp_ref_sw_ver;
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1597 p_version->drp_min_ver = drp_ref_sw_tag;
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1598
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1599 p_version->boot_result = l1s.boot_result;
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1600 }
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1601 #endif /* DRP_FW_EXT */
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1602
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1603
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1604
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1605