Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
O
OpenXG-RAN
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
zzha zzha
OpenXG-RAN
Commits
456572c9
Commit
456572c9
authored
Jun 27, 2016
by
Raymond Knopp
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ExMIMO2 RX gain calibration
parent
19922715
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
29 additions
and
1 deletion
+29
-1
targets/ARCH/EXMIMO/USERSPACE/LIB/openair0_lib.c
targets/ARCH/EXMIMO/USERSPACE/LIB/openair0_lib.c
+29
-1
No files found.
targets/ARCH/EXMIMO/USERSPACE/LIB/openair0_lib.c
View file @
456572c9
...
@@ -670,6 +670,13 @@ int device_init(openair0_device *device, openair0_config_t *openair0_cfg) {
...
@@ -670,6 +670,13 @@ int device_init(openair0_device *device, openair0_config_t *openair0_cfg) {
return
(
0
);
return
(
0
);
}
}
unsigned
int
rxg_max
[
4
]
=
{
128
,
128
,
128
,
126
};
unsigned
int
rxg_med
[
4
]
=
{
122
,
123
,
123
,
120
};
unsigned
int
rxg_byp
[
4
]
=
{
116
,
117
,
116
,
116
};
unsigned
int
nf_max
[
4
]
=
{
7
,
9
,
16
,
12
};
unsigned
int
nf_med
[
4
]
=
{
12
,
13
,
22
,
17
};
unsigned
int
nf_byp
[
4
]
=
{
15
,
20
,
29
,
23
};
int
openair0_config
(
openair0_config_t
*
openair0_cfg
,
int
UE_flag
)
int
openair0_config
(
openair0_config_t
*
openair0_cfg
,
int
UE_flag
)
{
{
int
ret
;
int
ret
;
...
@@ -760,21 +767,42 @@ int openair0_config(openair0_config_t *openair0_cfg, int UE_flag)
...
@@ -760,21 +767,42 @@ int openair0_config(openair0_config_t *openair0_cfg, int UE_flag)
p_exmimo_config
->
rf
.
rf_mode
[
ant
]
+=
(
RXEN
+
DMAMODE_RX
+
RXLPFNORM
+
RXLPFEN
+
rx_filter
);
p_exmimo_config
->
rf
.
rf_mode
[
ant
]
+=
(
RXEN
+
DMAMODE_RX
+
RXLPFNORM
+
RXLPFEN
+
rx_filter
);
p_exmimo_config
->
rf
.
rf_freq_rx
[
ant
]
=
(
unsigned
int
)
openair0_cfg
[
card
].
rx_freq
[
ant
];
p_exmimo_config
->
rf
.
rf_freq_rx
[
ant
]
=
(
unsigned
int
)
openair0_cfg
[
card
].
rx_freq
[
ant
];
p_exmimo_config
->
rf
.
rx_gain
[
ant
][
0
]
=
(
unsigned
int
)
openair0_cfg
[
card
].
rx_gain
[
ant
];
printf
(
"openair0 : programming card %d RX antenna %d (freq %u, gain %d)
\n
"
,
card
,
ant
,
p_exmimo_config
->
rf
.
rf_freq_rx
[
ant
],
p_exmimo_config
->
rf
.
rx_gain
[
ant
][
0
]);
printf
(
"openair0 : programming card %d RX antenna %d (freq %u, gain %d)
\n
"
,
card
,
ant
,
p_exmimo_config
->
rf
.
rf_freq_rx
[
ant
],
p_exmimo_config
->
rf
.
rx_gain
[
ant
][
0
]);
switch
(
openair0_cfg
[
card
].
rxg_mode
[
ant
])
{
switch
(
openair0_cfg
[
card
].
rxg_mode
[
ant
])
{
default:
default:
case
max_gain
:
case
max_gain
:
p_exmimo_config
->
rf
.
rf_mode
[
ant
]
+=
LNAMax
;
p_exmimo_config
->
rf
.
rf_mode
[
ant
]
+=
LNAMax
;
if
(
rxg_max
[
ant
]
>=
(
int
)
openair0_cfg
[
card
].
rx_gain
[
ant
])
{
p_exmimo_config
->
rf
.
rx_gain
[
ant
][
0
]
=
30
-
(
rxg_max
[
ant
]
-
(
int
)
openair0_cfg
[
card
].
rx_gain
[
ant
]);
//was measured at rxgain=30;
}
else
{
printf
(
"openair0: RX RF gain too high, reduce by %d dB
\n
"
,
(
int
)
openair0_cfg
[
card
].
rx_gain
[
ant
]
-
rxg_max
[
ant
]);
exit
(
-
1
);
}
break
;
break
;
case
med_gain
:
case
med_gain
:
p_exmimo_config
->
rf
.
rf_mode
[
ant
]
+=
LNAMed
;
p_exmimo_config
->
rf
.
rf_mode
[
ant
]
+=
LNAMed
;
if
(
rxg_med
[
ant
]
>=
(
int
)
openair0_cfg
[
card
].
rx_gain
[
ant
])
{
p_exmimo_config
->
rf
.
rx_gain
[
ant
][
0
]
=
30
-
(
rxg_med
[
ant
]
-
(
int
)
openair0_cfg
[
card
].
rx_gain
[
ant
]);
//was measured at rxgain=30;
}
else
{
printf
(
"openair0: RX RF gain too high, reduce by %d dB
\n
"
,
(
int
)
openair0_cfg
[
card
].
rx_gain
[
ant
]
-
rxg_med
[
ant
]);
exit
(
-
1
);
}
break
;
break
;
case
byp_gain
:
case
byp_gain
:
p_exmimo_config
->
rf
.
rf_mode
[
ant
]
+=
LNAByp
;
p_exmimo_config
->
rf
.
rf_mode
[
ant
]
+=
LNAByp
;
if
(
rxg_byp
[
ant
]
>=
(
int
)
openair0_cfg
[
card
].
rx_gain
[
ant
])
{
p_exmimo_config
->
rf
.
rx_gain
[
ant
][
0
]
=
30
-
(
rxg_byp
[
ant
]
-
(
int
)
openair0_cfg
[
card
].
rx_gain
[
ant
]);
//was measured at rxgain=30;
}
else
{
printf
(
"openair0: RX RF gain too high, reduce by %d dB
\n
"
,
(
int
)
openair0_cfg
[
card
].
rx_gain
[
ant
]
-
rxg_byp
[
ant
]);
exit
(
-
1
);
}
break
;
break
;
}
}
}
else
{
}
else
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment