annotate gsm-fw/L1/cust0/l1_cust.c @ 978:1ee80bcb0fd0

fc-tmsh: omr (old-style memory read) command implemented
author Mychaela Falconia <falcon@ivan.Harhan.ORG>
date Thu, 10 Dec 2015 04:05:55 +0000
parents 452a4aea3fc5
children
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>
528
1affe428bf72 getting closer to compiling l1_cust.c
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents: 523
diff changeset
7 #include "config.h"
1affe428bf72 getting closer to compiling l1_cust.c
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents: 523
diff changeset
8 #include "sys_types.h"
517
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
9
528
1affe428bf72 getting closer to compiling l1_cust.c
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents: 523
diff changeset
10 #include "../../riviera/rv/general.h"
523
b92febec14aa started FC version of l1_cust.c
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents: 517
diff changeset
11 #include "../../nucleus/nucleus.h"
b92febec14aa started FC version of l1_cust.c
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents: 517
diff changeset
12 #include "../../nucleus/tm_defs.h"
528
1affe428bf72 getting closer to compiling l1_cust.c
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents: 523
diff changeset
13 #include "../../gpf/inc/cust_os.h"
1affe428bf72 getting closer to compiling l1_cust.c
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents: 523
diff changeset
14
1affe428bf72 getting closer to compiling l1_cust.c
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents: 523
diff changeset
15 #include "l1_confg.h"
1affe428bf72 getting closer to compiling l1_cust.c
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents: 523
diff changeset
16 #include "l1_const.h"
1affe428bf72 getting closer to compiling l1_cust.c
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents: 523
diff changeset
17 #include "../../bsp/ulpd.h"
1affe428bf72 getting closer to compiling l1_cust.c
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents: 523
diff changeset
18 #include "l1_types.h"
1affe428bf72 getting closer to compiling l1_cust.c
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents: 523
diff changeset
19 #include "l1_time.h"
1affe428bf72 getting closer to compiling l1_cust.c
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents: 523
diff changeset
20 #include "l1_trace.h"
1affe428bf72 getting closer to compiling l1_cust.c
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents: 523
diff changeset
21 #include "l1_macro.h"
523
b92febec14aa started FC version of l1_cust.c
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents: 517
diff changeset
22 #include "../../serial/serialswitch.h"
b92febec14aa started FC version of l1_cust.c
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents: 517
diff changeset
23 #include "../../bsp/abb+spi/abb.h"
517
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
24
647
a60b375014e3 gsm-fw/L1/cust0/l1_cust.c: s/CONFIG_GSM/CONFIG_INCLUDE_SIM/
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents: 626
diff changeset
25 #if CONFIG_INCLUDE_SIM
528
1affe428bf72 getting closer to compiling l1_cust.c
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents: 523
diff changeset
26 #include "../../bsp/sim.h"
517
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
27 #endif
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
28
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
29 #if TESTMODE
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
30 #include "l1tm_defty.h"
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
31 #endif
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
32
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
33 #if (AUDIO_TASK == 1)
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
34 #include "l1audio_const.h"
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
35 #include "l1audio_cust.h"
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
36 #include "l1audio_defty.h"
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
37 #endif
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
38
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
39 #if (L1_GTT == 1)
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
40 #include "l1gtt_const.h"
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
41 #include "l1gtt_defty.h"
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
42 #endif
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
43
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
44 #if (L1_MP3 == 1)
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
45 #include "l1mp3_defty.h"
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
46 #endif
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
47
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
48 #if (L1_MIDI == 1)
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
49 #include "l1midi_defty.h"
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
50 #endif
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
51
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
52 #include "l1_defty.h"
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
53 #include "l1_msgty.h"
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
54 #include "l1_tabs.h"
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
55 #include "l1_varex.h"
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
56 #include "l1_proto.h"
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
57 #if (VCXO_ALGO == 1)
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
58 #include "l1_ctl.h"
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
59 #endif
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
60
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
61
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
62 #if (RF_FAM == 61)
528
1affe428bf72 getting closer to compiling l1_cust.c
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents: 523
diff changeset
63 #include "drp_drive.h"
517
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
64 #include "tpudrv61.h"
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
65 #include "l1_rf61.h"
528
1affe428bf72 getting closer to compiling l1_cust.c
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents: 523
diff changeset
66 //#include "l1_rf61.c"
517
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
67 #endif
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
68
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
69
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
70 #if (RF_FAM == 60 )
528
1affe428bf72 getting closer to compiling l1_cust.c
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents: 523
diff changeset
71 #include "drp_drive.h"
517
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
72 #include "tpudrv60.h"
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
73 #include "l1_rf60.h"
528
1affe428bf72 getting closer to compiling l1_cust.c
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents: 523
diff changeset
74 //#include "l1_rf60.c"
517
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
75 //#include "rf60.h"
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
76 #endif
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
77
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
78 #if (RF_FAM == 43)
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
79 #include "tpudrv43.h"
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
80 #include "l1_rf43.h"
528
1affe428bf72 getting closer to compiling l1_cust.c
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents: 523
diff changeset
81 //#include "l1_rf43.c"
517
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
82 #endif
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
83
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
84 #if (RF_FAM == 35)
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
85 #include "tpudrv35.h"
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
86 #include "l1_rf35.h"
528
1affe428bf72 getting closer to compiling l1_cust.c
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents: 523
diff changeset
87 //#include "l1_rf35.c"
517
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
88 #endif
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
89
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
90 #if (RF_FAM == 12)
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
91 #include "tpudrv12.h"
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
92 #include "l1_rf12.h"
528
1affe428bf72 getting closer to compiling l1_cust.c
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents: 523
diff changeset
93 //#include "l1_rf12.c"
517
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
94 #endif
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
95
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
96 #if (RF_FAM == 10)
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
97 #include "tpudrv10.h"
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
98 #include "l1_rf10.h"
528
1affe428bf72 getting closer to compiling l1_cust.c
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents: 523
diff changeset
99 //#include "l1_rf10.c"
517
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
100 #endif
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
101
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
102 #if (RF_FAM == 8)
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
103 #include "tpudrv8.h"
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
104 #include "l1_rf8.h"
528
1affe428bf72 getting closer to compiling l1_cust.c
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents: 523
diff changeset
105 //#include "l1_rf8.c"
517
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
106 #endif
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
107
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
108 #if (RF_FAM == 2)
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
109 #include "l1_rf2.h"
528
1affe428bf72 getting closer to compiling l1_cust.c
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents: 523
diff changeset
110 //#include "l1_rf2.c"
517
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
111 #endif
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
112
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
113 #if (DRP_FW_EXT == 1)
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
114 #include "l1_drp_inc.h"
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
115 #include "l1_ver.h"
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
116 #endif
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
117
528
1affe428bf72 getting closer to compiling l1_cust.c
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents: 523
diff changeset
118 /*
1affe428bf72 getting closer to compiling l1_cust.c
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents: 523
diff changeset
119 * FreeCalypso change: l1_rf12.c is now a separate compilation unit,
1affe428bf72 getting closer to compiling l1_cust.c
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents: 523
diff changeset
120 * so we need to extern the data objects defined therein.
1affe428bf72 getting closer to compiling l1_cust.c
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents: 523
diff changeset
121 */
1affe428bf72 getting closer to compiling l1_cust.c
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents: 523
diff changeset
122 extern T_RF rf;
1affe428bf72 getting closer to compiling l1_cust.c
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents: 523
diff changeset
123 extern T_RF_BAND rf_band[GSM_BANDS];
1affe428bf72 getting closer to compiling l1_cust.c
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents: 523
diff changeset
124 extern const T_RF_BAND rf_850, rf_900, rf_1800, rf_1900;
1affe428bf72 getting closer to compiling l1_cust.c
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents: 523
diff changeset
125 extern UWORD16 abb[ABB_TABLE_SIZE];
1affe428bf72 getting closer to compiling l1_cust.c
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents: 523
diff changeset
126 extern UWORD16 AGC_TABLE[AGC_TABLE_SIZE];
1affe428bf72 getting closer to compiling l1_cust.c
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents: 523
diff changeset
127 extern T_ADC adc;
1affe428bf72 getting closer to compiling l1_cust.c
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents: 523
diff changeset
128 extern T_ADCCAL adc_cal;
1affe428bf72 getting closer to compiling l1_cust.c
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents: 523
diff changeset
129 extern T_TEMP temperature[TEMP_TABLE_SIZE];
517
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
130
541
9c91a1f670bd gsm-fw/L1/cust0 compiles!
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents: 528
diff changeset
131 /* FreeCalypso configuration */
9c91a1f670bd gsm-fw/L1/cust0 compiles!
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents: 528
diff changeset
132 #define STD DUALEXT
9c91a1f670bd gsm-fw/L1/cust0 compiles!
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents: 528
diff changeset
133
517
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
134 // Nucleus functions
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
135 extern INT TMD_Timer_State;
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
136 extern UWORD32 TMD_Timer; // for big sleep
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
137 extern UWORD32 TCD_Priority_Groups;
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
138 extern VOID *TCD_Current_Thread;
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
139 extern TC_HCB *TCD_Active_HISR_Heads[TC_HISR_PRIORITIES];
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
140 extern TC_HCB *TCD_Active_HISR_Tails[TC_HISR_PRIORITIES];
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
141 extern TC_PROTECT TCD_System_Protect;
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
142
528
1affe428bf72 getting closer to compiling l1_cust.c
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents: 523
diff changeset
143 #define FFS_WORKAROUND 0
1affe428bf72 getting closer to compiling l1_cust.c
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents: 523
diff changeset
144
1affe428bf72 getting closer to compiling l1_cust.c
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents: 523
diff changeset
145 #if 1 // (FFS_WORKAROUND == 1)
1affe428bf72 getting closer to compiling l1_cust.c
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents: 523
diff changeset
146 #include "../../services/ffs/ffs.h"
517
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
147 #else
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
148 /* typedef signed int int32;
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
149 typedef signed char effs_t;*/
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
150 typedef signed int filesize_t;
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
151 effs_t ffs_fwrite(const char *name, void *addr, filesize_t size);
528
1affe428bf72 getting closer to compiling l1_cust.c
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents: 523
diff changeset
152 #if (DRP_FW_EXT == 0)
517
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
153 effs_t ffs_fread(const char *name, void *addr, filesize_t size);
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
154 #endif
528
1affe428bf72 getting closer to compiling l1_cust.c
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents: 523
diff changeset
155 #endif
517
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
156
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
157 // Import band configuration from Flash module (need to replace by an access function)
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
158 //extern UWORD8 std;
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
159 extern T_L1_CONFIG l1_config;
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
160 extern T_L1S_GLOBAL l1s;
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
161
528
1affe428bf72 getting closer to compiling l1_cust.c
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents: 523
diff changeset
162 #if 0 //(OP_L1_STANDALONE == 0)
517
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
163 extern SYS_BOOL cama_sleep_status(void);
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
164 #endif
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
165
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
166 #if (CODE_VERSION != SIMULATION)
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
167 // Import serial switch configuration
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
168 #if (CHIPSET == 12)
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
169 extern char ser_cfg_info[3];
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
170 #else
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
171 extern char ser_cfg_info[2];
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
172 #endif
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
173 #endif
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
174
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
175 #if(REL99 && FF_PRF)
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
176 T_TX_LEVEL *Cust_get_uplink_apc_power_reduction(UWORD8 band,
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
177 UWORD8 number_uplink_timeslot,
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
178 T_TX_LEVEL *p_tx_level);
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
179 #endif
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
180
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
181
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
182 void get_cal_from_nvmem (UWORD8 *ptr, UWORD16 len, UWORD8 id);
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
183 UWORD8 save_cal_in_nvmem (UWORD8 *ptr, UWORD16 len, UWORD8 id);
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
184 void config_rf_rw_band(char type, UWORD8 read);
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
185 void config_rf_read(char type);
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
186 void config_rf_write(char type);
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
187
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
188 #if (RF_FAM == 61)
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
189 #include "drp_api.h"
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
190
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
191 extern T_DRP_SW_DATA drp_sw_data_init;
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
192 extern T_DRP_SW_DATA drp_sw_data_calib;
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
193 extern T_DRP_SW_DATA drp_sw_data_calib_saved;
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
194 #endif
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
195
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
196 enum {
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
197 RF_ID = 0,
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
198 ADC_ID = 1
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
199 };
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
200
542
9dd6ca16f13d gsm-fw/L1/cust0: split between IRAM and XIP code
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents: 541
diff changeset
201 #if (L1_FF_MULTIBAND == 0) && !defined(RUN_INT_RAM)
517
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
202 /*-------------------------------------------------------*/
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
203 /* Parameters: none */
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
204 /* Return: none */
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
205 /* Functionality: Defines the location of rf-struct */
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
206 /* for each std. */
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
207 /*-------------------------------------------------------*/
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
208 //omaps00090550 #83 warinng removal
542
9dd6ca16f13d gsm-fw/L1/cust0: split between IRAM and XIP code
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents: 541
diff changeset
209 const T_BAND_CONFIG band_config[] =
517
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
210 { /*ffs name, default addr, max carrier, min tx pwr */
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
211 {"",(T_RF_BAND *) 0,0,0},//undefined
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
212 {"900", (T_RF_BAND *)&rf_900, 174, 19 },//EGSM
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
213 {"1800",(T_RF_BAND *)&rf_1800, 374, 15 },//DCS
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
214 {"1900",(T_RF_BAND *)&rf_1900, 299, 15 },//PCS
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
215 {"850", (T_RF_BAND *)&rf_850, 124, 19 },//GSM850
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
216 #if (RF_FAM == 10)
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
217 {"1900_us",(T_RF_BAND *)&rf_1900, 299, 15 },//usdual 1900 rf tables are the same as 3band 1900 rf tables at the moment
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
218 #endif
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
219 {"900", (T_RF_BAND *)&rf_900, 124, 19 } //GSM, this should be last entry
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
220 };
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
221
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
222 /*-------------------------------------------------------*/
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
223 /* Parameters: none */
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
224 /* Return: none */
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
225 /* Functionality: Defines the indices into band_config */
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
226 /* for each std. */
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
227 /*-------------------------------------------------------*/
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
228 const T_STD_CONFIG std_config[] =
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
229 {
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
230 /* band1 index, band2 index, txpwr turning point, first arfcn*/
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
231 { 0, 0, 0, 0 }, // std = 0 not used
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
232 { BAND_GSM900, BAND_NONE, 0, 1 }, // std = 1 GSM
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
233 { BAND_EGSM900, BAND_NONE, 0, 1 }, // std = 2 EGSM
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
234 { BAND_PCS1900, BAND_NONE, 21, 512 }, // std = 3 PCS
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
235 { BAND_DCS1800, BAND_NONE, 28, 512 }, // std = 4 DCS
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
236 { BAND_GSM900, BAND_DCS1800, 28, 1 }, // std = 5 DUAL
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
237 { BAND_EGSM900, BAND_DCS1800, 28, 1 }, // std = 6 DUALEXT
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
238 { BAND_GSM850, BAND_NONE, 0, 128 }, // std = 7 850
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
239 #if (RF_FAM == 10)
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
240 { BAND_GSM850, BAND_PCS1900_US, 21, 1 } // std = 8 850/1900
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
241 #else
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
242 { BAND_GSM850, BAND_PCS1900, 21, 1 } // std = 8 850/1900
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
243 #endif
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
244 };
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
245 #endif //if (L1_FF_MULTIBAND == 0)
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
246
542
9dd6ca16f13d gsm-fw/L1/cust0: split between IRAM and XIP code
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents: 541
diff changeset
247 #if (L1_FF_MULTIBAND == 0) && defined(RUN_INT_RAM)
9dd6ca16f13d gsm-fw/L1/cust0: split between IRAM and XIP code
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents: 541
diff changeset
248 extern const T_BAND_CONFIG band_config[];
9dd6ca16f13d gsm-fw/L1/cust0: split between IRAM and XIP code
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents: 541
diff changeset
249 extern const T_STD_CONFIG std_config[];
9dd6ca16f13d gsm-fw/L1/cust0: split between IRAM and XIP code
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents: 541
diff changeset
250 #endif
9dd6ca16f13d gsm-fw/L1/cust0: split between IRAM and XIP code
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents: 541
diff changeset
251
517
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
252 /*-------------------------------------------------------*/
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
253 /* Prototypes of external functions used in this file. */
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
254 /*-------------------------------------------------------*/
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
255 void l1_initialize(T_MMI_L1_CONFIG *mmi_l1_config);
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
256 #if (L1_FF_MULTIBAND == 0)
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
257 WORD16 Convert_l1_radio_freq (UWORD16 radio_freq);
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
258 #endif
542
9dd6ca16f13d gsm-fw/L1/cust0: split between IRAM and XIP code
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents: 541
diff changeset
259
9dd6ca16f13d gsm-fw/L1/cust0: split between IRAM and XIP code
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents: 541
diff changeset
260 #ifndef RUN_FLASH
517
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
261 /*-------------------------------------------------------*/
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
262 /* Cust_recover_Os() */
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
263 /*-------------------------------------------------------*/
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
264 /* */
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
265 /* Description: adjust OS from sleep duration */
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
266 /* ------------ */
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
267 /* This function fix the : */
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
268 /* - system clock */
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
269 /* - Nucleus timers */
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
270 /* - xxxxxx (customer dependant) */
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
271 /*-------------------------------------------------------*/
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
272
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
273 UWORD8 Cust_recover_Os(void)
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
274 {
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
275 #if (CODE_VERSION != SIMULATION)
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
276 if (l1_config.pwr_mngt == PWR_MNGT)
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
277 {
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
278 UWORD32 current_system_clock;
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
279
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
280 /***************************************************/
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
281 // Fix System clock and Nucleus Timers if any.... */
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
282 /***************************************************/
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
283 // Fix System clock ....
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
284 current_system_clock = NU_Retrieve_Clock();
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
285 current_system_clock += l1s.pw_mgr.sleep_duration;
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
286 NU_Set_Clock(current_system_clock);
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
287
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
288 // Fix Nucleus timer (if needed) ....
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
289 if (TMD_Timer_State == TM_ACTIVE)
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
290 {
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
291 TMD_Timer -= l1s.pw_mgr.sleep_duration;
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
292 if (!TMD_Timer) TMD_Timer_State = TM_EXPIRED;
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
293 }
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
294
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
295 /***************************************************/
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
296 // Cust dependant part ... */
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
297 /***************************************************/
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
298 //.............
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
299 //.............
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
300 //..............
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
301 return(TRUE);
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
302
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
303 }
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
304 #endif
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
305 return(TRUE); //omaps00090550
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
306 }
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
307
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
308
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
309
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
310 /*-------------------------------------------------------*/
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
311 /* Cust_check_system() */
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
312 /*-------------------------------------------------------*/
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
313 /* */
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
314 /* Description: */
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
315 /* ------------ */
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
316 /* GSM 1.5 : */
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
317 /* - authorize UWIRE clock to be stopped */
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
318 /* and write value in l1s.pw_mgr.modules_status. */
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
319 /* - authorize ARMIO clock to be stopped if the light is */
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
320 /* off and write value in l1s.pw_mgr.modules_status. */
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
321 /* - check if SIM clock have been stopped */
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
322 /* before allowing DEEP SLEEP. */
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
323 /* - check if UARTs are ready to enter deep sleep */
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
324 /* - choose the sleep mode */
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
325 /* */
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
326 /* Return: */
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
327 /* ------- */
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
328 /* DO_NOT_SLEEP, FRAME_STOP or CLOCK_STOP */
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
329 /*-------------------------------------------------------*/
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
330 UWORD8 Cust_check_system(void)
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
331 {
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
332
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
333 #if (CODE_VERSION != SIMULATION)
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
334 if (l1_config.pwr_mngt == PWR_MNGT)
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
335 {
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
336
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
337 #if (L2_L3_SIMUL == 0)
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
338 // Forbid deep sleep if the light is on
528
1affe428bf72 getting closer to compiling l1_cust.c
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents: 523
diff changeset
339 /* FreeCalypso change: this LT_Status() function is defunct */
1affe428bf72 getting closer to compiling l1_cust.c
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents: 523
diff changeset
340 #if 0
517
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
341 if(LT_Status())
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
342 {
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
343 //cut ARMIO and UWIRE clocks in big sleep
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
344 l1s.pw_mgr.modules_status = ARMIO_CLK_CUT | UWIRE_CLK_CUT ;
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
345 l1s.pw_mgr.why_big_sleep = BIG_SLEEP_DUE_TO_LIGHT_ON;
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
346 return(FRAME_STOP); // BIG sleep
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
347 }
528
1affe428bf72 getting closer to compiling l1_cust.c
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents: 523
diff changeset
348 #endif
517
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
349
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
350 #if (OP_L1_STANDALONE == 0)
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
351 // Forbid deep sleep if the camera is working
528
1affe428bf72 getting closer to compiling l1_cust.c
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents: 523
diff changeset
352 /* FreeCalypso change: no camera */
1affe428bf72 getting closer to compiling l1_cust.c
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents: 523
diff changeset
353 #if 0
517
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
354 if(!cama_sleep_status())
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
355 {
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
356 l1s.pw_mgr.why_big_sleep = BIG_SLEEP_DUE_TO_CAMERA;
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
357 return(FRAME_STOP); // BIG sleep
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
358 }
528
1affe428bf72 getting closer to compiling l1_cust.c
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents: 523
diff changeset
359 #endif
517
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
360
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
361 // Forbid deep sleep if the SIM and UARTs not ready
528
1affe428bf72 getting closer to compiling l1_cust.c
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents: 523
diff changeset
362 // FC note: this call to SIM_SleepStatus() *is* present in the Leonardo object
647
a60b375014e3 gsm-fw/L1/cust0/l1_cust.c: s/CONFIG_GSM/CONFIG_INCLUDE_SIM/
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents: 626
diff changeset
363 #if CONFIG_INCLUDE_SIM //(REQUIRED_FOR_ESAMPLE_LOCOSTO)
517
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
364 // Forbid deep sleep if the SIM and UARTs not ready
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
365 if(SIM_SleepStatus())
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
366 #endif
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
367 {
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
368 #endif
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
369 #endif
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
370 if(SER_UartSleepStatus())
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
371 {
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
372 return(CLOCK_STOP); // DEEP sleep
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
373 }
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
374 else l1s.pw_mgr.why_big_sleep = BIG_SLEEP_DUE_TO_UART;
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
375 #if (L2_L3_SIMUL == 0)
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
376 #if (OP_L1_STANDALONE == 0)
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
377 }
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
378 // Forbid deep sleep if the SIM and UARTs not ready
647
a60b375014e3 gsm-fw/L1/cust0/l1_cust.c: s/CONFIG_GSM/CONFIG_INCLUDE_SIM/
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents: 626
diff changeset
379 #if CONFIG_INCLUDE_SIM //(REQUIRED_FOR_ESAMPLE_LOCOSTO)
517
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
380 else l1s.pw_mgr.why_big_sleep = BIG_SLEEP_DUE_TO_SIM;
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
381 #endif
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
382 #endif
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
383 #endif
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
384 // cut ARMIO and UWIRE clocks in big sleep
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
385 l1s.pw_mgr.modules_status = ARMIO_CLK_CUT | UWIRE_CLK_CUT ;
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
386 return(FRAME_STOP); // BIG sleep
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
387 }
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
388 #else // Simulation part
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
389 return(CLOCK_STOP); // DEEP sleep
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
390 #endif
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
391 return(CLOCK_STOP); // omaps00090550
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
392 }
542
9dd6ca16f13d gsm-fw/L1/cust0: split between IRAM and XIP code
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents: 541
diff changeset
393 #endif /* !RUN_FLASH */
517
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
394
542
9dd6ca16f13d gsm-fw/L1/cust0: split between IRAM and XIP code
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents: 541
diff changeset
395 #ifndef RUN_INT_RAM
517
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
396 /*-------------------------------------------------------*/
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
397 /* Parameters: none */
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
398 /* Return: none */
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
399 /* Functionality: Read the RF configuration, tables etc. */
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
400 /* from FFS files. */
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
401 /*-------------------------------------------------------*/
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
402 //omaps00090550 #83-d warnimg removal
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
403 static const T_CONFIG_FILE config_files_common[] =
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
404 {
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
405 #if (CODE_VERSION != SIMULATION)
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
406
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
407 // The first char is NOT part of the filename. It is used for
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
408 // categorizing the ffs file contents:
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
409 // f=rf-cal, F=rf-config,
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
410 // t=tx-cal, T=tx-config,
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
411 // r=rx-cal, R=rx-config,
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
412 // s=sys-cal, S=sys-config,
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
413 "f/gsm/rf/afcdac", &rf.afc.eeprom_afc, sizeof(rf.afc.eeprom_afc),
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
414 "F/gsm/rf/stdmap", &rf.radio_band_support, sizeof(rf.radio_band_support),
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
415 #if (VCXO_ALGO == 1)
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
416 "F/gsm/rf/afcparams", &rf.afc.psi_sta_inv, 4 * sizeof(UWORD32) + 4 * sizeof(WORD16),
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
417 #else
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
418 "F/gsm/rf/afcparams", &rf.afc.psi_sta_inv, 4 * sizeof(UWORD32),
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
419 #endif
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
420
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
421 "R/gsm/rf/rx/agcglobals", &rf.rx.agc, 4 * sizeof(UWORD16),
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
422 "R/gsm/rf/rx/il2agc", &rf.rx.agc.il2agc_pwr[0], 3 * sizeof(rf.rx.agc.il2agc_pwr),
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
423 "R/gsm/rf/rx/agcwords", &AGC_TABLE, sizeof(AGC_TABLE),
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
424
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
425 "s/sys/adccal", &adc_cal, sizeof(adc_cal),
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
426
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
427 "S/sys/abb", &abb, sizeof(abb),
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
428 "S/sys/uartswitch", &ser_cfg_info, sizeof(ser_cfg_info),
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
429
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
430 #if (RF_FAM ==61)
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
431 "S/sys/drp_wrapper", & drp_wrapper, sizeof(drp_wrapper),
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
432 #if (DRP_FW_EXT == 0)
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
433 "S/sys/drp_calibration", & drp_sw_data_calib, sizeof(drp_sw_data_calib),
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
434 #endif
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
435 #endif
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
436
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
437 #endif
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
438 NULL, 0, 0 // terminator
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
439 };
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
440
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
441 /*-------------------------------------------------------*/
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
442 /* Parameters: none */
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
443 /* Return: none */
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
444 /* Functionality: Read the RF configurations for */
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
445 /* each band from FFS files. These files */
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
446 /* are defined for one band, and and used */
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
447 /* for all bands. */
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
448 /*-------------------------------------------------------*/
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
449 //omaps00090550 #83 warning removal
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
450 static const T_CONFIG_FILE config_files_band[] =
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
451 {
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
452 // The first char is NOT part of the filename. It is used for
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
453 // categorizing the ffs file contents:
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
454 // f=rf-cal, F=rf-config,
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
455 // t=tx-cal, T=tx-config,
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
456 // r=rx-cal, R=rx-config,
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
457 // s=sys-cal, S=sys-config,
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
458
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
459 // generic for all bands
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
460 // band[0] is used as template for all bands.
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
461 "t/gsm/rf/tx/ramps", &rf_band[0].tx.ramp_tables, sizeof(rf_band[0].tx.ramp_tables),
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
462 "t/gsm/rf/tx/levels", &rf_band[0].tx.levels, sizeof(rf_band[0].tx.levels),
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
463 "t/gsm/rf/tx/calchan", &rf_band[0].tx.chan_cal_table, sizeof(rf_band[0].tx.chan_cal_table),
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
464 "T/gsm/rf/tx/caltemp", &rf_band[0].tx.temp, sizeof(rf_band[0].tx.temp),
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
465
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
466 "r/gsm/rf/rx/calchan", &rf_band[0].rx.agc_bands, sizeof(rf_band[0].rx.agc_bands),
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
467 "R/gsm/rf/rx/caltemp", &rf_band[0].rx.temp, sizeof(rf_band[0].rx.temp),
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
468 "r/gsm/rf/rx/agcparams", &rf_band[0].rx.rx_cal_params, sizeof(rf_band[0].rx.rx_cal_params),
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
469 NULL, 0, 0 // terminator
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
470 };
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
471
890
452a4aea3fc5 gsm-fw: implemented reading of Pirelli's factory calibration records
Space Falcon <falcon@ivan.Harhan.ORG>
parents: 647
diff changeset
472 #if CONFIG_TARGET_PIRELLI
452a4aea3fc5 gsm-fw: implemented reading of Pirelli's factory calibration records
Space Falcon <falcon@ivan.Harhan.ORG>
parents: 647
diff changeset
473 extern int pirelli_cal_fread(const char *name, void *userbuf, T_FFS_SIZE size);
452a4aea3fc5 gsm-fw: implemented reading of Pirelli's factory calibration records
Space Falcon <falcon@ivan.Harhan.ORG>
parents: 647
diff changeset
474 #define cal_fread pirelli_cal_fread
452a4aea3fc5 gsm-fw: implemented reading of Pirelli's factory calibration records
Space Falcon <falcon@ivan.Harhan.ORG>
parents: 647
diff changeset
475 #else
452a4aea3fc5 gsm-fw: implemented reading of Pirelli's factory calibration records
Space Falcon <falcon@ivan.Harhan.ORG>
parents: 647
diff changeset
476 #define cal_fread ffs_file_read
452a4aea3fc5 gsm-fw: implemented reading of Pirelli's factory calibration records
Space Falcon <falcon@ivan.Harhan.ORG>
parents: 647
diff changeset
477 #endif
452a4aea3fc5 gsm-fw: implemented reading of Pirelli's factory calibration records
Space Falcon <falcon@ivan.Harhan.ORG>
parents: 647
diff changeset
478
517
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
479 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
480 {
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
481 config_rf_read(type);
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
482 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
483 }
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
484
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
485 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
486 {
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
487 config_rf_write(type);
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
488 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
489 }
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
490
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
491 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
492 {
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
493 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
494
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
495 while (file->name != NULL)
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
496 {
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
497 if (type == '*' || type == file->name[0]) {
890
452a4aea3fc5 gsm-fw: implemented reading of Pirelli's factory calibration records
Space Falcon <falcon@ivan.Harhan.ORG>
parents: 647
diff changeset
498 cal_fread(&file->name[1], file->addr, file->size);
517
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 file++;
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 }
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
503
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
504 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
505 {
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
506 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
507
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
508 while (file->name != NULL)
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
509 {
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
510 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
511 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
512 }
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
513 file++;
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
514 }
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
515 }
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
516
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
517 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
518 {
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
519 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
520 UWORD8 i;
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
521 WORD32 offset;
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
522 char name[64];
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
523 char *p;
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
524 #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
525 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
526 #endif
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
527
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
528 #if FFS_WORKAROUND == 1
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
529 struct stat_s stat;
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
530 UWORD16 time;
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
531 #endif
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
532 #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
533 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
534 {
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
535 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
536 {
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
537 #else
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
538 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
539 {
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
540 #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
541 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
542 while (f1->name != NULL)
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
543 {
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
544 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
545 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
546 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
547 {
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
548 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
549 strcat(name, ".");
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
550 #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
551 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
552 #else
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
553 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
554 #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
555
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
556 if (read == 1)
890
452a4aea3fc5 gsm-fw: implemented reading of Pirelli's factory calibration records
Space Falcon <falcon@ivan.Harhan.ORG>
parents: 647
diff changeset
557 cal_fread(name, p, f1->size);
517
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
558 else //write == 0
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
559 {
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
560 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
561
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
562 // 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
563 #if FFS_WORKAROUND == 1
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
564 stat.inode = 0;
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
565 time = 0;
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
566
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
567 do {
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
568 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
569 time += 10;
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
570 ffs_stat(name, &stat);
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
571 } 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
572 #endif
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
573 }
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
574 }
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
575 f1++;
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
576 }
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
577 }
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
578 #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
579 }
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
580 #endif
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
581 }
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
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
584 /*-------------------------------------------------------*/
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
585 /* Cust_init_std() */
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
586 /*-------------------------------------------------------*/
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
587 /* Parameters : */
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
588 /* Return : */
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
589 /* 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
590 /*-------------------------------------------------------*/
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
591 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
592 #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
593 {
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
594 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
595 UWORD8 band1, band2;
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
596 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
597
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
598 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
599 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
600
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
601 //get these from std
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
602 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
603 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
604
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
605 // 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
606 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
607
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
608 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
609 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
610
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
611 // 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
612 // 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
613
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
614 config_ffs_read('*');
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 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
617
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
618 if(band2!=0)
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
619 l1_config.std.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
620 else
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
621 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
622
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
623 // 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
624 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
625 if(band2!=0)
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
626 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
627
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
628 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
629 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
630 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
631 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
632 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
633
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
634 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
635 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
636 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
637 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
638 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
639
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
640 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
641 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
642 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
643 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
644 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
645
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
646 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
647
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
648 // 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
649 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
650
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
651 //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
652 // on a need basis ?
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
653 }
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
654 #else
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
655 {
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
656 UWORD8 i;
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 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
659 {
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
660 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
661 {
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
662 case RF_GSM900:
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
663 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
664 break;
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
665 case RF_GSM850:
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
666 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
667 break;
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
668 case RF_DCS1800:
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
669 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
670 break;
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
671 case RF_PCS1900:
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
672 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
673 break;
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
674 default:
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
675 break;
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
676 }
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
677 }
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
678 config_ffs_read('*');
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
679 }
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
680 #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
681
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
682
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
683 /*-------------------------------------------------------*/
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
684 /* Cust_init_params() */
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 /* Parameters : */
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
687 /* Return : */
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
688 /* 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
689 /*-------------------------------------------------------*/
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
690 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
691 {
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 #if (CODE_VERSION==SIMULATION)
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
694 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
695 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
696
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
697 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
698 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
699 #else
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
700 l1_config.params.rx_synth_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
701 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
702 #endif
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
703
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 // 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
706 // 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
707 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
708 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
709
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
710 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
711 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
712
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
713 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
714 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
715
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
716 l1_config.params.tx_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
717 TA_MAX -
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
718 l1_config.params.tx_synth_setup_time -
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
719 EPSILON_OFFS;
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
720
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
721 // 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
722 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
723 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
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.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
726 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
727
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
728 // 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
729 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
730 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
731
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
732 // 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
733 // 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
734 // 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
735 // 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
736 // 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
737 // ---------
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
738 // Total: 3 qbit
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
739
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
740 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
741 #if (CODE_VERSION == SIMULATION)
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
742 // 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
743 1 -
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
744 #else
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
745 // 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
746 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
747 #endif
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
748 EPSILON_SYNC -
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
749 TPU_SLEEP_LOAD -
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
750 SERV_OFFS_REST_LOAD -
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
751 FB26_ACQUIS_DURATION -
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
752 PROVISION_TIME +
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
753 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
754
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
755 l1_config.params.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
756 PROVISION_TIME -
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
757 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
758 EPSILON_OFFS;
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
759
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
760 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
761
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
762 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
763 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
764
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
765 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
766 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
767 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
768 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
769 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
770
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
771 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
772 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
773 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
774 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
775
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
776 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
777 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
778 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
779 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
780
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
781 #if (CODE_VERSION == SIMULATION)
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
782 #if (VCXO_ALGO == 1)
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
783 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
784 #endif
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
785 #else
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
786 #if (VCXO_ALGO == 1)
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
787 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
788 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
789 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
790 #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
791 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
792 #else
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
793 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
794 #endif /* NEW_SNR_THRESHOLD */
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
795 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
796 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
797 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
798 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
799 #endif
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
800 #endif
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
801
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
802 #if DCO_ALGO
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
803 #if (RF_FAM == 10)
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
804 // 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
805 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
806 #else
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
807 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
808 #endif
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
809 #endif
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
810
528
1affe428bf72 getting closer to compiling l1_cust.c
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents: 523
diff changeset
811 #if (ANALOG == 1)
517
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
812 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
813 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
814 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
815 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
816 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
817 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
818 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
819 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
820 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
821 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
822 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
823 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
824 #endif
528
1affe428bf72 getting closer to compiling l1_cust.c
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents: 523
diff changeset
825 #if (ANALOG == 2)
517
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
826 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
827 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
828 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
829 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
830 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
831 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
832 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
833 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
834 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
835 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
836 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
837 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
838 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
839 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
840 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
841 #endif
528
1affe428bf72 getting closer to compiling l1_cust.c
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents: 523
diff changeset
842 #if (ANALOG == 3)
517
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
843 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
844 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
845 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
846 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
847 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
848 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
849 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
850 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
851 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
852 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
853 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
854 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
855 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
856 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
857 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
858 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
859 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
860 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
861 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
862 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
863 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
864 #endif
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
865
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
866 #if (RF_FAM == 61)
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
867 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
868 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
869 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
870 #endif
528
1affe428bf72 getting closer to compiling l1_cust.c
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents: 523
diff changeset
871 #if (ANALOG == 11)
517
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
872 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
873 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
874 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
875 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
876 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
877 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
878 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
879 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
880 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
881 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
882 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
883 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
884 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
885 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
886 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
887 #endif
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
888 }
542
9dd6ca16f13d gsm-fw/L1/cust0: split between IRAM and XIP code
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents: 541
diff changeset
889 #endif /* !RUN_INT_RAM */
517
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
890
542
9dd6ca16f13d gsm-fw/L1/cust0: split between IRAM and XIP code
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents: 541
diff changeset
891 #ifndef RUN_FLASH
517
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 /* Automatic Gain Control */
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
894 /************************************/
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
895
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
896 /*-------------------------------------------------------*/
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
897 /* 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
898 /*-------------------------------------------------------*/
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
899 /* Parameters : */
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
900 /* Return : */
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
901 /* Functionality : returns agc value */
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
902 /*-------------------------------------------------------*/
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
903 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
904 {
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 UWORD16 agc_index_temp;
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 // 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
909 // 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
910 // (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
911
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
912 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
913 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
914 if (agc_index > 120)
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
915 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
916
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
917 switch (table_id)
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 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
920 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
921 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
922 }
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
923 return (0);//omaps00090550
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
924 }
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
925
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
926 /*-------------------------------------------------------*/
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
927 /* Cust_get_agc_band */
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
928 /*-------------------------------------------------------*/
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
929 /* Parameters : radio_freq */
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
930 /* Return : band number */
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
931 /* 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
932 /*-------------------------------------------------------*/
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
933 /*---------------------------------------------*/
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
934
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
935 #if (CODE_VERSION == SIMULATION)
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
936 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
937 #else
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
938 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
939 #endif
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 // WORD32 i =0 ; //omaps00090550
528
1affe428bf72 getting closer to compiling l1_cust.c
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents: 523
diff changeset
942 UWORD8 band_number;
517
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
943
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
944 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
945 {
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
946 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
947 return(band_number);
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 // Should never happen!
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
950 return(0);
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
951 }
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
952
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
953 #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
954 /*-------------------------------------------------------*/
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
955 /* Cust_is_band_high */
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
956 /*-------------------------------------------------------*/
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
957 /* Parameters : arfcn */
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
958 /* 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
959 /* 1 if high band */
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
960 /* 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
961 /* 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
962 /*-------------------------------------------------------*/
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
963
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
964 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
965 {
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
966 UWORD16 max_carrier;
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
967 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
968
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
969 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
970
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
971 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
972 (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
973 }
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
974 #endif
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 /*-------------------------------------------------------*/
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
977 /* l1ctl_encode_delta2() */
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 /* Parameters : */
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
980 /* Return : */
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
981 /* Functionality : */
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
982 /*-------------------------------------------------------*/
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
983 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
984 {
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
985 WORD8 delta2_freq;
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
986 UWORD16 i;
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
987 UWORD16 arfcn;
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
988 #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
989 UWORD8 band;
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
990
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
991 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
992 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
993 #else
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
994 WORD8 band;
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
995 // 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
996 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
997 #endif
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
998
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
999 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
1000 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
1001
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1002 //temperature compensation
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1003 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
1004 {
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1005 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
1006 {
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1007 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
1008 break;
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 }
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 return(delta2_freq);
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1013 }
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1014
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1015 #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
1016 #else
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 /* l1ctl_get_g_magic() */
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 /* Parameters : */
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1021 /* Return : */
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1022 /* Functionality : */
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1023 /*-------------------------------------------------------*/
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1024 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
1025 {
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1026 // 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
1027 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
1028 }
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1029
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 /* l1ctl_get_lna_att() */
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 /* Parameters : */
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1035 /* Return : */
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1036 /* Functionality : */
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1037 /*-------------------------------------------------------*/
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1038 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
1039 {
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1040 // 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
1041 // 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
1042 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
1043 // 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
1044 }
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1045 /*-------------------------------------------------------*/
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1046 /* l1ctl_encode_delta1() */
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1047 /*-------------------------------------------------------*/
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1048 /* Parameters : */
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1049 /* Return : */
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1050 /* Functionality : */
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 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
1053 {
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1054 return 0;
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 /* l1ctl_encode_lna() */
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1058 /*-------------------------------------------------------*/
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1059 /* Parameters : */
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1060 /* Return : */
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1061 /* Functionality : */
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 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
1064 UWORD8 *lna_state,
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1065 UWORD16 radio_freq)
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1066 {
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 /*** 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
1069
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 On|---<>----+-------+
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1072 | | |
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1073 LNA | | |
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1074 | ^ v
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1075 | | |
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1076 | | |
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1077 Off| +-------+----<>-----
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1078 +--------------------------------
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1079 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
1080 THR_HIGH THR_LOW ***/
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1081 WORD8 band;
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1082 // 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
1083 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
1084 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
1085 {
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1086 *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
1087 }
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1088 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
1089 {
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1090 *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
1091 }
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1092 }
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1093
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1094 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
1095 {
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1096 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
1097 }
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1098
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1099 #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
1100
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1101 /************************************/
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1102 /* TX Management */
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1103 /************************************/
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1104 /*-------------------------------------------------------*/
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1105 /* Cust_get_ramp_tab */
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 /* Parameters : */
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1108 /* Return : */
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1109 /* Functionality :
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1110 Notes:
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1111 Cal+
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1112 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
1113 Locosto:
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1114 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
1115
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1116 */
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 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
1120 {
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1121 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
1122 #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
1123 UWORD8 band;
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1124
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1125 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
1126 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
1127 #else
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1128 WORD8 band;
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1129 // 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
1130 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
1131 #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
1132
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1133 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
1134 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
1135
528
1affe428bf72 getting closer to compiling l1_cust.c
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents: 523
diff changeset
1136 #if ((ANALOG == 1) || (ANALOG == 2) || (ANALOG == 3))
517
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1137 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
1138 {
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1139 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
1140 ((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
1141 0x14;
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1142 }
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1143 #endif
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1144
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1145 #if (RF_FAM == 61)
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1146 // 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
1147 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
1148 {
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1149 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
1150 ((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
1151 }
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1152 #endif
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1153 }
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1154
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1155 /*-------------------------------------------------------*/
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1156 /* get_pwr_data */
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1157 /*-------------------------------------------------------*/
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1158 /* Parameters : */
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1159 /* Return : */
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1160 /* Functionality : */
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1161 /*-------------------------------------------------------*/
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1162
528
1affe428bf72 getting closer to compiling l1_cust.c
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents: 523
diff changeset
1163 #if ((ANALOG == 1) || (ANALOG == 2) || (ANALOG == 3) || (RF_FAM == 61))
517
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1164 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
1165 #if (REL99 && FF_PRF)
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1166 , UWORD8 number_uplink_timeslot
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1167 #endif
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1168 )
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1169 {
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1170
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1171 UWORD16 i,j;
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1172 UWORD16 arfcn;
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1173
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1174 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
1175
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1176 #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
1177 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
1178 #endif
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1179
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1180 #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
1181 WORD16 pwr_data;
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1182 #else
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1183 UWORD16 pwr_data;
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1184 #endif
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 #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
1187 UWORD8 band;
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1188 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
1189 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
1190 #else
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1191 WORD8 band;
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1192 // 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
1193 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
1194 #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
1195
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1196 // 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
1197 // 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
1198
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1199 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
1200
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1201 #if REL99
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1202 #if FF_PRF
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1203 // 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
1204 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
1205 #endif
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1206 #endif
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 // get uncalibrated apc
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1209 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
1210
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1211 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
1212 j=0;
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1213
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1214 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
1215 j++;
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 // channel calibrate apc
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1218 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
1219
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1220 // temperature compensate apc
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 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
1223
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1224 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
1225 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
1226 pt++;
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1227 #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
1228 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
1229 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
1230 #else
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1231 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
1232 #endif
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1233 }
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1234
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1235 // Vbat compensate apc
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1236 #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
1237
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1238 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
1239 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
1240
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1241 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
1242 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
1243
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1244 // 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
1245 // 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
1246
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1247 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
1248 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
1249 #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
1250
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1251 return(pwr_data);
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 #endif
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
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1256 #if(REL99 && FF_PRF)
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1257
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 /* 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
1260 /*-------------------------------------------------------*/
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1261 /* Parameters : */
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1262 /* - frenquency band */
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1263 /* - modulation type */
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1264 /* - number of uplink timeslot */
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1265 /* - 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
1266 /* Return : */
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1267 /* - 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
1268 /* */
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1269 /* 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
1270 /* 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
1271 /* reduction processing. */
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1272 /* 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
1273 /* 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
1274 /* 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
1275 /* 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
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 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
1279 UWORD8 number_uplink_timeslot,
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1280 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
1281 {
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1282 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
1283
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1284 #if TESTMODE
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1285 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
1286 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
1287 #endif
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1288
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1289 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
1290 {
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1291 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
1292 }
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1293 else
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1294 {
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1295 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
1296 }
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1297
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1298 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
1299
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1300 // 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
1301 #if (CODE_VERSION != SIMULATION)
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1302 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
1303 #else
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1304 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
1305 #endif
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1306 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
1307 else
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1308 return p_tx_level;
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1309 }
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1310
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1311 #endif
542
9dd6ca16f13d gsm-fw/L1/cust0: split between IRAM and XIP code
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents: 541
diff changeset
1312 #endif /* !RUN_FLASH */
517
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1313
542
9dd6ca16f13d gsm-fw/L1/cust0: split between IRAM and XIP code
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents: 541
diff changeset
1314 #ifndef RUN_INT_RAM
517
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1315 /*-------------------------------------------------------*/
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1316 /* Cust_Init_Layer1 */
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 /* Parameters : */
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1319 /* Return : */
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1320 /* 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
1321 /* 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
1322 /*-------------------------------------------------------*/
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 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
1325 {
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1326 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
1327
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1328 // 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
1329 #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
1330 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
1331 cfg.std = ffs_GetBand();
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1332 #else // NO OP_WCP
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1333 // cfg.std = std;
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1334 cfg.std = STD;
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1335 #endif // OP_WCP
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 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
1338
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1339 // sleep management configuration
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1340
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1341 #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
1342 cfg.pwr_mngt = 0;
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1343 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
1344 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
1345 #endif
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1346 #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
1347 cfg.pwr_mngt = 1;
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1348 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
1349 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
1350 #endif
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1351
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1352 #if (CODE_VERSION != SIMULATION)
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1353 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
1354 #endif
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1355
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1356 l1_initialize(&cfg);
626
d1df7544f102 L1: reverting malicious LoCosto change that disables all useful L1 traces
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents: 561
diff changeset
1357
d1df7544f102 L1: reverting malicious LoCosto change that disables all useful L1 traces
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents: 561
diff changeset
1358 /*
d1df7544f102 L1: reverting malicious LoCosto change that disables all useful L1 traces
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents: 561
diff changeset
1359 * The following conditioned-out line appears in the LoCosto version,
d1df7544f102 L1: reverting malicious LoCosto change that disables all useful L1 traces
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents: 561
diff changeset
1360 * but not in the Leonardo binary object. Investigation has revealed
d1df7544f102 L1: reverting malicious LoCosto change that disables all useful L1 traces
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents: 561
diff changeset
1361 * that the change is malicious: it disables ALL useful L1 traces.
d1df7544f102 L1: reverting malicious LoCosto change that disables all useful L1 traces
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents: 561
diff changeset
1362 */
d1df7544f102 L1: reverting malicious LoCosto change that disables all useful L1 traces
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents: 561
diff changeset
1363 #if 0
517
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1364 //add below line for CSR 174476
528
1affe428bf72 getting closer to compiling l1_cust.c
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents: 523
diff changeset
1365 trace_info.current_config->l1_dyn_trace = 0; //disable L1 trace after L1 init
626
d1df7544f102 L1: reverting malicious LoCosto change that disables all useful L1 traces
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents: 561
diff changeset
1366 #endif
517
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1367
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1368 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
1369 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
1370
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1371 }
542
9dd6ca16f13d gsm-fw/L1/cust0: split between IRAM and XIP code
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents: 541
diff changeset
1372 #endif /* !RUN_INT_RAM */
517
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1373
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 /*************************** TESTMODE functions **********************************/
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1376 /*****************************************************************************************/
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
542
9dd6ca16f13d gsm-fw/L1/cust0: split between IRAM and XIP code
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents: 541
diff changeset
1379 #ifndef RUN_FLASH
517
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 /* madc_hex_2_physical */
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 /* Parameters : */
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1384 /* Return : */
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1385 /* 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
1386 /* values into physical values */
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1387 /*------------------------------------------------------*/
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1388
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1389 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
1390 {
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1391 WORD16 i;
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1392 UWORD16 y;
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1393 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
1394 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
1395
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1396 //store raw ADC values
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1397 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
1398
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1399 // 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
1400 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
1401 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
1402
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1403 /*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
1404 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
1405 while((Smax-Smin) > 1 )
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1406 {
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1407 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
1408 Smax=index;
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1409 else
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1410 Smin=index;
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1411
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1412 index = (Smax+Smin)/2;
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 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
1415
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1416 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
1417 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
1418
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1419 //store converted ADC values
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1420 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
1421 }
542
9dd6ca16f13d gsm-fw/L1/cust0: split between IRAM and XIP code
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents: 541
diff changeset
1422 #endif /* !RUN_FLASH */
517
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1423
542
9dd6ca16f13d gsm-fw/L1/cust0: split between IRAM and XIP code
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents: 541
diff changeset
1424 #ifndef RUN_INT_RAM
517
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1425 /*------------------------------------------------------*/
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1426 /* get_cal_from_nvmem */
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1427 /*------------------------------------------------------*/
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1428 /* Parameters : */
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1429 /* Return : */
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1430 /* 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
1431 /* calibration structure in RAM */
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 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
1435 {
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1436
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
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1439 /*------------------------------------------------------*/
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1440 /* save_cal_from_nvmem */
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1441 /*------------------------------------------------------*/
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1442 /* Parameters : */
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1443 /* Return : */
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1444 /* 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
1445 /* into NV memory */
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
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1448 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
1449 {
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1450 return (0);
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1451 }
542
9dd6ca16f13d gsm-fw/L1/cust0: split between IRAM and XIP code
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents: 541
diff changeset
1452 #endif /* !RUN_INT_RAM */
517
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1453
542
9dd6ca16f13d gsm-fw/L1/cust0: split between IRAM and XIP code
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents: 541
diff changeset
1454 #if (TRACE_TYPE == 4) && !defined(RUN_FLASH)
517
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1455
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1456 /*------------------------------------------------------*/
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1457 /* l1_cst_l1_parameters */
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1458 /*------------------------------------------------------*/
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1459 /* 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
1460 /* 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
1461 /* 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
1462 /* and configuration */
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 /* 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
1465 /* from the Condat Panel. */
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 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
1468 {
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1469 /*
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1470 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
1471 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
1472 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
1473 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
1474 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
1475 */
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1476
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1477 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
1478 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
1479 UWORD8 uIndex = 0;
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1480
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1481 /* *** retrieve all parameters *** */
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1482 while (s[uIndex] != '<') uIndex++;
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1483 uIndex++;
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1484 aParam[0] = 0;
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1485
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1486 /* 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
1487
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1488 while (s[uIndex] != '>')
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 if (s[uIndex] == ',')
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1491 {
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1492 uNParams++;
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1493 aParam[uNParams] = 0;
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1494 }
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1495 else
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1496 {
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1497 /* 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
1498 UWORD8 uChar = s[uIndex];
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1499 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
1500 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
1501 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
1502 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
1503 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
1504 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
1505 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
1506 }
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1507
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1508 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
1509 }
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1510
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1511 /* increment number of params */
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1512 uNParams++;
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1513
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1514 /* *** handle parameters *** */
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1515 /*
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1516 1st param: command type
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1517 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
1518 */
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1519 switch (aParam[0])
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1520 {
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1521 case 0: /* Trace setting */
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1522 /* 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
1523 if (uNParams >=2)
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1524 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
1525 else
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1526 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
1527 Trace_dyn_trace_change();
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1528 break;
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1529 default: /* ignore it */
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1530 break;
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1531 } // switch
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1532 }
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 #endif
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 #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
1537 (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
1538 (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
1539 (CHIPSET == 11) || (CHIPSET == 12))
542
9dd6ca16f13d gsm-fw/L1/cust0: split between IRAM and XIP code
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents: 541
diff changeset
1540 #ifndef RUN_FLASH
517
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1541 /*-------------------------------------------------------*/
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1542 /* 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
1543 /*-------------------------------------------------------*/
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1544 /* 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
1545 /* 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
1546 /* Return : */
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1547 /* 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
1548 /* 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
1549 /* 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
1550 /*-------------------------------------------------------*/
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1551 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
1552 {
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1553 #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
1554 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
1555 #endif
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1556 {
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1557 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
1558 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
1559 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
1560 }
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1561
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1562 #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
1563 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
1564 #endif
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 #endif
542
9dd6ca16f13d gsm-fw/L1/cust0: split between IRAM and XIP code
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents: 541
diff changeset
1567 #endif