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
alex037yang
OpenXG-RAN
Commits
02148c79
Commit
02148c79
authored
8 years ago
by
Raymond Knopp
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
refit for USRP (control of DSP cordic), no more trx_stop during synchronization
parent
afb60b85
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
41 additions
and
4 deletions
+41
-4
targets/ARCH/USRP/USERSPACE/LIB/usrp_lib.cpp
targets/ARCH/USRP/USERSPACE/LIB/usrp_lib.cpp
+40
-3
targets/RT/USER/lte-ue.c
targets/RT/USER/lte-ue.c
+1
-1
No files found.
targets/ARCH/USRP/USERSPACE/LIB/usrp_lib.cpp
View file @
02148c79
...
...
@@ -88,6 +88,12 @@ typedef struct
//! Sampling rate
double
sample_rate
;
//! rx RF frequency
double
rx_RFfreq
;
//! tx RF frequency
double
tx_RFfreq
;
//! time offset between transmiter timestamp and receiver timestamp;
double
tdiff
;
...
...
@@ -390,14 +396,45 @@ int trx_usrp_set_freq(openair0_device* device, openair0_config_t *openair0_cfg,
usrp_state_t
*
s
=
(
usrp_state_t
*
)
device
->
priv
;
pthread_t
f_thread
;
printf
(
"Setting USRP TX Freq %f, RX Freq %f
\n
"
,
openair0_cfg
[
0
].
tx_freq
[
0
],
openair0_cfg
[
0
].
rx_freq
[
0
]);
double
rx_off
,
tx_off
;
if
(
fabs
(
s
->
rx_RFfreq
-
openair0_cfg
[
0
].
rx_freq
[
0
])
<
1e6
)
{
// induce use of digital tuning
rx_off
=
s
->
rx_RFfreq
-
openair0_cfg
[
0
].
rx_freq
[
0
];
}
else
{
// allow UHD to select the frequnecy
rx_off
=
0
;
s
->
rx_RFfreq
=
openair0_cfg
[
0
].
rx_freq
[
0
];
}
if
(
fabs
(
s
->
tx_RFfreq
-
openair0_cfg
[
0
].
tx_freq
[
0
])
<
1e6
)
{
// induce use of digital tuning
tx_off
=
s
->
tx_RFfreq
-
openair0_cfg
[
0
].
tx_freq
[
0
];
}
else
{
// allow UHD to select the frequnecy
tx_off
=
0
;
s
->
tx_RFfreq
=
openair0_cfg
[
0
].
tx_freq
[
0
];
}
printf
(
"Setting USRP TX Freq %f (%f), RX Freq %f (%f)
\n
"
,
s
->
tx_RFfreq
,
tx_off
,
s
->
rx_RFfreq
,
rx_off
);
// spawn a thread to handle the frequency change to not block the calling thread
if
(
dont_block
==
1
)
pthread_create
(
&
f_thread
,
NULL
,
freq_thread
,(
void
*
)
device
);
else
{
s
->
usrp
->
set_tx_freq
(
device
->
openair0_cfg
[
0
].
tx_freq
[
0
]);
s
->
usrp
->
set_rx_freq
(
device
->
openair0_cfg
[
0
].
rx_freq
[
0
]);
uhd
::
tune_request_t
treq_rx
(
s
->
rx_RFfreq
+
rx_off
);
treq_rx
.
rf_freq_policy
=
uhd
::
tune_request_t
::
POLICY_MANUAL
;
treq_rx
.
rf_freq
=
s
->
rx_RFfreq
;
s
->
usrp
->
set_rx_freq
(
treq_rx
);
uhd
::
tune_request_t
treq_tx
(
s
->
tx_RFfreq
+
tx_off
);
treq_tx
.
rf_freq_policy
=
uhd
::
tune_request_t
::
POLICY_MANUAL
;
treq_tx
.
rf_freq
=
s
->
tx_RFfreq
;
s
->
usrp
->
set_tx_freq
(
treq_tx
);
}
return
(
0
);
...
...
This diff is collapsed.
Click to expand it.
targets/RT/USER/lte-ue.c
View file @
02148c79
...
...
@@ -489,7 +489,7 @@ static void *UE_thread_synch(void *arg)
//UE->rfdevice.trx_stop_func(&UE->rfdevice);
// sleep(1);
//
init_frame_parms(&UE->frame_parms,1);
init_frame_parms
(
&
UE
->
frame_parms
,
1
);
// if (UE->rfdevice.trx_start_func(&UE->rfdevice) != 0 ) {
// LOG_E(HW,"Could not start the device\n");
// oai_exit=1;
...
...
This diff is collapsed.
Click to expand it.
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