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
473328a0
Commit
473328a0
authored
Mar 07, 2022
by
Florian Kaltenberger
Committed by
Robert Schmidt
Mar 07, 2022
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add support for USRP X400
parent
a981291b
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
40 additions
and
15 deletions
+40
-15
targets/ARCH/COMMON/common_lib.h
targets/ARCH/COMMON/common_lib.h
+2
-0
targets/ARCH/USRP/USERSPACE/LIB/usrp_lib.cpp
targets/ARCH/USRP/USERSPACE/LIB/usrp_lib.cpp
+38
-15
No files found.
targets/ARCH/COMMON/common_lib.h
View file @
473328a0
...
...
@@ -92,6 +92,8 @@ typedef enum {
USRP_X300_DEV
,
/*!\brief device is USRP N300/N310*/
USRP_N300_DEV
,
/*!\brief device is USRP X400/X410*/
USRP_X400_DEV
,
/*!\brief device is BLADE RF*/
BLADERF_DEV
,
/*!\brief device is LMSSDR (SoDeRa)*/
...
...
targets/ARCH/USRP/USERSPACE/LIB/usrp_lib.cpp
View file @
473328a0
...
...
@@ -273,6 +273,7 @@ static int sync_to_gps(openair0_device *device) {
static
int
trx_usrp_start
(
openair0_device
*
device
)
{
usrp_state_t
*
s
=
(
usrp_state_t
*
)
device
->
priv
;
if
(
device
->
type
!=
USRP_X400_DEV
)
{
// setup GPIO for TDD, GPIO(4) = ATR_RX
//set data direction register (DDR) to output
s
->
usrp
->
set_gpio_attr
(
"FP0"
,
"DDR"
,
0xfff
,
0xfff
);
...
...
@@ -285,6 +286,7 @@ static int trx_usrp_start(openair0_device *device) {
s
->
usrp
->
set_gpio_attr
(
"FP0"
,
"ATR_XX"
,
(
1
<<
5
),
0x7f
);
// set the output pins to 1
s
->
usrp
->
set_gpio_attr
(
"FP0"
,
"OUT"
,
7
<<
7
,
0xf80
);
}
s
->
wait_for_first_pps
=
1
;
s
->
rx_count
=
0
;
...
...
@@ -847,7 +849,7 @@ rx_gain_calib_table_t calib_table_x310[] = {
{
-
1
,
0
}
};
/*! \brief USRP
B210
RX calibration table */
/*! \brief USRP
n3xf
RX calibration table */
rx_gain_calib_table_t
calib_table_n310
[]
=
{
{
3500000000.0
,
0.0
},
{
2660000000.0
,
0.0
},
...
...
@@ -857,6 +859,16 @@ rx_gain_calib_table_t calib_table_n310[] = {
{
-
1
,
0
}
};
/*! \brief Empty RX calibration table */
rx_gain_calib_table_t
calib_table_none
[]
=
{
{
3500000000.0
,
0.0
},
{
2660000000.0
,
0.0
},
{
2300000000.0
,
0.0
},
{
1880000000.0
,
0.0
},
{
816000000.0
,
0.0
},
{
-
1
,
0
}
};
/*! \brief Set RX gain offset
* \param openair0_cfg RF frontend parameters set by application
...
...
@@ -1011,7 +1023,6 @@ extern "C" {
device
->
type
=
USRP_N300_DEV
;
usrp_master_clock
=
122.88e6
;
args
+=
boost
::
str
(
boost
::
format
(
",master_clock_rate=%f"
)
%
usrp_master_clock
);
//args += ", send_buff_size=33554432";
}
if
(
device_adds
[
0
].
get
(
"type"
)
==
"x300"
)
{
...
...
@@ -1025,6 +1036,13 @@ extern "C" {
LOG_W
(
HW
,
"Can't set kernel parameters for X3xx
\n
"
);
}
if
(
device_adds
[
0
].
get
(
"type"
)
==
"x4xx"
)
{
printf
(
"Found USRP x400
\n
"
);
device
->
type
=
USRP_X400_DEV
;
usrp_master_clock
=
245.76e6
;
args
+=
boost
::
str
(
boost
::
format
(
",master_clock_rate=%f"
)
%
usrp_master_clock
);
}
s
->
usrp
=
uhd
::
usrp
::
multi_usrp
::
make
(
args
);
if
(
args
.
find
(
"clock_source"
)
==
std
::
string
::
npos
)
{
...
...
@@ -1103,8 +1121,13 @@ extern "C" {
std
::
cerr
<<
"-- Using calibration table: calib_table_n310"
<<
std
::
endl
;
}
if
(
device
->
type
==
USRP_X400_DEV
)
{
openair0_cfg
[
0
].
rx_gain_calib_table
=
calib_table_none
;
std
::
cerr
<<
"-- Using calibration table: calib_table_none"
<<
std
::
endl
;
}
if
(
device
->
type
==
USRP_N300_DEV
||
device
->
type
==
USRP_X300_DEV
)
{
if
(
device
->
type
==
USRP_N300_DEV
||
device
->
type
==
USRP_X300_DEV
||
device
->
type
==
USRP_X400_DEV
)
{
LOG_I
(
HW
,
"%s() sample_rate:%u
\n
"
,
__FUNCTION__
,
(
int
)
openair0_cfg
[
0
].
sample_rate
);
switch
((
int
)
openair0_cfg
[
0
].
sample_rate
)
{
...
...
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